Add support for -args and -args0 to ocamlmklib#2045
Merged
gasche merged 2 commits intoocaml:trunkfrom Sep 14, 2018
Merged
Conversation
Member
|
This is not directly related to your change but: why is ocamlmklib parsing arguments by hand instead of using |
Contributor
Author
|
Good question. I am not sure, but I suspect it is due to the slightly clever handling of some arguments (e.g. |
dbuenzli
reviewed
Sep 14, 2018
tools/ocamlmklib.ml
Outdated
| Usage: ocamlmklib [options] <.cmo|.cma|.cmx|.cmxa|.ml|.mli|.o|.a|.obj|.lib|\ | ||
| .dll|.dylib files>\ | ||
| \nOptions are:\ | ||
| \n -args <file> Read additional newline-terminated comman line arguments\ |
gasche
approved these changes
Sep 14, 2018
tools/ocamlmklib.ml
Outdated
| for i = Array.length arr - 1 downto first do | ||
| Stack.push arr.(i) stk | ||
| done | ||
| ;; |
Member
There was a problem hiding this comment.
I would move this within parse_arguments to be next to next_arg, and use a label for the first argument for readability of the callsites.
15f870c to
fe8013d
Compare
Member
|
(I'm happy with the refactoring; @nojb is it ready on your side?) |
Contributor
Author
|
Yes, ready! |
Member
|
Merged, thanks! @dra27 there is something suspicious in the AppVeyor logs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds options
-argsand-args0toocamlmklib, similar to the other tools.See also ocaml/dune#1268 and ocaml/dune#1256.