-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat packages with no build command as virtual
Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
- Loading branch information
Showing
28 changed files
with
162 additions
and
13 deletions.
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
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
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
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
12 changes: 12 additions & 0 deletions
12
test/bin/no-build-command.t/repo/packages/depend-with-dune/depend-with-dune.0.1/opam
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,12 @@ | ||
opam-version: "2.0" | ||
dev-repo: "git+https://github.com/test-no-build-command/test" | ||
depends: [ | ||
"with-dune" | ||
] | ||
dev-repo: "git+https://github.com/b/b" | ||
url { | ||
src: "https://test.com/test.tbz" | ||
checksum: [ | ||
"sha256=0000000000000000000000000000000000000000000000000000000000000000" | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
test/bin/no-build-command.t/repo/packages/depend-without-dune/depend-without-dune.0.1/opam
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,12 @@ | ||
opam-version: "2.0" | ||
dev-repo: "git+https://github.com/test-no-build-command/test" | ||
depends: [ | ||
"without-dune" | ||
] | ||
dev-repo: "git+https://github.com/b/b" | ||
url { | ||
src: "https://test.com/test.tbz" | ||
checksum: [ | ||
"sha256=0000000000000000000000000000000000000000000000000000000000000000" | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
test/bin/no-build-command.t/repo/packages/with-dune/with-dune.0.1/opam
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,12 @@ | ||
opam-version: "2.0" | ||
dev-repo: "git+https://github.com/test-no-build-command/test" | ||
depends: [ | ||
"dune" | ||
] | ||
build: [ "dune" "build" ] | ||
url { | ||
src: "https://test.com/test.tbz" | ||
checksum: [ | ||
"sha256=0000000000000000000000000000000000000000000000000000000000000000" | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
test/bin/no-build-command.t/repo/packages/without-dune/without-dune.0.1/opam
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,12 @@ | ||
opam-version: "2.0" | ||
dev-repo: "git+https://github.com/test-no-build-command/test" | ||
depends: [] | ||
build: [ | ||
["make"] | ||
] | ||
url { | ||
src: "https://test.com/test.tbz" | ||
checksum: [ | ||
"sha256=0000000000000000000000000000000000000000000000000000000000000000" | ||
] | ||
} |
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 @@ | ||
opam-version: "2.0" |
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,30 @@ | ||
Test that packages with no build commands and no direct dependency on dune and | ||
no build command are not assumed to not build with dune. | ||
|
||
The repo contains 4 packages: | ||
- with-dune: directly depends on dune and has a build command | ||
- without-dune: doesn't depend on dune and has a build command | ||
- depend-with-dune: depends on with-dune and doesn't have a build command | ||
- depend-without-dune: depends on without-dune and doesn't have a build command | ||
|
||
This test asserts that it's an error to generate a lockfile for a package | ||
depending on depend-without-dune due to the transitive dependency on | ||
without-dune, but that it's not an error to generate a lockfile for a package | ||
which only depends on depend-with-dune, despite the latter not directly | ||
depending on dune. | ||
|
||
We setup the default base repository | ||
|
||
$ gen-minimal-repo | ||
|
||
Attempt to generate a lockfile for a package which depends on | ||
depend-without-dune (this should fail due to the transitive dependency on | ||
without-dune which has a build command but doesn't depend on dune) | ||
|
||
$ opam-monorepo lock test-depend-without-dune.opam 2>&1 | grep -o "Doesn't build with dune" | ||
Doesn't build with dune | ||
|
||
Attempt to generate a lockfile for a package which depends only on | ||
depend-with-dune | ||
|
||
$ opam-monorepo lock test-depend-with-dune.opam > /dev/null |
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,8 @@ | ||
opam-version: "2.0" | ||
depends: [ | ||
"depend-with-dune" | ||
] | ||
x-opam-monorepo-opam-repositories: [ | ||
"file://$OPAM_MONOREPO_CWD/minimal-repo" | ||
"file://$OPAM_MONOREPO_CWD/repo" | ||
] |
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,8 @@ | ||
opam-version: "2.0" | ||
depends: [ | ||
"depend-without-dune" | ||
] | ||
x-opam-monorepo-opam-repositories: [ | ||
"file://$OPAM_MONOREPO_CWD/minimal-repo" | ||
"file://$OPAM_MONOREPO_CWD/repo" | ||
] |
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
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
1 change: 1 addition & 0 deletions
1
test/bin/require-cross-compiling-packages.t/opam-repository/packages/b/b.0.1/opam
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
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