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

Suggested Fix

  • Make generator/test templates choose one path consistently (recommended: build_test_command rather thancompile: true only).

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

    Metr-PendingPending Metr trackingP1Target this sprintbugcodexPRs created from codex-named branchesrelease:16.4.0-must-haveMust-have for 16.4.0: critical bug/perf/usability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions