-
Notifications
You must be signed in to change notification settings - Fork 22.1k
Enable debug no_repeat config in generated app
#55214
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
base: main
Are you sure you want to change the base?
Enable debug no_repeat config in generated app
#55214
Conversation
|
Hmm, I tested this out with a new app and it worked as expected, but CI disagrees. |
f288d92 to
e550270
Compare
d687f3e to
c085ed8
Compare
| sass-embedded (~> 1.63) | ||
| date (3.4.1) | ||
| debug (1.10.0) | ||
| debug (1.11.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I tested this out with a new app and it worked as expected, but CI disagrees.
It seems some of the railties tests are picking up the framework Gemfile.lock, so we need to bump this to get CI green.
| require "debug" | ||
|
|
||
| # See https://github.com/ruby/debug#configuration-list for more options. | ||
| DEBUGGER__::CONFIG[:no_repeat] = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the easiest way to configure debug without messing around with environment variables (ref: ruby/debug#1098).
railties/lib/rails/generators/rails/app/templates/config/initializers/debug.rb.tt
Outdated
Show resolved
Hide resolved
c085ed8 to
5c04e4b
Compare
| # Start debugger with binding.b [https://github.com/ruby/debug] | ||
| # gem "debug", ">= 1.0.0" | ||
| # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem | ||
| gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only commented out gem in plugins, and it isn't commented out in apps, so I opted to un-comment it here rather than have a separate conditional initializer just for plugins that does something hacky like check if the gem is loaded first.
Motivation / Background
Addresses ruby/debug#1098 (comment)
Detail
ruby/debug#1140 introduced a new
no_repeatconfig option (see ruby/debug#1098 for context) which is included in the latest release.debugisn't pinned to a specific version in the generated Gemfile, so we can start using this in new apps.Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]