Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass arguments to recipes #23

Closed
scizzorz opened this issue Sep 11, 2019 · 1 comment · Fixed by #27
Closed

Pass arguments to recipes #23

scizzorz opened this issue Sep 11, 2019 · 1 comment · Fixed by #27
Labels
enhancement New feature or request feedback Feedback wanted
Milestone

Comments

@scizzorz
Copy link
Member

My original idea was to have a recipe have a num_args field that would specify that the recipe consumes another n arguments, but I think that's fairly tricky to implement and doesn't really leave it open for something that might take arguments sometimes, or might not.

My next thought was to pass in extra arguments in brackets after the recipe name, but that makes it more painful to type because you'll need to quote it all...

$ mold foo
$ mold "foo[--extra --args]"

Another option is to leave an empty place for arguments in the script (see python.mold below), and then parametrize that by using mold environments...

$ mold -a myenv foo

See also:

@scizzorz scizzorz added enhancement New feature or request feedback Feedback wanted labels Sep 11, 2019
@scizzorz scizzorz added this to the 0.4.0 milestone Sep 25, 2019
@scizzorz
Copy link
Member Author

At least for the time being, I'm sticking with parameterization via $MOLDENV instead of allowing arguments to be passed to recipes. A core concept that unintentionally emerged from Mold's design was the ability to immediately present the user with all of their task choices without forcing them to dig through --help and man pages to find more options. By adding the flexibility to pass extra arguments, the moldfile no longer represents an exhaustive list of tasks.

In situations where users need to run very specialized commands, they will have to step outside of Mold's boundaries and run them manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback Feedback wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant