-
Notifications
You must be signed in to change notification settings - Fork 144
Enable including test
scope inputs when publishing
#3483
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
Comments
@majk-p ok, so first things first, this is not a bug and it's meant to work this way. The However, I agree we should enable publishing test sources, both to be included in a common fat JAR (behind a flag, like While this issue is not a duplicate per se, the solution to this is the same as: We have a Will be treated as a feature request, thanks for raising. |
test
scope inputs when publishing
@Gedochao Thanks for the reply. I agree that the What I think is a bit misleading here is how the |
@ghostbuster91 Anything with a directory named |
I get that. I am only saying that this is quite uncommon in the scala land and I cannot recall any other tool that does that. |
Version(s) 1.6.1
Describe the bug
When packaging sources with
scala-cli publish
, sources withintest
directories are omitted even when they contain regular sources that are not tests. This can lead to missing classes in published jars.Additionally, this behavior is not documented under https://scala-cli.virtuslab.org/docs/commands/publishing/publish
To Reproduce
Clone https://github.com/majk-p/scala-cli-publish-test and run ./package-and-check.sh
Expected behaviour
I appreciate that publishing is an experimental feature and I see how this might just be a very simple implementation for skipping test sources. I ideal world Scala CLI would simply knew if the file contains references to test framework but implementing that sounds impractical for a niche issue like this one.
A practical solution that would be backwards compatible could be a setting like "always-include-path" that would include a path (one or more) that won't be filtered out.
Anything that can help me include
./test/testapi.scala
from the reproduction repo in published jar will be enough.The text was updated successfully, but these errors were encountered: