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

"dune top" fixes + improvements #4242

Merged
merged 4 commits into from
Mar 5, 2021
Merged

"dune top" fixes + improvements #4242

merged 4 commits into from
Mar 5, 2021

Conversation

nojb
Copy link
Collaborator

@nojb nojb commented Feb 17, 2021

In this PR:

  • Fix the escaping of the toplevel directives emitted by dune top
  • Include the directories containing C stubs for those libraries which have them in the list of #directory directives. This allows the toplevel to locate and load said C stubs, which results in a seamless experience in many cases.

Fixes #4231

Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

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

Looks good. Can we get

  • Some tests demonstrating fixes
  • Changes entries

@nojb
Copy link
Collaborator Author

nojb commented Feb 17, 2021

Looks good. Can we get

  • Some tests demonstrating fixes
  • Changes entries

Done! BTW, this could also go into 2.8.3...

@rgrinberg rgrinberg added this to the 2.8.3 milestone Feb 17, 2021
@nojb
Copy link
Collaborator Author

nojb commented Feb 17, 2021

I pushed one more commit so that the toplevel stanza also includes the directories needed to find C stubs.

@nojb nojb force-pushed the top_fixes branch 3 times, most recently from eeec16b to 06ebbc5 Compare February 17, 2021 21:34
@rgrinberg
Copy link
Member

@nojb anything blocking this PR?

Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
@nojb
Copy link
Collaborator Author

nojb commented Mar 5, 2021

@nojb anything blocking this PR?

No, thanks for the ping. Will merge once CI passes.

nojb added 3 commits March 5, 2021 10:49
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
@nojb nojb merged commit 6a21e03 into ocaml:main Mar 5, 2021
@nojb nojb deleted the top_fixes branch March 5, 2021 10:23
rgrinberg pushed a commit that referenced this pull request Mar 7, 2021
* dune top: fix escaping
* dune top: include directories to find dlls
* Add test
* CHANGES.md

Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Mar 7, 2021
…ne-action-plugin, dune-private-libs and dune-glob (2.8.3)

CHANGES:

- Make `patdiff` show refined diffs (ocaml/dune#4257, fixes ocaml/dune#4254, @hakuch)

- Fixed a bug that could result in needless recompilation under Windows due to
  case differences in the result of `Sys.getcwd` (observed under `emacs`).
  (ocaml/dune#3966, @nojb).

- Restore compatibility with Coq < 8.10 for coq-lang < 0.3 , document
  that `(using coq 0.3)` does require Coq 8.10 at least (ocaml/dune#4224, fixes
  ocaml/dune#4142, @ejgallego)

- Add a META rule for 'compiler-libs.native-toplevel' (ocaml/dune#4175, @AltGr)

- No longer call `chmod` on symbolic links (fixes ocaml/dune#4195, @dannywillems)

- Dune no longer automatically create or edit `dune-project` files
  (ocaml/dune#4239, fixes ocaml/dune#4108, @jeremiedimino)

- Have `dune` communicate the location of the standard library directory to
  `merlin` (ocaml/dune#4211, fixes ocaml/dune#4188, @nojb)

- Workaround incorrect exception raised by Unix.utimes (OCaml PR#8857) in
  Path.touch on Windows (ocaml/dune#4223, @dra27)

- `dune ocaml-merlin` is now able to provide configuration for source files in
  the `_build` directory. (ocaml/dune#4274, @voodoos)

- Automatically delete left-over Merlin files when rebuilding for the first time
  a project previously built with Dune `<= 2.7`. (ocaml/dune#4261, @voodoos, @aalekseyev)

- Fix `ppx.exe` being compiled for the wrong target when cross-compiling
  (ocaml/dune#3751, fixes ocaml/dune#3698, @toots)

- `dune top` correctly escapes the generated toplevel directives, and make it
  easier for `dune top` to locate C stubs associated to concerned libraries.
  (ocaml/dune#4242, fixes ocaml/dune#4231, @nojb)

- Do not pass include directories containing native objects when compiling
  bytecode (ocaml/dune#4200, @nojb)
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.

"dune top" output does not property escape strings
2 participants