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 compilation-related CLI option names less confusing #23054

Closed
StefanKarpinski opened this issue Jul 31, 2017 · 9 comments · Fixed by #24410
Closed

make compilation-related CLI option names less confusing #23054

StefanKarpinski opened this issue Jul 31, 2017 · 9 comments · Fixed by #24410
Assignees
Labels
compiler:precompilation Precompilation of modules
Milestone

Comments

@StefanKarpinski
Copy link
Sponsor Member

StefanKarpinski commented Jul 31, 2017

If you don't already know what they mean (and it's easy to forget even if you once did), the names of these options to julia are entirely unhelpful and generally actively confusing:

  • --precompiled={yes|no} – no, this has nothing to do with module precompilation
  • --compilecache={yes|no} – but this does! :trollface:
  • --compile={yes|no|all|min} – I have no idea what this does, despite reading julia --h

Changing --precompiled to --compile-sysimg (see below) --use-sysimg={yes,no} and --compilecache to --compile-modules={yes,no} would make a lot more sense. I would also assume that these control where the julia processes STDOUT goes:

 --output-o name           Generate an object file (including system image data)
 --output-ji name          Generate a system image data file (.ji)
 --output-bc name          Generate LLVM bitcode (.bc)
 --output-incremental=no   Generate an incremental output file (rather than complete)

That, of course, is not what they do, but ¯\_(ツ)_/¯. See also #15864 – having --output-x options control compiler artifacts would make sense for a julia-compile program, but not for julia itself. Changing these to --compile-output-format={o,ji,bc} would be better and maybe --compile-incremental={yes,no}.

@StefanKarpinski StefanKarpinski added the compiler:precompilation Precompilation of modules label Jul 31, 2017
@StefanKarpinski StefanKarpinski added this to the 1.0 milestone Jul 31, 2017
@tkelman
Copy link
Contributor

tkelman commented Aug 1, 2017

Changing --precompile to --compile-sysimg

This one is whether or not the precompiled sysimg gets loaded - it's already been compiled when Julia was built, rather than having to do with compilation that happens at runtime

@StefanKarpinski
Copy link
Sponsor Member Author

StefanKarpinski commented Aug 1, 2017

I think the fact that I didn't know what it does despite the option name and reading the help output really just proves my point. In that case it should be called --use-sysimg or something.

@andreasnoack
Copy link
Member

We might also want to make the use of dashes more consistent. Right now we have machinefile vs history-file, compilecache vscode-coverage, handle-signals vs depwarn.

@StefanKarpinski
Copy link
Sponsor Member Author

If we do #15864, then --output-x and --compile options are compilation-only, so would not need to necessarily change names.

  • The --precompile option could be called --use-sysimg-native-code={yes,no} or some such (a bit long but it's rarely used).
  • The --compilecache option could be called --use-compiled-modules={yes,no}.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 3, 2017

--precompile is probably --compile=jit-all

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 3, 2017

--compilecache=no is perhaps just -e 'empty!(Base.LOAD_CACHE_PATH)'

@tkelman
Copy link
Contributor

tkelman commented Aug 3, 2017

--compilecache=no is perhaps just -e 'empty!(Base.LOAD_CACHE_PATH)'

Does that error if it tries to write one, skip silently, or skip with a message?

@JeffBezanson
Copy link
Sponsor Member

JeffBezanson commented Aug 3, 2017

The --compile options tell the compiler what to do. --precompiled means to use existing native code from the system image. In theory, they're completely orthogonal.

--compilecache=no is perhaps just -e 'empty!(Base.LOAD_CACHE_PATH)'

It shouldn't be coupled to that implementation though.

JeffBezanson added a commit that referenced this issue Sep 7, 2017
JeffBezanson added a commit that referenced this issue Sep 8, 2017
@vtjnash vtjnash added the status:triage This should be discussed on a triage call label Sep 19, 2017
@JeffBezanson
Copy link
Sponsor Member

Conclusion: for now we should hide (remove from -h output) the --compile and --output options.

@JeffBezanson JeffBezanson removed the status:triage This should be discussed on a triage call label Sep 21, 2017
JeffBezanson added a commit that referenced this issue Oct 30, 2017
These are tricky to use and should be considered unstable.

closes #23054
JeffBezanson added a commit that referenced this issue Oct 31, 2017
These are tricky to use and should be considered unstable.

closes #23054
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants