-
Notifications
You must be signed in to change notification settings - Fork 1k
remote cache does not work with "compiler plugin" + "different coursier home(different OS or user.home)" #6027
Copy link
Copy link
Closed
Labels
Milestone
Description
steps
xuwei-k/sbt-remote-cache-compiler-plugin@d4b466c
A.scala
package example
class Abuild.sbt
name := "my-project"
scalaVersion := "2.13.3"
pushRemoteCacheTo := Some(
MavenCache("local-cache", (ThisBuild / baseDirectory).value / "my_remote_cache")
)
remoteCacheId := "fixed-id"
remoteCacheIdCandidates := Seq(remoteCacheId.value)
pushRemoteCacheConfiguration := pushRemoteCacheConfiguration.value.withOverwrite(true)
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.0" cross CrossVersion.full)project/build.properties
sbt.version=1.4.1run:
sbt pushRemoteCache
rm -rf target
sbt -Dsbt.coursier.home=my_coursier_home pullRemoteCache compile
problem
default coursier home dir
- on Linux, ~/.cache/coursier/v1. This also applies to Linux-based CI environments, and FreeBSD too.
- on OS X, ~/Library/Caches/Coursier/v1.
- on Windows, %LOCALAPPDATA%\Coursier\Cache\v1, which, for user Alex, typically corresponds to C:\Users\Alex\AppData\Local\Coursier\Cache\v1.
build log
remote cache does not works. recompile 😢
+ sbt -Dsbt.coursier.home=my_coursier_home pullRemoteCache compile
[info] welcome to sbt 1.4.1 (AdoptOpenJDK Java 1.8.0_272)
[info] loading project definition from /home/runner/work/sbt-remote-cache-compiler-plugin/sbt-remote-cache-compiler-plugin/project
[info] loading settings for project sbt-remote-cache-compiler-plugin from build.sbt ...
[info] set current project to my-project (in build file:/home/runner/work/sbt-remote-cache-compiler-plugin/sbt-remote-cache-compiler-plugin/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] remote cache artifact extracted for Some(cached-compile)
[info] remote cache artifact extracted for Some(cached-test)
[success] Total time: 1 s, completed Oct 26, 2020 5:56:57 AM
[info] compiling 1 Scala source to /home/runner/work/sbt-remote-cache-compiler-plugin/sbt-remote-cache-compiler-plugin/target/scala-2.13/classes ...
[info] done compiling
[success] Total time: 5 s, completed Oct 26, 2020 5:57:02 AM
Could not use retrieveManaged 😢 #5078
expectation
don't recompile
notes
sbt/main/src/main/scala/sbt/Defaults.scala
Line 3848 in 7a7bc5d
| plugins.map("-Xplugin:" + _.toAbsolutePath.toString).toSeq |
sbt use absolute path for -Xplugin: args.
Reactions are currently unavailable