Repository navigation
Test: a symbol in a prism-skimmed method body - #24
Merged
Merged
Conversation
#21 regenerated Src/Prism/Generated for prism cd76b0d1, where SymbolNode's optional value_loc became the required content_loc. LoadNode reads it as a location, but SkimNode - which reads past a method body at load time, to be bridged when the method is first called - still read it as an optional one, so every node after a symbol in a method body came from the wrong offset: "Unknown prism node type: 203" or an IndexOutOfRangeException as soon as a file has `def m; :sym; end`. mspec could not load its own runner. The file is now what generate.rb writes from cd76b0d1's config.yml; this one line was the only difference. MethodDef_SymbolInBody1 calls methods whose bodies hold symbols, through prism.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…ol-content-loc # Conflicts: # Src/IronRuby.Tests/RubyTests.cs # Src/IronRuby.Tests/Runtime/MethodTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A regression test for the prism loader fix that landed in #23 (324a4b3, "regenerate SkimNode for SymbolNode").
#21 regenerated
Src/Prism/Generatedfor prism cd76b0d1, whereSymbolNode's optionalvalue_locbecame the requiredcontent_loc, butSkimNode(which reads past a method body at load time, to be bridged when the method is first called) kept reading it as optional. Every node after a symbol in a method body was then read from the wrong offset: a file withdef m; :sym; endfailed with "Unknown prism node type" or anIndexOutOfRangeException, and mspec could not load its own runner. CI's smoke test has no such method, which is how it got through.This PR first carried the same one-line fix; after #23 merged, master has it, and what is left here is
MethodDef_SymbolInBody1, which calls methods whose bodies hold symbols, through prism, so that the next regeneration cannot quietly undo it. It fails on the loader before #23 and passes on master.Tested on Windows, .NET 10, libprism built at cd76b0d1: full IronRuby.Tests suite, 0 failures, after merging master.