diff options
Diffstat (limited to 'main/test/resources/examples/foreign/conflict')
-rw-r--r-- | main/test/resources/examples/foreign/conflict/build.sc | 24 | ||||
-rw-r--r-- | main/test/resources/examples/foreign/conflict/inner/build.sc | 4 |
2 files changed, 28 insertions, 0 deletions
diff --git a/main/test/resources/examples/foreign/conflict/build.sc b/main/test/resources/examples/foreign/conflict/build.sc new file mode 100644 index 00000000..d6c08b81 --- /dev/null +++ b/main/test/resources/examples/foreign/conflict/build.sc @@ -0,0 +1,24 @@ +import $file.inner.{build => innerBuild} +import mill._ +import ammonite.ops._ + +// In this build, we have a local module targeting +// the 'inner sub-directory, and an imported foreign +// module in that same directory. Their sourcePaths +// should be the same, but their dest paths should +// be different to avoid both modules over-writing +// each other's caches . + +def checkPaths : T[Unit] = T { + if (innerBuild.millSourcePath != inner.millSourcePath) + throw new Exception("Source paths should be the same") +} + +def checkDests : T[Unit] = T { + if (innerBuild.selfDest == inner.selfDest) + throw new Exception("Dest paths should be different") +} + +object inner extends mill.Module { + def selfDest = T { T.ctx().dest / up / up } +} diff --git a/main/test/resources/examples/foreign/conflict/inner/build.sc b/main/test/resources/examples/foreign/conflict/inner/build.sc new file mode 100644 index 00000000..729f4f3d --- /dev/null +++ b/main/test/resources/examples/foreign/conflict/inner/build.sc @@ -0,0 +1,4 @@ +import mill._ +import ammonite.ops._ + +def selfDest = T { T.ctx().dest / up / up } |