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

Wrong paths for examples in README #3883

Closed
cmontemuino opened this issue Nov 1, 2024 · 3 comments · Fixed by #3902
Closed

Wrong paths for examples in README #3883

cmontemuino opened this issue Nov 1, 2024 · 3 comments · Fixed by #3902
Milestone

Comments

@cmontemuino
Copy link
Contributor

cmontemuino commented Nov 1, 2024

Following example in https://github.com/com-lihaoyi/mill#sub-process-tests-without-packagingpublishing

./mill "example.basic[1-simple].local"
[61/61] =================================================================================== example.basic[1-simple].local ==================================================================================== 1s
Cannot resolve example.basic[1-simple].local. Try `mill resolve example._` to see what's available.

I've tried with ./mill "example.scalalib.basic[1-simple].local", but I get an error:

# ...
[2703/2703] example.scalalib.basic[1-simple].local.test
[2703] -------------------------------- Running Tests --------------------------------
[2703] Copying integration test sources from /Users/me/code/ext/com-lihaoyi/mill/example/scalalib/basic/1-simple to /Users/me/code/ext/com-lihaoyi/mill/out/example/scalalib/basic/1-simple/local/test.d
est/sandbox/run-1
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/scalalib/basic/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker shutdown
[2703] X mill.testkit.UtestExampleTestSuite.exampleTest 640ms
[2703]   java.nio.file.FileSystemException: /Users/me/code/ext/com-lihaoyi/mill/example/scalalib/basic/1-simple/out/mill-server/ez2saHzAH9zAO6+DySkk1aO/VUs=-1/mill-1ad9d149-io: Operation not supported on s
ocket
[2703]     sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
[2703]     sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
[2703]     sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
[2703]     sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:233)
[2703]     sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:603)
[2703]     sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:257)
[2703]     java.nio.file.Files.copy(Files.java:1305)
[2703]     os.copy$.copyOne$1(FileOps.scala:200)
[2703]     os.copy$.$anonfun$apply$3(FileOps.scala:205)
[2703]     scala.collection.immutable.ArraySeq.map(ArraySeq.scala:75)
[2703]     scala.collection.immutable.ArraySeq.map(ArraySeq.scala:35)
[2703]     os.copy$.apply(FileOps.scala:205)
[2703]     os.copy$into$.apply(FileOps.scala:252)
[2703]     mill.testkit.IntegrationTesterBase.$anonfun$initWorkspace$5(IntegrationTesterBase.scala:54)
[2703]     mill.testkit.IntegrationTesterBase.$anonfun$initWorkspace$5$adapted(IntegrationTesterBase.scala:54)
[2703]     scala.collection.IterableOnceOps.foreach(IterableOnce.scala:619)
[2703]     scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:617)
[2703]     scala.collection.AbstractIterable.foreach(Iterable.scala:935)
[2703]     mill.testkit.IntegrationTesterBase.initWorkspace(IntegrationTesterBase.scala:54)
[2703]     mill.testkit.IntegrationTesterBase.initWorkspace$(IntegrationTesterBase.scala:32)
[2703]     mill.testkit.ExampleTester.initWorkspace(ExampleTester.scala:71)
[2703]     mill.testkit.ExampleTester.run(ExampleTester.scala:187)
[2703]     mill.testkit.ExampleTester$.run(ExampleTester.scala:61)
[2703]     mill.testkit.UtestExampleTestSuite$.$anonfun$tests$3(UtestExampleTestSuite.scala:19)
[2703]     scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[2703]     mill.api.Retry.$anonfun$apply$1(Retry.scala:32)
[2703]     mill.api.Retry.$anonfun$apply$1$adapted(Retry.scala:32)
[2703]     mill.api.Retry.$anonfun$indexed$2(Retry.scala:42)
[2703]     scala.util.Try$.apply(Try.scala:217)
[2703]     mill.api.Retry.$anonfun$indexed$1(Retry.scala:42)
[2703]     java.lang.Thread.run(Thread.java:840)
[2703] Tests: 1, Passed: 0, Failed: 1
[2703/2703] ========================================================================== example.scalalib.basic[1-simple].local =============================================================================== 28s
1 tasks failed
example.scalalib.basic[1-simple].local.test 1 tests failed:
  mill.testkit.UtestExampleTestSuite mill.testkit.UtestExampleTestSuite.exampleTest

This one works well:

./mill "example.fundamentals.cross[1-simple].local"
[2703/2703] example.fundamentals.cross[1-simple].local.test
[2703] -------------------------------- Running Tests --------------------------------
[2703] Copying integration test sources from /Users/me/code/ext/com-lihaoyi/mill/example/fundamentals/cross/1-simple to /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/loca
l/test.dest/sandbox/run-1
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker show foo[2.10].suffix
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker show foo[2.10].bigSuffix
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker show foo[2.10].sources
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker show foo[2.12].suffix
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker show foo[2.12].bigSuffix
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker show foo[2.12].sources
[2703] /Users/me/code/ext/com-lihaoyi/mill/out/example/fundamentals/cross/1-simple/local/test.dest/sandbox/run-1> ./mill --disable-ticker shutdown
[2703] + mill.testkit.UtestExampleTestSuite.exampleTest 12000ms
[2703] Tests: 1, Passed: 1, Failed: 0
[2703/2703] ======================================================================== example.fundamentals.cross[1-simple].local ============================================================================= 12s
@cmontemuino
Copy link
Contributor Author

It looks like a trivial PR ahead. I just need confirmation the replacement is ./mill "example.fundamentals.cross[1-simple].local"

@lihaoyi
Copy link
Member

lihaoyi commented Nov 1, 2024

@cmontemuino let's use ./mill "example.javalib.basic[1-simple].local", but yeah should be an easy fix if you're up for making a PR!

@cmontemuino
Copy link
Contributor Author

@cmontemuino let's use ./mill "example.javalib.basic[1-simple].local", but yeah should be an easy fix if you're up for making a PR!

Here it is the PR: #3902

lihaoyi pushed a commit that referenced this issue Nov 4, 2024
closes #3883

Signed-off-by: cmontemuino <1761056+cmontemuino@users.noreply.github.com>
@lefou lefou added this to the 0.12.2 milestone Nov 4, 2024
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 a pull request may close this issue.

3 participants