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

bugfix: Make mtags-shared published with full scala version #5380

Merged
merged 2 commits into from
Jun 28, 2023

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jun 27, 2023

This seems to have caused the issues in #5293 by bringing in snapshot version of the scala 3 library

Fixes #5293

This seems to have caused the issues in scalameta#5293 by bringing in snapshot version of the scala 3 library

Also, added a forceVersion parameters to avoid cases like this in the future.
@kasiaMarek
Copy link
Contributor

Sorry, I'm not exactly understanding why using binary caused this. Can you elaborate a bit on that?

@tgodzik
Copy link
Contributor Author

tgodzik commented Jun 27, 2023

Sorry, I'm not exactly understanding why using binary caused this. Can you elaborate a bit on that?

Sorry, I wanted to write a bit more, but got distracted.

mtagsShared library was being released with _3 suffix since that's what it means when we use CrossVersion.binary. The problem with that is that it seems it was using a random Scala 3 version from crossVersions and that was a nightly Scala 3 version.

So the metals was bringing in scala 3 library, which cannot be used from non RC versions and that broke everything when we had Scala 3 libraries on the classpath.

You can see the problem here https://mvnrepository.com/artifact/org.scalameta/mtags-shared_3/0.11.12

mtags3 is a workaround to make scala 3 support work without selecting version in cross-version to Scala 3
@@ -355,6 +355,8 @@ lazy val mtags3 = project
sharedSettings,
mtagsSettings,
Compile / unmanagedSourceDirectories += (ThisBuild / baseDirectory).value / "mtags" / "src" / "main" / "scala",
Compile / unmanagedSourceDirectories += (ThisBuild / baseDirectory).value / "mtags-shared" / "src" / "main" / "scala",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to change this, since we had issues compiling mtagsShared with full version and using it from mtags3. This is just a workaround to support Scala 3 better inside Metals, so this is totally fine.

@tgodzik tgodzik requested a review from ckipp01 June 27, 2023 15:54
@tgodzik tgodzik merged commit 9ef4859 into scalameta:main Jun 28, 2023
24 checks passed
@tgodzik tgodzik deleted the fix-iskra branch June 28, 2023 10:39
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.

Completions in iskra don't seem to work anymore
3 participants