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

Add -help/--help option to ocamlrun #10101

Merged
merged 1 commit into from Jan 4, 2021
Merged

Add -help/--help option to ocamlrun #10101

merged 1 commit into from Jan 4, 2021

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Dec 29, 2020

Split off from #9284; this requires #10098, so only d2c2f53 needs reviewing

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.

You're slicing it thin :-) Yes, it's good to have a help option for ocamlrun. Nitpicks below.

" -m Print the magic number of <executable> and exit\n"
" -M Print the magic number expected by this runtime and exit\n"
" -p Print the names of the primitives known to this runtime\n"
" -t Increments the trace level in debug mode by 1\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is about tracing the bytecode interpreter. Plus, "by 1" is slightly pedantic :-)

Suggested change
" -t Increments the trace level in debug mode by 1\n"
" -t Trace the execution of the bytecode interpreter. Multiple -t increase verbosity\n"

Copy link
Member Author

Choose a reason for hiding this comment

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

It's probablycertainly just me, but the lack of the plural on "-t" bothers me... does "Trace the execution of the bytecode interpreter (specify multiple times to increase verbosity)" work?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it works fine.

" -version Print version string and exit\n"
" -vnum Print short version number and exit\n"
" -help Display this list of options\n"
" --help Display this list of options");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why no \n at the end of this line? Oh, yes, because you're using this awful puts function :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm sure I've submitted a patch in the past where the \n was forgotten, but I can't find it!

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.

There was an extraneous entry in the Changes file, which I removed by a direct push.

Otherwise this is good to go! Merging right now...

@xavierleroy
Copy link
Contributor

No, not merging right now, as it contains other bits from other pull requests. This is not friendly to reviewers and mergers.

@dra27
Copy link
Member Author

dra27 commented Jan 1, 2021

It's tricky with stacked PRs (the code for this sits on #10098, as noted in the summary) - without that you have a PR which fails CI as it doesn't build 🤷‍♂️

I'm (more than) happy to rebase and merge when #10098 is completed.

@dra27
Copy link
Member Author

dra27 commented Jan 4, 2021

Rebased without the #10098 commits with changes - good to go with CI

@dra27 dra27 merged commit 8cf4ab6 into ocaml:trunk Jan 4, 2021
@dra27 dra27 deleted the ocamlrun-help branch January 4, 2021 11:58
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