Skip to content

Rephrase the ExecutableProduct documentation #1373

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

Merged
merged 1 commit into from
Mar 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/src/jll.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,17 @@ defines the following variables:

An [`ExecutableProduct`](@ref) is a binary executable that can be run on the
current platform. If, for example, the `ExecutableProduct` has been called
`mungify_exe`, the wrapper defines an exported function named `mungify_exe` that
should run by the user in one the following ways:
`mungify_exe`, the wrapper defines an exported function named `mungify_exe`.
To run that the recommended way is the following:

```julia
# Only available in Julia v1.6+
run(`$(mungify_exe()) $arguments`)
```

However, this is only available in Julia v1.6 and later. If you really must
support older Julia versions, you can also use the following syntax, which
however is not thread-safe and generally less flexible.

```julia
mungify_exe() do exe
run(`$exe $arguments`)
Expand All @@ -187,9 +190,6 @@ syntax you are defining the name of the variable that will be used to actually
call the binary with
[`run`](https://docs.julialang.org/en/v1/base/base/#Base.run).

The former form is only available when using Julia v1.6, but should be
preferred going forward, as it is thread-safe and generally more flexible.

A common point of confusion about `ExecutableProduct`s in JLL packages is why
these function wrappers are needed: while in principle you could run the
executable directly by using its absolute path in `run`, these functions ensure
Expand Down
Loading