Closed smlsml closed 6 years ago
I added a line to our app to output the value of $DEBUG
When bundled with ruby_parser 3.9.0, the value of $DEBUG is false When bundled with ruby_parser 3.10.1, the value of $DEBUG is true
This is with no other changes... I'm comparing the diff between the versions on github, don't see anything obvious, hum.
Can you tell me if you had a version bump in sexp_processor or any other deps?
BTW... just for your hunt: ruby -d
will also cause this...
I did add this code:
+$DEBUG = true if ENV["DEBUG"]
so check env | grep DEBUG
Hey Ryan,
Thanks for the replies. Yeah I noticed that it is something to do with $DEBUG getting set. I don’t know if this line is the culprit. I did look at the diff between .9 and .10 and didn’t see anything obvious.
I checked ENV too, no DEBUG is set before I start the app. I’ll do some checking to see if I can find when $DEBUG becomes true.
No other gems are changing at this point. I did: gem “ruby_parser”#, “~> 3.9” bundle update ruby_parser # 3.10.1 installs rake app:run
gem “ruby_parser”, “3.9” bundle update ruby_parser # back to 3.9.0 rake app:run # our script
On Fri, Feb 2, 2018 at 1:34 PM Ryan Davis notifications@github.com wrote:
I did add this code:
+$DEBUG = true if ENV["DEBUG"]
so check env | grep DEBUG
You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/seattlerb/ruby_parser/issues/258#issuecomment-362714319, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVwZGnAZLtffI2OCTvSZ_Matii0vtJ2ks5tQ39tgaJpZM4R2d16 .
so to be clear... 3.10.0 doesn't have the problem for you. It is 3.10.1 that uses ENV["DEBUG"]
. Something, somewhere has to be setting this variable in your env, or something is running with ruby -d
(which also sets the variable).
For now, I'd stick to 3.10.0 as it has some nice extensions and fixes in it.
Now that I know it is just $DEBUG, I can work-around this. But just for curiosity sake, I'll keep looking :)
Check this out.
ruby_parser 3.10.0:
before boot.rb: ENV DEBUG is "" AND DEBUG constant is "false"
before boot.rb: $DEBUG is "false"
after require rails/all: ENV DEBUG is "" AND DEBUG constant is "false"
after require rails/all: $DEBUG is "false"
I, [2018-02-03T06:47:02.181387 #54514] INFO -- Xcessman::Xcess::BundleExec: Pinging http://127.0.0.1:3001/cv_api/version
I, [2018-02-03T06:47:02.182148 #54514] INFO -- Xcessman::Xcess::BundleExec: Server not yet accepting connections...
Exception `LoadError' at /Users/slawson/.rvm/gems/ruby-2.3.5@manager-ruby23/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251 - cannot load such file -- 2.3.5/ruby_prof.so
Exception `LoadError' at /Users/slawson/.rvm/gems/ruby-2.3.5@manager-ruby23/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:240 - cannot load such file -- 2.3.5/ruby_prof.so
after bundler: ENV DEBUG is "" AND constant is "false"
after bundler: $DEBUG is "true"
Exception `Errno::ENOENT' at /Users/slawson/code/manager/manager/config/application.rb:40 - No such file or directory @ rb_sysopen - config/svmanager.yml
end application.rb: ENV DEBUG is "" AND DEBUG constant is "false"
end application.rb: $DEBUG is "true"
ruby_parser 3.10.1
before boot: ENV DEBUG is "" AND constant is "false"
before boot: $DEBUG is "false"
after rails: ENV DEBUG is "" AND constant is "false"
after rails: $DEBUG is "false"
I, [2018-02-03T06:48:08.923298 #54667] INFO -- Xcessman::Xcess::BundleExec: Pinging http://127.0.0.1:3001/cv_api/version
I, [2018-02-03T06:48:08.923964 #54667] INFO -- Xcessman::Xcess::BundleExec: Server not yet accepting connections...
after bundler: ENV DEBUG is "" AND constant is "false"
after bundler: $DEBUG is "false"
end app.rb: ENV DEBUG is "" AND constant is "false"
end app.rb: $DEBUG is "false"
* Listening on tcp://127.0.0.1:3001
Use Ctrl-C to stop
Did you annotate that correctly? Your original bug is about "Forced $DEBUG output after 3.10.0 to 3.10.1 upgrade" but now you're saying that $DEBUG isn't set in 3.10.1?
Can you send over your Gemfile so I might replicate your environment?
I meant to clarify that it isn’t just 3.9 to 3.10.1, but the 3.10.0 to 3.10.1 that appears to contain the addition.
I found some of our code that is doing ENV[‘DEBUG’] = ‘’ in an attempt to clear the value. Empty string being true in ruby, totally our issue. Thanks for entertaining me. Will close this when I get in front of a real device. Just caught me/us by surprise.
Thanks for your time.
On Feb 3, 2018, at 5:13 PM, Ryan Davis notifications@github.com wrote: Did you annotate that correctly? Your original bug is about "Forced $DEBUG output after 3.10.0 to 3.10.1 upgrade" but now you're saying that $DEBUG isn't set in 3.10.1?
Can you send over your Gemfile so I might replicate your environment?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
You definitely want ENV.delete "DEBUG"
or, from the outside, unset DEBUG
After upgrading the gem from 3.10.0 to 3.10.1, I'm now getting a ton of output that was never there before. I could see this being useful during a deep debug perhaps, but not on by default.
Any ideas? Downgrading back to 3.10.0 makes this go away.
It even outputs http traffic: