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

Make julia_exename public API? #48393

Closed
fonsp opened this issue Jan 24, 2023 · 5 comments · Fixed by #48425
Closed

Make julia_exename public API? #48393

fonsp opened this issue Jan 24, 2023 · 5 comments · Fixed by #48425

Comments

@fonsp
Copy link
Member

fonsp commented Jan 24, 2023

Base.julia_cmd is public API, but Base.julia_exename is not (it has no docstring).

Many packages already use julia_exename: https://juliahub.com/ui/Search?q=julia_exename&type=code

julia_exename is also used in the documentation of julia_cmd:

help?> Base.julia_cmd
  Base.julia_cmd(juliapath=joinpath(Sys.BINDIR, julia_exename()); cpu_target)

  Return a julia command similar to the one of the running process. Propagates
  any of the --cpu-target, --sysimage, ...
@Seelengrab
Copy link
Contributor

Seelengrab commented Jan 24, 2023

Almost all of these seem to be of the form

joinpath(Sys.BINDIR, Base.julia_exename())

Would it make more sense to have packages use julia_cmd directly instead, since that is already API?

@giordano
Copy link
Contributor

You probably want to use julia_cmd: #48039. And the first element of julia_cmd is the executable path, if you really only want that one.

@fonsp
Copy link
Member Author

fonsp commented Jan 25, 2023

Thanks for the suggestions! Indeed, I think some of the uses found by https://juliahub.com/ui/Search?q=julia_exename&type=code could just use julia_cmd() instead.

But for some, like PackageCompiler, you actually want the flags to not be propagated, right? When you are not doing distributed computing, but launching a sandboxed Julia process for a dedicated task.

Perhaps we could make propagation configurable with a kwarg of julia_cmd? Or do you think (because of #48039) that this functionality should not be exposed to users at all?

@giordano
Copy link
Contributor

As I said above, you can use julia_cmd()[1].

@fonsp
Copy link
Member Author

fonsp commented Jan 25, 2023

I see, thanks! Feel free to close then.

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 a pull request may close this issue.

4 participants