History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-518
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Nick Sieger
Reporter: Charles Oliver Nutter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

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

Created: 01/Feb/07 11:43 PM   Updated: 22/Dec/07 06:26 AM
Component/s: Core Classes/Modules
Affects Version/s: None
Fix Version/s: JRuby 1.0.3, JRuby 1.1RC1

Time Tracking:
Not Specified


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter - 18/Apr/07 04:39 AM
Examine for 1.0...we're probably just warning more than we're supposed to, but it would be nice to know for sure.

Charles Oliver Nutter - 05/May/07 06:34 PM
Really doesn't hurt anything, but it would be nice to fix for 1.0. It won't be fixed for the RC.

Charles Oliver Nutter - 16/May/07 05:41 PM
Nobody cares about this, and there's plenty of other things to do in 1.0. Punting to post-1.0.

Nick Sieger - 19/Sep/07 07:54 AM
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.

Charles Oliver Nutter - 30/Sep/07 12:29 PM
Fix this for 1.1 and revert my warning omission in the parser subsystem.

Charles Oliver Nutter - 23/Oct/07 03:33 PM
I will assign to Nick for now. We should solve this for 1.1, especially if it's that easy.

Nick Sieger - 13/Dec/07 11:13 AM
I believe this should be resolved by JRUBY-1480.