Skip to content

Conversation

@rgrinberg
Copy link
Member

The This case should also be fixed, but it's part of a bigger issue of finding the locs for failed rules (#903)

Only works for searched programs for now

Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
@rgrinberg rgrinberg requested review from a user and emillon August 4, 2018 10:24
@rgrinberg
Copy link
Member Author

Btw, I think we should standardize Loc.none vs using Loc.t option. Personally, I prefer the latter, as I'd like to enforce correct locations for some parts of the code.

Signed-off-by: Rudi Grinberg <[email protected]>
this will add a location that will point to the rule that failed

Signed-off-by: Rudi Grinberg <[email protected]>
@rgrinberg
Copy link
Member Author

I've added a commit to improve the location for more failed rules. Unfortunately, the locs only point to the stanza itself rather than the dep or the action. To achieve the better locs, we'd need to keep along every path and pass those to wait_for_deps, which is far more invasive. I think it's worth it, but don't have time to commit to making such a deep change. Stanza level locs are good enough for now I think.

Copy link
Collaborator

@emillon emillon left a comment

Choose a reason for hiding this comment

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

Thanks. I agree that per-stanza loc is good enough, and that Loc.t option is clearer.

@rgrinberg rgrinberg merged commit 7c597d8 into ocaml:master Aug 6, 2018
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Aug 6, 2018
CHANGES:

- Fix lookup of command line specified files when `--root` is given. Previously,
  passing in `--root` in conjunction with `--workspace` or `--config` would not
  work correctly (ocaml/dune#997, @rgrinberg)

- Add support for customizing env nodes in workspace files. The `env` stanza is
  now allowed in toplevel position in the workspace file, or for individual
  contexts. This feature requires `(dune lang 1.1)` (ocaml/dune#1038, @rgrinberg)

- Add `enabled_if` field for aliases and tests. This field controls whether the
  test will be ran using a boolean expression language. (ocaml/dune#819, @rgrinberg)

- Make `name`, `names` fields optional when a `public_name`, `public_names`
  field is provided. (ocaml/dune#1041, fix ocaml/dune#1000, @rgrinberg)

- Interpret `X` in `--libdir X` as relative to `PREFIX` when `X` is relative
  (ocaml/dune#1072, fix ocaml/dune#1070, @diml)

- Add support for multi directory libraries by writing
  `(include_subdirs unqualified)` (ocaml/dune#1034, @diml)

- Add `(staged_pps ...)` to support staged ppx rewriters such as ones
  using the OCaml typer like `ppx_import` (ocaml/dune#1080, fix ocaml/dune#193, @diml)

- Use `-opaque` in the `dev` profile. This option trades off binary quality for
  compilation speed when compiling .cmx files. (ocaml/dune#1079, fix ocaml/dune#1058, @rgrinberg)

- Fix placeholders in `dune subst` documentation (ocaml/dune#1090, @emillon, thanks
  @trefis for the bug report)

- Add locations to errors when a missing binary in PATH comes from a dune file
  (ocaml/dune#1096, fixes ocaml/dune#1095, @rgrinberg)
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