scalac-profiling icon indicating copy to clipboard operation
scalac-profiling copied to clipboard

Cross build for Scala 2.13

Open tanishiking opened this issue 2 years ago • 12 comments

Resolve https://github.com/scalacenter/scalac-profiling/issues/30

Hi, I'm currently working on cross-building this compiler plugin for the latest Scala 2.13 and 2.12, and it is going well so far.

Can someone take a look, and give some instructions on what else should I do to release a new one.

For someone who want to use this plugin

  • check out this branch
  • run sbt> publishLocal
  • add addCompilerPlugin("ch.epfl.scala" % "scalac-profiling" % "1.0.1-SNAPSHOT" cross CrossVersion.full) to your build

TODO

[ ] Cross build modules for both Scala 2.13 and 2.12

  • [x] plugin
    • Now, we can use the publishLocaled version of scalac-profiling compiler plugin by
    • addCompilerPlugin("ch.epfl.scala" % "scalac-profiling" % "1.0.1-SNAPSHOT" cross CrossVersion.full)
  • [x] profiledb
  • [x] sbt-plugin
  • [ ] vscode

I'm not cross-building the sbt plugin and vscode integration in this PR, just because I'd like to focus on cross-building the compiler plugin.

❓ Should I cross-build the sbt plugin and vscode integration in this PR? Maybe we can release the compiler plugin first, and support sbt and vscode integration later

[ ] CI

  • [x] Bare minimum CI
    • [x] Set targets to pull_request and commit: branches: master

[x] Remove forked scalac

  • According to the README, it seems like we don't need it anymore.
  • A forked scalac with patches to collect profiling information. All changes are expected to be ported upstream. This fork is not required anymore because all the changes are already present in Scala 2.12.5.

[ ] Rejuvenate integration tests

  • [x] integration
  • [ ] others
    • [x] circe
    • [x] monocle
    • [ ] shapeless
    • [x] better-files
    • [ ] scalatest

Those modules are referenced from here https://github.com/scalacenter/scalac-profiling/blob/6795bcbb2c65d89bba312f5163667291955fa123/project/BuildPlugin.scala#L59-L77

Current status

  • We can run integration tests in 2.12 in "others"
  • We can't run integration tests in 2.13 in "others"
    • because the referenced projects are old and can't build with Scala 2.13, we have to update the referenced projects.
    • However, if we update the projects, we are no longer able to start the sbt session because
      • our sbt is still 0.13.7.
      • the latest versions of "others" contain sbtPlugins that doesn't support sbt 0.13

What we need to do

  • [x] Update sbt to 1.x
    • [x] To do this, we have to replace sbt-release-early, which isn't published for sbt 1.x (or publish it for sbt 1.x)
    • [x] Rewrite sbt build settings for 1.x
  • [x] Upgrade the referenced projects to the (maybe) latest one, so we can build them from our sbt session
  • [x] Confirm integrations/testOnly circe monocle ... works fine.

❓ Is it ok to remove sbt-early-release to upgrade sbt to 1.x?

Release

  • [ ] Set up release settings

❓ Can somebody from scalacenter do this? I don't have credentials for releasing this plugin.

tanishiking avatar Jan 22 '22 06:01 tanishiking

@sjrd perhaps you could nominate a reviewer...?

SethTisue avatar Feb 02 '22 21:02 SethTisue

I am taking a look at it.

First, answering some questions:

I'm not cross-building the sbt plugin and vscode integration in this PR, just because I'd like to focus on cross-building the compiler plugin.

❓ Should I cross-build the sbt plugin and vscode integration in this PR? Maybe we can release the compiler plugin first, and support sbt and vscode integration later

Is there actually anything that needs to be done in the sbt plugin and vscode integration? The sbt plugin itself must compile with Scala 2.12, since sbt uses Scala 2.12. It cannot be cross-compiled. The plugin should handle projects using Scala 2.13, though. But AFAICT, there is nothing specific to Scala 2.12 projects in the code of the sbt plugin, is there?

For the VS Code integration, I am less sure, but I would also expect that it would be independent of the version of Scala.

CI

IMO this is the very first thing we need to do. Reestablish a functioning CI on GitHub Actions that performs the same tests as before, before we change anything. I will see what I can do, here.

Remove forked scalac

Great! Less forks!

❓ Is it ok to remove sbt-early-release to upgrade sbt to 1.x?

Yes, that's absolutely OK.

Release

  • Set up release settings

❓ Can somebody from scalacenter do this? I don't have credentials for releasing this plugin.

I will see what I can do.

sjrd avatar Feb 04 '22 09:02 sjrd

All right, the CI is up and running on the main branch using GitHub Actions :)

sjrd avatar Feb 04 '22 14:02 sjrd

Thank you, @sjrd I'll work on

  • sbt plugin and vscode
  • integration-test maybe next weekend :)

tanishiking avatar Feb 07 '22 11:02 tanishiking

Current status

Thank you @sjrd for the review (and thank you @SethTisue for pinging)!

Here's the current status of this PR. Though some integration tests don't work, I believe we can go merge and publish this as it's already well-tested. Could you take a look?

Basics

  • [x] Build for cross Scala versions
    • It's already available from source by +publishLocal and addCompilerPlugin("ch.epfl.scala" % "scalac-profiling" % "1.0.1-SNAPSHOT" cross CrossVersion.full) (I already speed-up our internal project's compilation time by 60%, this is plugin is amazing!)
  • [x] Upgraded sbt to 1.6.2
    • (it was needed to re-work the integration tests since most of the projects don't compile with sbt 0.13.x anymore)
    • To do this, dropped sbt-early-release, we need to set up another way for release.

integration tests

  • [x] monocle
  • [x] circe
  • [x] better-files
  • [x] integration
  • [ ] shapeless
    • Couldn't start sbt from the scalac-profiling session because of https://github.com/djspiewak/sbt-github-actions in the Shapeless project 🤔
  • [ ] scalatest
    • Couldn't run integrations/testOnly scalatest: [error] java.io.FileNotFoundException: jvm/scalactic-macro/src/main/resources/org/scalactic/ScalacticBundle.properties (No such file or directory)

sbt plugin

  • [x] Available for sbt 1.x
    • Just dropped 0.13.x support
  • [x] scripted test works
    • Dropped test using external-projects, because
      • It didn't seem like running with sbt 1.x in the CI, and I believe a scripted test with the hand-crafted projects is enough.
      • I tried to test on https://github.com/tanishiking/circe/tree/scalac-profiling-sbt-plugin, but it failed with the following error:
[error] fatal: not a git repository: /private/var/folders/nk/w6pwxvl10w11hq096rksm11m0000gn/T/sbt_3814d83e/../../../../../.git/modules/sbt-plugin/src/sbt-test/external-projects/circe
[error] org.eclipse.jgit.errors.NoWorkTreeException: Bare Repository has neither a working tree, nor an index

vscode-integration

Maybe we can drop this for now?

  • It's from https://github.com/scalacenter/vscode-scala-profiledb/commits/profiledb-integration
  • While vscode integration seems great, vacode-metals have the most share when it comes to vscode integration these days.
    • It might be a good idea to re-work the vscode integration with metals?

tanishiking avatar Mar 01 '22 03:03 tanishiking

Oops tests are failing for testOnly/circe...

tanishiking avatar Mar 01 '22 10:03 tanishiking

NB: Since March 15th a string replace in the project of git://github.com to ssh://[email protected] is needed

henricook avatar Apr 16 '22 14:04 henricook

@tanishiking @henricook Can anyone try help me building this thing locally for 2.13? After fixing this issue, here's what I'm getting when calling sbt +publishLocal

➜  scalac-profiling git:(integration-test) sbt +publishLocal
[info] welcome to sbt 1.6.2 (Oracle Corporation Java 13.0.1)
[info] loading global plugins from /Users/snowak/.sbt/1.0/plugins
[info] loading project definition from /Users/snowak/work/internal/scalac-profiling/project/project
[info] loading settings for project root from build.sbt ...
[info] loading project definition from /Users/snowak/work/internal/scalac-profiling/project
[info] loading settings for project root from build.sbt ...
[info] loading settings for project circe-build from plugins.sbt ...
[info] loading project definition from /Users/snowak/.sbt/1.0/staging/8636b4ee9341dd2fc001/circe/project
[info] loading settings for project circe from build.sbt,version.sbt ...
[info] loading settings for project monocle-build from plugins.sbt ...
[info] loading project definition from /Users/snowak/.sbt/1.0/staging/fe7ddd634d3caec06965/monocle/project
[info] loading settings for project monocle from build.sbt ...
[info] loading settings for project better-files-build from plugins.sbt ...
[info] loading project definition from /Users/snowak/.sbt/1.0/staging/1ac279196824cb55e0b3/better-files/project
[info] loading settings for project root from build.sbt ...
[info] loading settings for project scalatest-build from build.sbt,plugins.sbt ...
[info] loading project definition from /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project
[info] loading settings for project root from build.sbt ...
[info] resolving key references (214026 settings) ...
[info]       _____            __         ______           __
[info]      / ___/_________ _/ /___ _   / ____/__  ____  / /____  _____
[info]      \__ \/ ___/ __ `/ / __ `/  / /   / _ \/ __ \/ __/ _ \/ ___/
[info]     ___/ / /__/ /_/ / / /_/ /  / /___/ /__/ / / / /_/ /__/ /
[info]    /____/\___/\__,_/_/\__,_/   \____/\___/_/ /_/\__/\___/_/
[info]
[info]    ***********************************************************
[info]    ***       Welcome to the build of scalac-profiling      ***
[info]    *** An effort funded by the Scala Center Advisory Board ***
[info]    ***********************************************************
[info]
[warn] there are 18 keys that are not used by any other settings/tasks:
[warn]
[warn] * benchmark / mimaPreviousArtifacts
[warn]   +- /Users/snowak/.sbt/1.0/staging/8636b4ee9341dd2fc001/circe/build.sbt:183
[warn] * common-test / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:171
[warn] * hygieneJS / mimaPreviousArtifacts
[warn]   +- /Users/snowak/.sbt/1.0/staging/8636b4ee9341dd2fc001/circe/build.sbt:183
[warn] * hygieneJVM / mimaPreviousArtifacts
[warn]   +- /Users/snowak/.sbt/1.0/staging/8636b4ee9341dd2fc001/circe/build.sbt:183
[warn] * scalactic-test / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:260
[warn] * scalacticMacro / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:187
[warn] * scalatest-test / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:292
[warn] * scalatestCompatible / javaSourceManaged
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:566
[warn] * scalatestDiagramsTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:309
[warn] * scalatestFeatureSpecTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:316
[warn] * scalatestFlatSpecTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:328
[warn] * scalatestFreeSpecTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:340
[warn] * scalatestFunSpecTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:352
[warn] * scalatestFunSuiteTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:364
[warn] * scalatestPropSpecTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:376
[warn] * scalatestWordSpecTest / projectTitle
[warn]   +- /Users/snowak/.sbt/1.0/staging/d433f32fc0913f8b88a5/scalatest/project/scalatest.scala:388
[warn] * testsJS / mimaPreviousArtifacts
[warn]   +- /Users/snowak/.sbt/1.0/staging/8636b4ee9341dd2fc001/circe/build.sbt:183
[warn] * testsJVM / mimaPreviousArtifacts
[warn]   +- /Users/snowak/.sbt/1.0/staging/8636b4ee9341dd2fc001/circe/build.sbt:183
[warn]
[warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check
[warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key
[info] Defining Global / onLoadMessage, ProjectRef(uri("git://github.com/circe/circe.git#bbcbd53637b601953dfbdb4fd6fb55944c4e476e"), "testsJVM") / Compile / unmanagedJars and 22 others.
[info] The new values will be used by ProjectRef(uri("git://github.com/circe/circe.git#bbcbd53637b601953dfbdb4fd6fb55944c4e476e"), "benchmark") / onLoadMessage, ProjectRef(uri("git://github.com/circe/circe.git#bbcbd53637b601953dfbdb4fd6fb55944c4e476e"), "benchmarkDotty") / onLoadMessage and 557 others.
[info] 	Run `last` for details.
[info] Reapplying settings...
[info] The build integrations are set up.
[info] Setting Scala version to 2.12.11 on 211 projects.
[info] Excluded 25 projects, run ++ 2.12.11 -v for more details.
[info] Reapplying settings...
[info] The build integrations are set up.
[info] Wrote /Users/snowak/work/internal/scalac-profiling/plugin/target/scala-2.12/scalac-profiling_2.12.11-1.0.1-SNAPSHOT.pom
[info] Wrote /Users/snowak/work/internal/scalac-profiling/sbt-plugin/target/scala-2.12/sbt-1.0/sbt-scalac-profiling-1.0.1-SNAPSHOT.pom
[info] Wrote /Users/snowak/work/internal/scalac-profiling/profiledb/target/scala-2.12/profiledb_2.12-1.0.1-SNAPSHOT.pom
[info] Main Scala API documentation to /Users/snowak/work/internal/scalac-profiling/sbt-plugin/target/scala-2.12/sbt-1.0/api...
[info] compiling 3 Scala sources to /Users/snowak/work/internal/scalac-profiling/sbt-plugin/target/scala-2.12/sbt-1.0/classes ...
[info] Main Scala API documentation to /Users/snowak/work/internal/scalac-profiling/profiledb/target/scala-2.12/api...
[info] Main Scala API documentation to /Users/snowak/work/internal/scalac-profiling/plugin/target/scala-2.12/api...
[info] Including from cache: lenses_2.12-0.9.7.jar
[info] Including from cache: sourcecode_2.12-0.1.8.jar
[info] Including from cache: fansi_2.12-0.2.7.jar
[info] Including from cache: pprint_2.12-0.5.7.jar
[info] Including from cache: fastparse_2.12-2.1.3.jar
[info] Including from cache: protobuf-java-3.8.0.jar
[info] Including from cache: scalapb-runtime_2.12-0.9.7.jar
[info] Checking every *.class/*.jar file's SHA-1.
[info] Merging files...
[warn] Merging 'META-INF/MANIFEST.MF' with strategy 'discard'
[warn] Merging 'META-INF/maven/com.google.protobuf/protobuf-java/pom.properties' with strategy 'discard'
[warn] Merging 'META-INF/maven/com.google.protobuf/protobuf-java/pom.xml' with strategy 'discard'
[warn] Strategy 'discard' was applied to 3 files
[info] Assembly up to date: /Users/snowak/work/internal/scalac-profiling/plugin/target/scala-2.12/scalac-profiling-assembly-1.0.1-SNAPSHOT.jar
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:45:19: type nowarn is not a member of package annotation
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:45:19: type nowarn is not a member of package annotation
[error]     Keys.commands += BuildDefaults.profilingWarmupCommand,
[error]     Keys.commands += BuildDefaults.profilingWarmupCommand,
[error]                   ^
[error]                   ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:46:39: type nowarn is not a member of package annotation
[error]     BuildKeys.profilingWarmupDuration := BuildDefaults.profilingWarmupDuration.value,
[error]                                       ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:46:39: type nowarn is not a member of package annotation
[error]     BuildKeys.profilingWarmupDuration := BuildDefaults.profilingWarmupDuration.value,
[error]                                       ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:47:33: type nowarn is not a member of package annotation
[error]     Keys.concurrentRestrictions += Tags.limit(WarmupTag, 1),
[error]                                 ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:47:33: type nowarn is not a member of package annotation
[error]     Keys.concurrentRestrictions += Tags.limit(WarmupTag, 1),
[error]                                 ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:48:26: type nowarn is not a member of package annotation
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:48:26: type nowarn is not a member of package annotation
[error]     Keys.progressReports := {
[error]                          ^
[error]     Keys.progressReports := {
[error]                          ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:52:42: type nowarn is not a member of package annotation
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:52:42: type nowarn is not a member of package annotation
[error]     Keys.progressReports / Keys.logLevel := sbt.Level.Info
[error]     Keys.progressReports / Keys.logLevel := sbt.Level.Info
[error]                                          ^
[error]                                          ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:57:49: type nowarn is not a member of package annotation
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:57:49: type nowarn is not a member of package annotation
[error]     Compile / BuildKeys.profilingWarmupCompiler :=
[error]     Compile / BuildKeys.profilingWarmupCompiler :=
[error]                                                 ^
[error]                                                 ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:59:46: type nowarn is not a member of package annotation
[error]     Test / BuildKeys.profilingWarmupCompiler :=
[error]                                              ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:59:46: type nowarn is not a member of package annotation
[error]     Test / BuildKeys.profilingWarmupCompiler :=
[error]                                              ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:68:72: type nowarn is not a member of package annotation
[error]     val profilingWarmupCompiler: Def.Initialize[Task[Unit]] = Def.task {
[error]                                                                        ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:68:72: type nowarn is not a member of package annotation
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:98:67: type nowarn is not a member of package annotation
[error]     val profilingWarmupCompiler: Def.Initialize[Task[Unit]] = Def.task {
[error]     val profilingWarmupDuration: Def.Initialize[Int] = Def.setting(60)
[error]                                                                        ^
[error]                                                                   ^
[error] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:98:67: type nowarn is not a member of package annotation
[error]     val profilingWarmupDuration: Def.Initialize[Int] = Def.setting(60)
[error]                                                                   ^
[warn] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:38:30: Unused import
[warn] /Users/snowak/work/internal/scalac-profiling/sbt-plugin/src/main/scala/sbt/ch/epfl/scala/ProfilingSbtPlugin.scala:38:30: Unused import
[warn]   import sbt.{Compile, Test, ConsoleLogger, Project, Task, ScopedKey, Tags}
[warn]   import sbt.{Compile, Test, ConsoleLogger, Project, Task, ScopedKey, Tags}
[warn]                              ^
[warn]                              ^
[info] No documentation generated with unsuccessful compiler run
[warn] one warning found
[error] 9 errors found
[warn] one warning found
[error] 9 errors found
model contains 50 documentable templates
model contains 28 documentable templates
[info] Main Scala API documentation successful.
[info] :: delivering :: ch.epfl.scala#scalac-profiling_2.12.11;1.0.1-SNAPSHOT :: 1.0.1-SNAPSHOT :: integration :: Fri May 27 15:30:24 CEST 2022
[info] 	delivering ivy file to /Users/snowak/work/internal/scalac-profiling/plugin/target/scala-2.12/ivy-1.0.1-SNAPSHOT.xml
[info] 	published scalac-profiling_2.12.11 to /Users/snowak/.ivy2/local/ch.epfl.scala/scalac-profiling_2.12.11/1.0.1-SNAPSHOT/poms/scalac-profiling_2.12.11.pom
[info] 	published scalac-profiling_2.12.11 to /Users/snowak/.ivy2/local/ch.epfl.scala/scalac-profiling_2.12.11/1.0.1-SNAPSHOT/jars/scalac-profiling_2.12.11.jar
[info] 	published scalac-profiling_2.12.11 to /Users/snowak/.ivy2/local/ch.epfl.scala/scalac-profiling_2.12.11/1.0.1-SNAPSHOT/srcs/scalac-profiling_2.12.11-sources.jar
[info] 	published scalac-profiling_2.12.11 to /Users/snowak/.ivy2/local/ch.epfl.scala/scalac-profiling_2.12.11/1.0.1-SNAPSHOT/docs/scalac-profiling_2.12.11-javadoc.jar
[info] 	published ivy to /Users/snowak/.ivy2/local/ch.epfl.scala/scalac-profiling_2.12.11/1.0.1-SNAPSHOT/ivys/ivy.xml
[info] Main Scala API documentation successful.
[info] :: delivering :: ch.epfl.scala#profiledb_2.12;1.0.1-SNAPSHOT :: 1.0.1-SNAPSHOT :: integration :: Fri May 27 15:30:25 CEST 2022
[info] 	delivering ivy file to /Users/snowak/work/internal/scalac-profiling/profiledb/target/scala-2.12/ivy-1.0.1-SNAPSHOT.xml
[info] 	published profiledb_2.12 to /Users/snowak/.ivy2/local/ch.epfl.scala/profiledb_2.12/1.0.1-SNAPSHOT/poms/profiledb_2.12.pom
[info] 	published profiledb_2.12 to /Users/snowak/.ivy2/local/ch.epfl.scala/profiledb_2.12/1.0.1-SNAPSHOT/jars/profiledb_2.12.jar
[info] 	published profiledb_2.12 to /Users/snowak/.ivy2/local/ch.epfl.scala/profiledb_2.12/1.0.1-SNAPSHOT/srcs/profiledb_2.12-sources.jar
[info] 	published profiledb_2.12 to /Users/snowak/.ivy2/local/ch.epfl.scala/profiledb_2.12/1.0.1-SNAPSHOT/docs/profiledb_2.12-javadoc.jar
[info] 	published ivy to /Users/snowak/.ivy2/local/ch.epfl.scala/profiledb_2.12/1.0.1-SNAPSHOT/ivys/ivy.xml
[error] Scaladoc generation failed
[error] 	at xsbt.Runner.run(ScaladocBridge.scala:50)
[error] 	at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error] 	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:154)
[error] 	at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
[error] 	at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error] 	at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error] 	at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error] 	at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error] 	at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error] 	at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error] 	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] 	at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error] 	at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error] 	at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2159)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:830)
[error] (profilingSbtPlugin / Compile / compileIncremental) Compilation failed
[error] (profilingSbtPlugin / Compile / doc) Scaladoc generation failed
[error] Total time: 6 s, completed May 27, 2022, 3:30:25 PM

slnowak avatar May 27 '22 13:05 slnowak

@slnowak your log shows the build failing during the 2.12 build. if you only care about 2.13, then instead of +publishLocal, do ++2.13.8 followed by publishLocal. this succeeded for me locally when I tried it just now.

but also, I found that the 2.12 build is actually fixable with this build.sbt change:

-val bin212 = Seq("2.12.15", "2.12.14", "2.12.13", "2.12.12", "2.12.11")
+val bin212 = Seq("2.12.15", "2.12.14", "2.12.13")

it's because @nowarn wasn't added to Scala 2.12 until 2.12.13. I think it's fine to drop older 2.12.x versions from the crossbuild.

@julienrf can you grant me merge rights in this repo? I can't fully take over responsibility for this repo, but I'm certainly willing to merge this PR, once it's in a mergeable state

one additional bit of build work that ought to happen before merge is to remove sbt-dotty

SethTisue avatar May 28 '22 06:05 SethTisue

Is it ok to remove sbt-early-release to upgrade sbt to 1.x?

Yes, you can remove it.

You could replace it with sbt-ci-release, or if you don't care to tackle that right now, open an issue asking for a volunteer to submit the addition of sbt-ci-release in its own PR.

SethTisue avatar May 28 '22 06:05 SethTisue

Sorry, I'd been away from this PR, current status: it should work both for 2.12 and 2.13, but struggling to restore the integration tests (as we need to update the repositories and run compile from this repo).

tanishiking avatar May 29 '22 06:05 tanishiking

Thank you Seth for mentioning me, I wasn’t aware of this PR. Thank you Rikito for working on this! I didn’t read the full discussion, how can we help you?

julienrf avatar May 31 '22 07:05 julienrf

@tanishiking any interest in returning to this...?

SethTisue avatar Feb 28 '23 02:02 SethTisue