-
Notifications
You must be signed in to change notification settings - Fork 413
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
Fix #1101 #1105
Fix #1101 #1105
Conversation
bin/main.ml
Outdated
@@ -658,75 +658,87 @@ let check_path contexts = | |||
name | |||
(hint name (String.Set.to_list contexts)) | |||
|
|||
let resolve_targets ~log common (setup : Main.setup) user_targets = | |||
let resolve_path path ~(setup : Main.setup) = | |||
let check_path = check_path setup.contexts in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In both resolve_path
and resolve_target
, check_path
is now used only once, so we don't need to partially apply it anymore
bin/main.ml
Outdated
) | ||
in | ||
List.map user_targets ~f:(function | ||
| `String s -> resolve_target common ~setup s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use a plain variant here? I find polymorphic variants more error prone and they provide no real benefit here
@diml good call. i addressed your review |
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
Split it into 3 functinos * Resolve 1 targets * Do logging * Resolve all targets Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
Do not attempt to convert string -> path -> string as this loses information Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
CHANGES: - Fix `$ jbuilder --dev` (ocaml/dune#1104, fixes ocaml/dune#1103, @rgrinberg) - Fix dune exec when `--build-dir` is set to an absolute path (ocaml/dune#1105, fixes ocaml/dune#1101, @rgrinberg) - Fix duplicate profile argument in suggested command when an external library is missing (ocaml/dune#1109, ocaml/dune#1106, @emillon) - `-opaque` wasn't correctly being added to modules without an interface. (ocaml/dune#1108, fix ocaml/dune#1107, @rgrinberg) - Fix validation of library `name` fields and make sure this validation also applies when the `name` is derived from the `public_name`. (ocaml/dune#1110, fix ocaml/dune#1102, @rgrinberg) - Fix a bug causing the toplevel `env` stanza in the workspace file to be ignored when at least one context had `(merlin)` (ocaml/dune#1114, @diml)
cc @andreypopp. The code in this main module is getting hairy. We should probably re-organize our CLI soon-ish.