Grep .rspec for deprecation behavior in Step 2#101
Conversation
032bb23 to
0dc41db
Compare
Add a silence-check sweep to test-suite-verification Step 2 and to the 'Finding Deprecation Warnings' reference, covering autoloaded files that the previous guidance missed: .rspec, spec/.rspec, spec/spec_helper.rb, spec/rails_helper.rb, Rakefile, and spec/support. A single '-r raise_errors_for_deprecations' line in .rspec can install a raise-on-deprecation hook that nothing under config/ would surface. Also document the precedence interaction between raise_errors_for_deprecations! and DeprecationTracker: when the tracker is enabled (DEPRECATION_TRACKER=save|compare) the project-level raise hook must yield to the tracker, otherwise the raise bypasses the tracker's compare/save path. Refs #100
0dc41db to
60cf70b
Compare
|
Thanks for catching the I have a few patterns the recipe does not currently surface, and I would love your take on whether any of them feel worth adding or out of scope.
One open question: if a single comprehensive recipe feels like it is collapsing too many concerns into one grep, would a tiered approach read more cleanly to you, a baseline check plus a follow-up for 7.1+ apps? I am leaning toward the single recipe since |
…itest, version context Fold in review suggestions on the Step 2 grep recipe: - env DSL form: config.active_support.deprecation / disallowed_deprecation / disallowed_deprecation_warnings / report_deprecations - Rails 7.1+ deprecators registry: Rails.application.deprecators and per-framework <Framework>.deprecator (behavior / disallowed_behavior / silenced / silence) - Minitest paths: test/test_helper.rb, test/support/, test/minitest/ - version-context note so a Rails 5-7.0 app with no deprecators hits reads as expected rather than a gap Kept a single recipe (grep is cheap) to avoid drift across the two files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Went ahead and pushed my own suggestions into the branch so this isn't blocked on you, @JuanVqz — shout if any of it feels off and I'll happily revert or adjust. Folded all four into the single Step 2 recipe (kept it as one grep rather than tiering it, since grep is cheap and one block is easier to keep in sync across the two files):
I sanity-checked the regex against fixtures for each form, and confirmed a bare |
Closes #100
Related ombulabs/claude-code_dual-boot-skill#20
Summary
rails-upgrade/workflows/test-suite-verification-workflow.mdso the silence/raise/disallow check covers.rspec,spec/.rspec,spec/spec_helper.rb,spec/rails_helper.rb,Rakefile, andspec/support/, not justconfig/.rails-upgrade/references/deprecation-warnings.mdunder "Finding Deprecation Warnings", with the canonical-r raise_errors_for_deprecationsexample.Note for the maintainer
The originating report referenced
workflows/deprecation-triage-workflow.mdStep 2, but that exact file does not exist in this repo. I landed the change in the two closest spots:test-suite-verification-workflow.md(Step 2 = "Run the Test Suite") andreferences/deprecation-warnings.md("Finding Deprecation Warnings"). Happy to relocate or split if there's a better target.Test plan
.rspecautoloadedraise_errors_for_deprecationsand the original silence-check guidance would have missed it.greprecipe in the change exercised against that codebase and surfaces the.rspecautoload and theRSpec.configurehook.