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

Fix #1101 #1105

Merged
merged 5 commits into from
Aug 7, 2018
Merged

Fix #1101 #1105

merged 5 commits into from
Aug 7, 2018

Conversation

rgrinberg
Copy link
Member

cc @andreypopp. The code in this main module is getting hairy. We should probably re-organize our CLI soon-ish.

@rgrinberg rgrinberg requested review from emillon and a user August 6, 2018 22:10
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
Copy link

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
Copy link

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

@rgrinberg
Copy link
Member Author

@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>
@rgrinberg rgrinberg merged commit a689081 into ocaml:master Aug 7, 2018
@rgrinberg rgrinberg deleted the 1101 branch August 7, 2018 09:14
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Aug 8, 2018
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)
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.

2 participants