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

scala 2.13.9 #1676

Merged
merged 2 commits into from Sep 20, 2022
Merged

scala 2.13.9 #1676

merged 2 commits into from Sep 20, 2022

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Sep 20, 2022

Fixes #1673
Towards #1675

if (isScala3.value) "-Xtarget:8"
else "-target:jvm-1.8"
if (isScala3.value) Seq("-Xtarget:8")
else if (isScala213.value) Seq("-release", "8")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

- bring back custom mimaPreviousArtifacts
- avoid "missing dependency" on artifacts with full scala version
- remove workaround no longer needed
@bjaglin bjaglin marked this pull request as ready for review September 20, 2022 21:51
@bjaglin bjaglin merged commit e3d4b24 into scalacenter:main Sep 20, 2022
override def requires = JvmPlugin && IvyPlugin
override def requires =
JvmPlugin &&
SbtVersionPolicyPlugin // don't let it override our mimaPreviousArtifacts
Copy link
Collaborator Author

@bjaglin bjaglin Sep 20, 2022

Choose a reason for hiding this comment

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

By changing the order of plugin execution, this had a sneaky effect on publishing releases to sonatype as the (incorrect) publishTo defined in ScalafixBuildPlugin was effectively ignored until now.

 [info] publishTo
-[info] Some(FileRepository(sonatype-local-bundle, Patterns(ivyPatterns=Vector(), artifactPatterns=Vector(/home/brice/git/opensource/scalafix/target/sonatype-staging/0.10.2/[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext]), isMavenCompatible=true, descriptorOptional=false, skipConsistencyCheck=false), FileConfiguration(true, None)))
+[info] Some(sonatype-staging: https://oss.sonatype.org/service/local/staging/deploy/maven2)

This prevents publishing releases

2022-09-20 22:12:38.036Z  info [SonatypeService] sonatypeRepository  : https://oss.sonatype.org/service/local  - (SonatypeService.scala:26)
2022-09-20 22:12:38.041Z  info [SonatypeService] sonatypeProfileName : ch.epfl.scala  - (SonatypeService.scala:27)
[info] Preparing a new staging repository for [sbt-sonatype] scalafix 0.10.3
2022-09-20 22:12:38.043Z  info [SonatypeClient] Reading staging repository profiles...  - (SonatypeClient.scala:108)
2022-09-20 22:12:40.251Z  info [SonatypeClient] Reading staging profiles...  - (SonatypeClient.scala:120)
2022-09-20 22:12:43.932Z  info [SonatypeClient] Creating a staging repository in profile ch.epfl.scala with a description key: [sbt-sonatype] scalafix 0.10.3  - (SonatypeClient.scala:126)
2022-09-20 22:12:51.705Z  info [SonatypeClient] Created successfully: chepflscala-2407  - (SonatypeClient.scala:139)
2022-09-20 22:13:00.349Z  info [SonatypeService] Found a previous staging repository [chepflscala-2405] status:open, profile:ch.epfl.scala(17f10a3293d844) description: [sbt-sonatype] scalafix 0.10.3  - (SonatypeService.scala:103)
2022-09-20 22:13:00.350Z  info [SonatypeClient] Dropping staging repository [chepflscala-2405] status:open, profile:ch.epfl.scala(17f10a3293d844) description: [sbt-sonatype] scalafix 0.10.3  - (SonatypeClient.scala:229)
2022-09-20 22:13:00.430Z  info [SonatypeService] Dropped successfully: chepflscala-2405  - (SonatypeService.scala:175)
2022-09-20 22:13:00.454Z error [Sonatype] 
java.io.IOException: Supplied file /home/runner/work/scalafix/scalafix/target/sonatype-staging/0.10.3 is a not an existing directory!
	at org.sonatype.spice.zapper.fs.AbstractDirectory.<init>(AbstractDirectory.java:32)

https://github.com/scalacenter/scalafix/actions/runs/3093699216/jobs/5006465269

#1678 (review) should address that

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it’s a problem that comes from sbt-version-policy? Please let me know if I need to fix something there :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, thanks for chiming in! The publishTo issue was unrelated, the build was clearly wrong, and the change in plugin order accidentally made it visible. We can follow up on scalacenter/sbt-version-policy#138 though.

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.

Fix binary compatibility check when bumping scala version
2 participants