-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor implementation to use public scip-java API #100
base: main
Are you sure you want to change the base?
Conversation
Previously, mill-scip referenced internal APIs from scip-java, which would have breaking changes between patch versions. This commit refactors the implementation to replace usages of unstable internal APIs with more stable APIs.
@ckipp01 what is the best way to test a change like this? |
Ahhh, I didn't realize these were all meant to be internal 😬. Thanks so much for the PR!
Should run the integration tests for both the 10.x and 11.x series of Mill. |
) | ||
|
||
ScipSemanticdb.run(options) | ||
val exit = ScipJava.app.run(List("index-semanticdb", "--cwd", workspace.toString, "--output", scipFile.toString, dest.toString)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the classpath entries aren't being included here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The classpath is automatically inferred from javacopts.txt
, which is written to the targetroot
I opened a PR in scip-java to move internal APIs under the |
The integration tests are failing with a pprint bincompat issue
|
I'll try to figure this out. I know a while back I looked at updating the com.lihaoyi stuff in scip-java since it's pretty old, but then I hit on issues with it using moped because the deps over there are even older. It might be hard to get this right assuming that Mill is using the latest while the much older stuff is coming in through scip-java. |
I found local uncommitted diff in moped that updates multiple dependencies together. IIRC, I stopped after failing to resolve breaking changes in upickle APIs. It's probably solvable, I didn't spend much time on it. The diff is here https://github.com/scalameta/moped/compare/main...olafurpg:moped:olafurpg/update-everything?expand=1 If we can get moped updated, then it should be trivial to update scip-java since the pprint/upickle stuff is just implementation details of moped. |
One possible solution is for mill-scip to load scip-java in an isolated classloader. scip-java is intentionally designed as a cli application, not a library APIs. By focusing on being an application, scip-java allows itself to more liberally add dependencies that would be good to avoid if it was designed as a library. |
I'm open to adding a |
Previously, mill-scip referenced internal APIs from scip-java, which would have breaking changes between patch versions. This commit refactors the implementation to replace usages of unstable internal APIs with more stable APIs.