JRuby

"useless use" warning fires far too often during Rails execution and testing

Details

  • Number of attachments :
    0

Description

I'm not sure if this should be disabled somehow and we're not doing that, or if we're actually warning for valid reasons (perhaps because something peripheral is broken) or if these warnings are entirely spurious, but there's extremely annoying. Some snippets from running activesupport's tests (with Rake):

/Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/optparse.rb:1608 warning: Useless use of :: in void context.
/Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/optparse.rb:1615 warning: Useless use of :: in void context.
/Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/optparse.rb:1716 warning: Useless use of :: in void context.
/Users/headius/NetBeansProjects/rails/activesupport/./test/../lib/active_support/vendor/builder/xmlbase.rb:8 warning: Useless use of :: in void context.
/Users/headius/NetBeansProjects/rails/activesupport/./test/../lib/active_support/vendor/builder/blankslate.rb:62 warning: Useless use of :: in void context.

And more...the following one prints out a bazillion times...

<script>:0 warning: Useless use of :: in void context.
<script>:0 warning: Useless use of :: in void context.
<script>:0 warning: Useless use of :: in void context.
<script>:0 warning: Useless use of :: in void context.
<script>:0 warning: Useless use of :: in void context.
<script>:0 warning: Useless use of :: in void context.
... thousands upon thousands of these

These need to be corrected. I have temporarily disabled these warnings in ParserSupport for now, but we need to fix this and re-enable them.

Activity

Hide
Charles Oliver Nutter added a comment -

Examine for 1.0...we're probably just warning more than we're supposed to, but it would be nice to know for sure.

Show
Charles Oliver Nutter added a comment - Examine for 1.0...we're probably just warning more than we're supposed to, but it would be nice to know for sure.
Hide
Charles Oliver Nutter added a comment -

Really doesn't hurt anything, but it would be nice to fix for 1.0. It won't be fixed for the RC.

Show
Charles Oliver Nutter added a comment - Really doesn't hurt anything, but it would be nice to fix for 1.0. It won't be fixed for the RC.
Hide
Charles Oliver Nutter added a comment -

Nobody cares about this, and there's plenty of other things to do in 1.0. Punting to post-1.0.

Show
Charles Oliver Nutter added a comment - Nobody cares about this, and there's plenty of other things to do in 1.0. Punting to post-1.0.
Hide
Nick Sieger added a comment -

I tracked this down to an incompatible implementation of Kernel#warn. It should be checking the value of $VERBOSE before printing. Don't have a patch right now.

Show
Nick Sieger added a comment - I tracked this down to an incompatible implementation of Kernel#warn. It should be checking the value of $VERBOSE before printing. Don't have a patch right now.
Hide
Charles Oliver Nutter added a comment -

Fix this for 1.1 and revert my warning omission in the parser subsystem.

Show
Charles Oliver Nutter added a comment - Fix this for 1.1 and revert my warning omission in the parser subsystem.
Hide
Charles Oliver Nutter added a comment -

I will assign to Nick for now. We should solve this for 1.1, especially if it's that easy.

Show
Charles Oliver Nutter added a comment - I will assign to Nick for now. We should solve this for 1.1, especially if it's that easy.
Hide
Nick Sieger added a comment -

I believe this should be resolved by JRUBY-1480.

Show
Nick Sieger added a comment - I believe this should be resolved by JRUBY-1480.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: