Skip to content

Doctor warns about mutually-exclusive test config in generated defaults #2513

@justin808

Description

@justin808

Summary

rails react_on_rails:doctor reports this warning on a freshly updated Pro/RSC demo setup:

Both build_test_command and shakapacker compile: true are configured

The warning is correct in principle, but the generated/default config currently leads to this state, so users see a warning before making any custom test-config choices.

Reproduction

  1. Use a Pro/RSC setup (example versions tested):
    • react_on_rails 16.4.0.rc.5
    • react_on_rails_pro 16.4.0.rc.5
    • shakapacker 9.5.0
  2. Keep generated/default config values:
    • config/initializers/react_on_rails.rb contains config.build_test_command = "RAILS_ENV=test bin/shakapacker"
    • config/shakapacker.yml test env has compile: true
  3. Run: bin/rails react_on_rails:doctor

Actual

Doctor warns that both approaches are configured and says they are mutually exclusive.

Expected

Either:

  1. Generated defaults should choose one strategy, or
  2. Doctor should suppress/soften this warning when it detects the untouched generator default combination.

Suggested Fix

  • Make generator/test templates choose one path consistently (recommended: compile: true only).
  • Keep doctor strict for user-customized conflicting configs, but avoid warning on known starter defaults.

Duplicate Check

I checked existing issues before filing. This is distinct from #2432 (Pro/SWC false positives), which does not cover this test-config warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    codexPRs created from codex-named branches

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions