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

Update to Scala 3.3.0, JavaCPP 1.5.9 stable and other dep updates #24

Merged
merged 4 commits into from
Jun 12, 2023

Conversation

sbrunk
Copy link
Owner

@sbrunk sbrunk commented Jun 6, 2023

No description provided.

@sbrunk
Copy link
Owner Author

sbrunk commented Jun 7, 2023

With the Scala 3.3.0 upgrade we're running into a weird issue when running the unidoc plugin:

[error] constructor NoException in trait NoException: (): org.bytedeco.javacpp.annotation.NoException does not have a parameter value

Downgrading to Scala 3.2.2 even with the other dependency updates fixes it.

Needs investigation to find the root cause. I've opened an issue in sbt-unidoc to see if someone there has an idea.

@sbrunk
Copy link
Owner Author

sbrunk commented Jun 12, 2023

Trying to isolate this further. The error is triggered when a Java method annotated with NoException like this with a parameter

public native @NoException(true) DeviceType type();

is called from Scala code. But only if we run unidoc on that code. Regular compilation and Scaladoc seems to be working fine.

@sbrunk
Copy link
Owner Author

sbrunk commented Jun 12, 2023

Running sbt -debug and then calling doc (working) and unidoc (failing) and on a minimized example (single minimal project) for comparison to get some clues.

Both call scaladoc with almost the same arguments now, but in the unidoc call the classpath looks suspicious: We have javacpp-1.5.9 AND javacpp-1.5.4 on the classpath.

So this seems like a bad interaction with the sbt-javacpp plugin which currently defaults to javacpp 1.5.4. We override that in commonSettings: javaCppVersion := "1.5.9, which works for tasks like compile and doc, but apparantly not for unidoc.

@sbrunk
Copy link
Owner Author

sbrunk commented Jun 12, 2023

javaCppVersion needs to be set on the aggregating root task to be picked up by unidoc for some reason.

@sbrunk sbrunk merged commit 3fb3c5d into main Jun 12, 2023
@sbrunk sbrunk deleted the update-deps branch June 13, 2023 15:40
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 this pull request may close these issues.

2 participants