-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RT vs CT #91
Comments
The cause of this is the keyCache which seems to be broken at compile time. The quick rundown is: When However, at compile time, when the mapping start is generated, this seems to also update the pushed event in the key cache (which it shouldn't!). This is a VM bug. This is the parser code where it occurs. This explains the difference in the output you showed in your comment on the other issue: Instead of the first key of the map, you get another Is this enough info to fix it in the VM? I can try writing up a minimal example to file a Nim bug, but I am afraid the time slot I allocated for rewriting the NimYAML parser has expired and I don't have much time pushing this forward so things will take more time. |
@flyx after a painful reduction I've found the root causes: |
Compile time loading now works well enough. The linked Nim issue should be re-evaluated as I don't see the problem occurring with NimYAML anymore. Dumping doesn't work but I think that's not a priority. Some other things don't work at CT:
Apart from that, all loading tests for loading into native types succeed at comptime, which is good enough for me to close this and the other issue. |
example 1: works at RT(?), fails at CT
wrote works at RT with a
?
because I'm not sure whether the output (A,
) is correct or not.RT:
prints:
CT (uncomment static: main()):
(with nim-lang/Nim#15947)
errors:
example 2: works at RT and CT
adding
{}
makes it workexample 3: works at RT and CT
The text was updated successfully, but these errors were encountered: