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

can't override isChanging for SNAPSHOT dependencies #1219

Closed
OlegYch opened this issue Mar 27, 2014 · 6 comments
Closed

can't override isChanging for SNAPSHOT dependencies #1219

OlegYch opened this issue Mar 27, 2014 · 6 comments

Comments

@OlegYch
Copy link
Contributor

OlegYch commented Mar 27, 2014

some dependencies are not actually snapshots, even though they have SNAPSHOT in their name
e.g. http://repo.typesafe.com/typesafe/simple/maven-snapshots/com/typesafe/play/play_2.10/
i reported this at
playframework/playframework#2553
and tried to workaround with

//val playVersion = "2.2.2"
val playVersion = "2.3-2014-03-27-2e87b7e-SNAPSHOT"

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % playVersion)

allDependencies := allDependencies.value.map(m => if (m.revision == playVersion) m.copy(isChanging = false) else m)

but this doesn't seem to work (using sbt 0.13.2-M2, can't update atm because of sbt/sbt-native-packager#197 )
additionally, i get

[info] downloading http://repo.typesafe.com/typesafe/snapshots/com/typesafe/play/play_2.10/2.3-2014-03-27-2e87b7e-SNAPSHOT/play_2.10-2.3-2014-03-27-2e87b7e-SNAPSHOT.jar ...
[info]  [SUCCESSFUL ] com.typesafe.play#play_2.10;2.3-2014-03-27-2e87b7e-SNAPSHOT!play_2.10.jar (17194ms)
etc

every time i update, even though there is no way the dependency has changed

@OlegYch
Copy link
Contributor Author

OlegYch commented Mar 28, 2014

even with 0.13.2-RC1 and clean cache i get
[error] Couldn't delete outdated artifact from cache: C:\Users\OlegYch.ivy2\cache\com.typesafe.play\sbt-link\jars\sbt-link-2.3-2014-03-27-2e87b7e-SNAPSHOT.jar

@OlegYch
Copy link
Contributor Author

OlegYch commented Mar 28, 2014

when i look into c:\Users\OlegYch.ivy2\cache\com.typesafe.play\sbt-link\ivy-2.3-2014-03-27-2e87b7e-SNAPSHOT.xml i see that "publication" changes every time!

@eed3si9n
Copy link
Member

eed3si9n commented Apr 3, 2014

From sbt's point of view, if your version includes "-SNAPSHOT" it's a changing snapshot. As @jsuereth wrote, Play should avoid appending "-SNAPSHOT" to avoid it being treated as changing.

Whether it should be downloading or not is a whole another story. I'm closing this case as "by-design" for now.

@OlegYch
Copy link
Contributor Author

OlegYch commented Apr 3, 2014

isChanging should probably take precedence over whatever heuristic is employed, don't you think?

@eed3si9n
Copy link
Member

eed3si9n commented Apr 3, 2014

I don't think so. If I understand correctly, isChanging is a Boolean not an Option[Boolean], so it being false mostly means the build user didn't specify changing(). In that case, we need to assume everything that contains the word "-SNAPSHOT" is changing.

@jsuereth
Copy link
Member

jsuereth commented Apr 4, 2014

Hmm, there's also isSnapshot in the build, which is meant to do the same thing as "changing" for the local project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants