Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bin/dev --verbose option documented but not implemented #1882

Closed
@AbanoubGhadban

Description

@AbanoubGhadban

Bug Description

Thebin/dev --verbose option is documented in the help text but is not actually implemented in the OptionParser, causing an error when users try to use it.

Steps to Reproduce

cd spec/dummy./bin/dev --verbose

Expected Behavior

The command should run with verbose output for pack generation, showing the fullbundle exec rake react_on_rails:generate_packs output.

Actual Behavior

/lib/react_on_rails/dev/server_manager.rb:162:in `run_from_command_line': invalid option: --verbose (OptionParser::InvalidOption)

Root Cause Analysis

The issue was introduced when therun_from_command_line method was refactored in commitce30d89 (#1790). The verbose parameter support was added earlier in commit3878825, but when the OptionParser was created in the later commit, the--verbose/-v flag parsing was not included.

Current State

  1. ✅ Help text documents--verbose, -v option (line 218 inlib/react_on_rails/dev/server_manager.rb)
  2. start() method acceptsverbose: parameter (line 11)
  3. ✅ Verbose parameter is threaded through toPackGenerator.generate() (lines 419, 426)
  4. PackGenerator correctly implements verbose output behavior
  5. ❌ OptionParser inrun_from_command_line() does NOT parse--verbose or-v (lines 147-162)
  6. ❌ All calls tostart() hardcodeverbose: false (lines 170, 172, 178)

Fix Required

Inlib/react_on_rails/dev/server_manager.rb, add to the OptionParser (around line 157):

opts.on("-v","--verbose","Enable verbose output for pack generation")dooptions[:verbose]=trueend

Then update thestart() calls to use the option:

# Line 170start(:production_like,nil,verbose:options[:verbose],route:options[:route],rails_env:options[:rails_env])# Line 172start(:static,"Procfile.dev-static-assets",verbose:options[:verbose],route:options[:route])# Line 178start(:development,"Procfile.dev",verbose:options[:verbose],route:options[:route])

And initialize the options hash with the verbose key (line 145):

options={route:nil,rails_env:nil,verbose:false}

Impact

  • Users cannot enable verbose pack generation output
  • Documentation misleads users about available options
  • Debugging pack generation issues is harder than intended

Related Files

  • lib/react_on_rails/dev/server_manager.rb (lines 142-184)
  • lib/react_on_rails/dev/pack_generator.rb (verbose support already implemented)
  • lib/generators/react_on_rails/templates/base/base/bin/dev (template using this functionality)

Environment

  • Branch:strict-version-validation (but issue exists on master as well)
  • Commits: introduced ince30d89, verbose support from3878825

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp