[rb][build] improve ruby local_dev generation by titusfortner · Pull Request #16495 · SeleniumHQ/selenium

User description

The ./go rb:local_dev command is builds everything so that all assets/code that needs to be generated in the build process is created so that any tests that need to be run can be run through RubyMine instead of just bazel for better debugging options.

I have my RubyMine set to use the ruby binary stored in the bazel-selenium working directory.
For local Ruby development, if you want to run on RBE, you have to switch to jruby, and every time you change the ruby versions, RubyMine gets unhappy. Running ./go rb:local_dev should fix this, but for some reason it builds the ruby binary, but does not stage it in the bazel-selenium / working directory. Adding a command that requires using the ruby binary forces it to be staged.


PR Type

Enhancement


Description

  • Adds informative message during Ruby binary installation

  • Executes additional Bazel command to stage Ruby binary

  • Ensures Ruby binary is properly placed in working directory


Diagram Walkthrough

flowchart LR
  A["local_dev task"] --> B["Print status message"]
  B --> C["Build bundle"]
  C --> D["Build Ruby"]
  D --> E["Build grid"]
  E --> F["Execute rubocop with dry-run"]
  F --> G["Ruby binary staged in working directory"]
Loading

File Walkthrough

Relevant files
Enhancement
Rakefile
Add Ruby binary staging to local_dev task                               

Rakefile

  • Added user-facing message indicating Ruby installation is in progress
  • Added Bazel command execution with --dry-run flag for rubocop to force
    staging of Ruby binary
  • Included explanatory comment about the purpose of the additional
    command
+3/-0