iilyak opened a new pull request #2183: Support `--extra_args` parameter in 
`dev/run`
URL: https://github.com/apache/couchdb/pull/2183
 
 
   ## Overview
   
   Sometimes there is a need to specify additional arguments for the beam 
process we start from dev/run.
   In particular the feature is handy for:
   - changing emulator flags
   - simulate OOM via available RAM restrictions
   - enable module loading tracing
   - configure number of schedulers
   - modify applications configuration
   - run customization script to add extra development deps (such as automatic 
code reload)
   
   Historically developers had to edit dev/run to do it.
   This PR adds an ability to specify additional arguments via `--extra_args` 
argument.
   
   In order to run customization script create `customization.erl` which 
exports `start/0` and run it using:
   ```
   dev/run --extra_args='-run customization'
   ```
   
   ## Testing recommendations
   
   1. Create `dev/customization.erl` with the following content:
       ```
       -module(customization).
   
       -export([start/0]).
   
       start() ->
          error_logger:info_msg("CUSTOMIZATION!!!~n").
       ```
   2. run `dev/run --extra_args='-run customization'`
   3. check logs and verify there is a line similar to the following
       ```
       [info] 2019-09-10T12:17:00.828103Z [email protected] <0.5.0> -------- 
CUSTOMIZATION!!!
       ```
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those issues or pull requests here.  
-->
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in 
https://github.com/apache/couchdb-documentation
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to