-
Notifications
You must be signed in to change notification settings - Fork 415
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
test(melange): show dependency cycle depending on runtime_deps in target dir #7322
Merged
rgrinberg
merged 2 commits into
ocaml:main
from
anmonteiro:anmonteiro/melange-failing-test-eager-runtime-deps
Mar 16, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,11 +53,9 @@ The runtime_dep index.txt was copied to the build folder | |
hello from file | ||
|
||
|
||
|
||
|
||
Test depending on non-existing paths | ||
|
||
$ mkdir another | ||
$ mkdir -p another/another-output/another | ||
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 had only ran the action builder eagerly because of this test, but it looks like creating its target dir in source makes the error pop up again, so it's rather an instance of #7207 and the recursive alias work that's gonna come after it. |
||
$ dune clean | ||
$ cat > another/dune <<EOF | ||
> (melange.emit | ||
|
@@ -66,9 +64,13 @@ Test depending on non-existing paths | |
> (runtime_deps doesnt-exist.txt)) | ||
> EOF | ||
|
||
$ dune build @non-existing-mel --display=short | ||
$ dune build @non-existing-mel | ||
File "another/dune", line 1, characters 0-98: | ||
1 | (melange.emit | ||
2 | (alias non-existing-mel) | ||
3 | (target another-output) | ||
4 | (runtime_deps doesnt-exist.txt)) | ||
Error: No rule found for another/doesnt-exist.txt | ||
-> required by alias another/non-existing-mel | ||
[1] | ||
|
||
Test depending on paths that "escape" the melange.emit directory | ||
|
24 changes: 24 additions & 0 deletions
24
test/blackbox-tests/test-cases/melange/runtime-deps-in-target-dir.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
$ cat > dune-project << EOF | ||
> (lang dune 3.7) | ||
> (using melange 0.1) | ||
> EOF | ||
$ mkdir output | ||
|
||
$ cat > output/foo.txt <<EOF | ||
> hello foo | ||
> EOF | ||
$ cat > dune << EOF | ||
> (melange.emit | ||
> (target output) | ||
> (alias melange) | ||
> (runtime_deps output/foo.txt)) | ||
> EOF | ||
|
||
$ dune build @melange | ||
|
||
$ ls _build/default/output | ||
foo.txt | ||
output | ||
$ ls _build/default/output/output | ||
foo.txt |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 a separate PR, it would be good to switch this test to
sh
unless you need some special bash features.