-
Notifications
You must be signed in to change notification settings - Fork 155
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
add CI check for the Java 9+ classes #1040
Comments
How about using scala-cli |
If you want to try using this, that's fine. The links provided do not appear to mention how to check a jar for the presence of a file. If implement this, I will use the easier solution of using the unzip command. |
Too complex for me, if let me do this, I will be trying there easy way:
|
seems using |
I think checking the unmanagedSourceDirectores will not work: //sbt with on Java 21
sbt:pekko-stream> show sourceDirectories
[info] * C:\Users\hepin\IdeaProjects\incubator-pekko\stream\src\main\scala
[info] * C:\Users\hepin\IdeaProjects\incubator-pekko\stream\src\main\scala-2.13
[info] * C:\Users\hepin\IdeaProjects\incubator-pekko\stream\src\main\scala-2
[info] * C:\Users\hepin\IdeaProjects\incubator-pekko\stream\src\main\java
[info] * C:\Users\hepin\IdeaProjects\incubator-pekko\stream\src\main\scala-2.13+
[info] * C:\Users\hepin\IdeaProjects\incubator-pekko\stream\target\scala-2.13\src_managed\main |
I spotted that too. Something about the way the Jdk9 stuff works seems not to expose the extra entries in this |
The only benefits of scala-cli jdk9features.sc is flexible but complex enough, need two tools in sync. Sbt generates the scripts and scala cli run it |
an sbt-scripted test is probably the easiest way to implemented this. Such a test can run the You can read about it at https://www.scala-sbt.org/1.x/docs/Testing-sbt-plugins.html |
Try to check the result via the reason for the problem. After some digging, found the reason why CompileJDK9 is broken when using it with OSGi: https://github.com/sbt/sbt-osgi/pull/64/files#diff-1cb4aa05c813d70c1f075d72300bb104f2d4f5f192264b426e982bd335b693e0L47-R47 I use
I have tried using Not sure why, but
|
@Roiocam Yes this I already know, if you want to go down the rabbit hole you can read #1039 (comment) and sbt/sbt-osgi#102 I am about to do a release of sbt-osgi that contains this fix sbt/sbt-osgi#121 which may solve an issue in trying to solve this the easy way (i.e. using |
I have created a fixed PR after this digging, it solves the JDk9 compile for me, can you take a look? Thanks. |
@Roiocam Since your fix is more correct maybe you can also apply a similar fix instead of what was done in #920, i.e. instead of adding the sbt-assembly jar to Might be easiest to modify the PR at #1047 to include both fixes if you can get it to work (if you do so just ping me and I will re-review). |
see #1039
I think we could have a check that uses a
unzip -l
call and that searches the output for expected class files.There are other ways to check too.
The text was updated successfully, but these errors were encountered: