Fix parsing of OPAMFETCH (support quotes / proper POSIX shell syntax)#5492
Fix parsing of OPAMFETCH (support quotes / proper POSIX shell syntax)#5492kit-ty-kate merged 4 commits intoocaml:masterfrom
Conversation
7204d79 to
6ef073f
Compare
|
It works! Thanks for the fix 👍 |
232999b to
cf2f658
Compare
cf2f658 to
1e862b7
Compare
|
|
||
| module Char : sig | ||
|
|
||
| val is_whitespace : char -> bool |
There was a problem hiding this comment.
What about rather following what is being proposed upstream. That way, in a few years, you can likely simply delete the code. In other words:
module Char : sig
include Stdlib.Char
module Ascii : sig
val is_white : char -> bool
end
endThere was a problem hiding this comment.
I knew about the PR but I didn't use the same interface at the time for several reasons:
- the two definitions are different (e.g.
\vand\fare not handled by the opam definition but are with the stdlib one) - it wasn't merged at the time and we have a dedicated module for compatibility functions (https://github.com/ocaml/opam/blob/master/src/core/opamCompat.ml) so it would've felt a bit weird to have a yet-to-be-part-of-the-stdlib function in it
- OpamStd isn't meant to be a mirror of the stdlib in terms of naming, OpamCompat is
Now that it has been merged i can think about it again although i personally feel like it would be better to wait for the release of 5.4 to change the function. In the meantime i'm happy to add a TODO comment to remind ourselves to change it when 5.4 is released.
1e862b7 to
491fc0c
Compare
| (* *) | ||
| (**************************************************************************) | ||
|
|
||
| val of_string : string -> string list |
There was a problem hiding this comment.
The new module should be in its own commit.
There was a problem hiding this comment.
I prefer having both usage and definition in the same commit
| (* *) | ||
| (**************************************************************************) | ||
|
|
||
| val of_string : string -> string list |
There was a problem hiding this comment.
Is there a reason to add a new module instead of adding it in OpamStd?
There was a problem hiding this comment.
In my opinion OpamStd should only be an overlay over the standard library, a Cmd module doesn't fit that. Also the definition is big enough to warrant its own module, and in the future i'd also like to add more functions to this module like to_string.
491fc0c to
67f8596
Compare
4fd3e2a to
ab7b60e
Compare
ab7b60e to
f4735e1
Compare
a85676c to
7f7abbc
Compare
There was a problem hiding this comment.
I've updated the PR, lgtm!
I moved the addition of the new module into its own commit as it is meant to evolve on its own, and I changed its name into OpamShellCommand (OpamCmd is too generic).
I've also added ocaml' 5.4 Char.Ascii.is_white in OpamCompat instead of our own definition (even it is not exactly the same).
You can see the diff in the last force push (the first is the rebase).
7f7abbc to
00074d3
Compare
The new module 'core/opamShellCommand' handle quotes and a proper POSIX shell syntax
00074d3 to
cc66330
Compare
|
ocaml-benchmarks failed due to a lack of disk space on the test machine |
Fixes #5490