-
Notifications
You must be signed in to change notification settings - Fork 486
fix(odoc): handle build-dir cmti paths in @doc-new fallback (#15290) #15293
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| Reproduction for https://github.com/ocaml/dune/issues/15290 | ||
|
|
||
| Building @doc-new with package management enabled crashes when a locked | ||
| package installs a library via a META file (without a dune-package), because | ||
|
Comment on lines
+3
to
+4
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this needs to be updated?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this prose will need to be updated. |
||
| the odoc rules classify it as a "fallback" directory and try to read the | ||
| cmti directory as if it were outside the build tree. | ||
|
|
||
| $ mkdir external_sources | ||
|
|
||
| $ cat >external_sources/META <<EOF | ||
| > version = "0.0.1" | ||
| > description = "" | ||
| > archive(byte) = "fakefmt.cma" | ||
| > EOF | ||
|
|
||
| $ touch external_sources/fakefmt.cma | ||
|
|
||
| $ cat >external_sources/fakefmt.install <<EOF | ||
| > lib: [ | ||
| > "META" | ||
| > "fakefmt.cma" | ||
| > ] | ||
| > EOF | ||
|
|
||
| $ make_dune_project 3.25 | ||
|
|
||
| $ cat > dune-workspace <<EOF | ||
| > (lang dune 3.25) | ||
| > (pkg enabled) | ||
| > EOF | ||
|
|
||
| $ make_lockdir | ||
| $ make_lockpkg fakefmt <<EOF | ||
| > (version 0.0.1) | ||
| > (source (copy $PWD/external_sources)) | ||
| > EOF | ||
|
|
||
| $ cat > dune-project <<EOF | ||
| > (lang dune 3.25) | ||
| > (package (name foo) (depends fakefmt)) | ||
| > EOF | ||
|
|
||
| $ cat > dune <<EOF | ||
| > (library | ||
| > (public_name foo) | ||
| > (libraries fakefmt)) | ||
| > EOF | ||
|
|
||
| $ touch foo.ml | ||
|
|
||
| $ dune build @doc-new | ||
| File "fakefmt.mld", line 7, characters 0-11: | ||
| Warning: '{!modules ...}' should not be empty. | ||
| File "page-fakefmt.odoc": | ||
| Warning: Failed to lookup child page dummy | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the right/expected outcome? Some remarks explaining what this is demonstrating would be helful.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the correct output as this is coming straight from odoc. There is probably a better way we can assert that odoc ran other than capturing its output. |
||
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.
I guess this is now a regression test, rather than a repro?
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.
Indeed.