Skip to content

Add dune exec --prefix#6029

Closed
emillon wants to merge 2 commits intoocaml:mainfrom
emillon:exec-prefix
Closed

Add dune exec --prefix#6029
emillon wants to merge 2 commits intoocaml:mainfrom
emillon:exec-prefix

Conversation

@emillon
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

emillon commented Aug 3, 2022

Sure, I'll try that.

@rgrinberg
Copy link
Copy Markdown
Member

@emillon I think this PR has been replaced?

@rgrinberg
Copy link
Copy Markdown
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