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

Improve command line parsing in ocamlrun #10098

Merged
merged 3 commits into from Jan 4, 2021
Merged

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Dec 29, 2020

This splits off the first fourthree commits of #9284.

  • Support command line parsing termination --
  • Interpret -Ifoo as -I foo (before it was silently interpreted as -I)
  • Improvement to error message for missing parameter for -I

Only recognise command-line options when given exactly.

Previously, ocamlrun -Ifoo bar was equivalent to ocamlrun -I bar.
Previously, ocamlrun -I would display a message that a bytecode file
wasn't specified rather than that no argument was given for -I.
Copy link
Contributor

@xavierleroy xavierleroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks globally good to me. Not sure about -Idir, though. Some style suggestions below.

runtime/startup_byt.c Show resolved Hide resolved
runtime/startup_byt.c Outdated Show resolved Hide resolved
runtime/startup_byt.c Outdated Show resolved Hide resolved
runtime/startup_byt.c Show resolved Hide resolved
@dra27
Copy link
Member Author

dra27 commented Jan 3, 2021

Review comments squashed into the commits, and the -Ifoo removed - ready to merge when CI agrees

@dra27 dra27 merged commit f9ed44c into ocaml:trunk Jan 4, 2021
@dra27 dra27 deleted the ocamlrun-cli branch January 4, 2021 09:32
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.

None yet

2 participants