Don't unconditionally emit debug level info from RACC #4881
+1
−1
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.
In
3fe1cc2,
jruby's version of racc/parser.rb was brought in line with MRI
racc/parser.rb. This brought along a change to the yyparse method which
changed the last argument (the c_debug/sysdebug argument) from false to true. This causes the java racc
parser implementation to unconditionally emit very noisy debug output
whenever yyparse is called, where previously it would not emit such
output. Passing true is safe for the pure ruby parser, as it ignores the
argument entirely and does nothing with it. It is also safe for the
native c parser, as that parser only emits debug info if it is compiled
with DEBUG set. Tenderlove's version of racc disabled debug by default
in
ruby/racc@c5359ab,
but it looks like MRI never picked up that change.
For a time, true was passed and debugging info was not emitted (between
9.1.9.0 and 9.1.12.0). This was because in the merge to bring
racc/parser.rb in line with MRI, the loading of the java cparse library
no longer happened, so the pure ruby version of the library was used
which ignores the debug parameter entirely. This changed in
baeaad1
when the cparse-java.jar was being loaded again for jruby.