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

Add dune exec --prefix #6029

Closed
wants to merge 2 commits into from
Closed

Add dune exec --prefix #6029

wants to merge 2 commits into from

Conversation

emillon
Copy link
Collaborator

@emillon emillon commented Aug 2, 2022

This adds a prefix that is executed instead of the command itself.
This is useful to run a command under tools like time or perf.

Closes #2691

@emillon emillon requested a review from rgrinberg August 2, 2022 16:10
@emillon
Copy link
Collaborator Author

emillon commented Aug 2, 2022

I think that just passing --prefix covers the majority of cases. We could invent a more complex syntax but this seems to be in a good spot. What do you think?

@rgrinberg
Copy link
Member

To me, the suggestion

dune exec time %{bin:./x.exe} (we reuse the pform from dune files)

Seems the most natural. We already support the syntax in build, so we should ask ourselves why it isn't supported for exec as well.

This adds a prefix that is executed instead of the command itself.
This is useful to run a command under tools like time or perf.

Closes ocaml#2691

Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
@emillon
Copy link
Collaborator Author

emillon commented Aug 3, 2022

Sure, I'll try that.

@rgrinberg
Copy link
Member

@emillon I think this PR has been replaced?

@rgrinberg
Copy link
Member

I think it has been.

@rgrinberg rgrinberg closed this Nov 6, 2022
@emillon emillon deleted the exec-prefix branch July 25, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow dune exec underneath perf rather than having to specify a target from _build.
2 participants