Method needed to get rake command line options for spawning new rake job
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with Rake.application and trace the handle_options and standard_rake_options entry points to see how command-line options are parsed and retained. Check how a top-level Rakefile could read the parsed value when spawning jobs in subdirectories. Done means the parsed options are exposed through a public application attribute without requiring callers to duplicate option parsing.
Written by the indexing model from the issue text.
Description
I am implementing a "top level" Rakefile that will spawn off rake jobs in sub-directories.
This is not hard to do, except that I want to pass the same options to the jobs that was passed to the original rake command. I cannot find a way to reliably find out what those options were without using some quasi private methods such as handle_options in the application object. I do not want the targets, just the options.
Could we add code to handle_options to put the options that are parsed into an array that is a public attribute of the application object?
Then I could grab the rake options by a simple use of something like:
Rake.application.rake_options
If there is some way to easily do this that I am missing please let me know. I originally was just iterating over the ARGV entries and grabbing things out of it, but quickly realized that the command line options may or may not have an argument following a "-" prefixed option and there is no way I can know that without duplicating all the code in standard_rake_options.
Thanks.
- Dominant language
- Ruby
- Stars
- 2.5k
- Forks
- 649
- Avg merge
- 4m
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/rake
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
rake -P output is ambiguous with prereq namespacesPossibly taken @leoarnold claimed this 110 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
-
FileList#<< bypasses exclusions while FileList#include respects themPossibly taken @hsbt claimed this 124 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 45/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
cline/mcp-marketplace#3886 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jetrockets/recorder#61 ·
-
PROJECT: website-redesign
Difficulty 1/5 Under an hour Newbie friendliness 72/100
thewca/worldcubeassociation.org#16617 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day