Skip to content
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

"Useless" warnings have file as "null" #5597

Closed
headius opened this issue Feb 7, 2019 · 1 comment
Closed

"Useless" warnings have file as "null" #5597

headius opened this issue Feb 7, 2019 · 1 comment
Assignees
Milestone

Comments

@headius
Copy link
Member

headius commented Feb 7, 2019

Pretty sure this used to work. Seems like it's getting a dummy position out of the parser for these nodes. Memory-saving measure gone awry?

[--dev] ~/projects/jruby $ jruby -w -e '1'
null:1: warning: Useless use of a literal in void context.

[--dev] ~/projects/jruby $ jruby -w -e 'defined? 1'
null:1: warning: Useless use of defined? in void context.

This may affect other parser warnings but I did not investigate.

@headius
Copy link
Member Author

headius commented Feb 7, 2019

Note that stack-walking warning lines do still work:

[--dev] ~/projects/jruby $ jruby -e '[].index(1){}'
-e:1: warning: given block not used

@enebo enebo closed this as completed in c3a4419 Feb 7, 2019
@enebo enebo added this to the JRuby 9.2.6.0 milestone Feb 7, 2019
kares added a commit to kares/jruby that referenced this issue Feb 9, 2019
* master: (73 commits)
  [ci] Travis: Drop unused setting sudo: false (jruby#5593)
  replace otto.takari with mavengem wagon (jruby#5600)
  Fixes jruby#5597. "Useless" warnings have file as "null".
  Add --record to enable a full-run Java Flight Recorder recording.
  Use stack walking API to acquire single element.
  USe &p instead of p = proc
  Revert "Fix jruby#5596. proc() now needs to read frame when not supplied a block"
  Fix jruby#5596. proc() now needs to read frame when not supplied a block
  Fix bad access of Runtime.getAvailableProcessors.
  Use pooled UTF-8 character decoders when possible.
  Use all processes reporte by JVM to speed up this suite.
  Disable the timing-out tests so they don't interfere with build.
  Try to set allowed failures again.
  Bad test? Actually use a lambda block for should_not.
  Allow tests depending on takari.io to fail for now.
  ENEBO
  Revert "Close any open selectors when tearing down a runtime."
  Time, DateTime: fix isTzRelative book keeping
  [test] remove passing psych tags
  Time: minimal fix for Rails Time.change() problem
  ...
kares added a commit to kares/jruby that referenced this issue Feb 9, 2019
* master: (73 commits)
  [ci] Travis: Drop unused setting sudo: false (jruby#5593)
  replace otto.takari with mavengem wagon (jruby#5600)
  Fixes jruby#5597. "Useless" warnings have file as "null".
  Add --record to enable a full-run Java Flight Recorder recording.
  Use stack walking API to acquire single element.
  USe &p instead of p = proc
  Revert "Fix jruby#5596. proc() now needs to read frame when not supplied a block"
  Fix jruby#5596. proc() now needs to read frame when not supplied a block
  Fix bad access of Runtime.getAvailableProcessors.
  Use pooled UTF-8 character decoders when possible.
  Use all processes reporte by JVM to speed up this suite.
  Disable the timing-out tests so they don't interfere with build.
  Try to set allowed failures again.
  Bad test? Actually use a lambda block for should_not.
  Allow tests depending on takari.io to fail for now.
  ENEBO
  Revert "Close any open selectors when tearing down a runtime."
  Time, DateTime: fix isTzRelative book keeping
  [test] remove passing psych tags
  Time: minimal fix for Rails Time.change() problem
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants