Resolvers and changing pattern

308 views
Skip to first unread message

Grzegorz Kossakowski

unread,
Oct 20, 2011, 6:07:24 AM10/20/11
to simple-b...@googlegroups.com
Hi,

I noticed that there seems to be no way to configure resolver's changingPattern described here: http://ant.apache.org/ivy/history/latest-milestone/settings/resolvers.html

Ivy assumes that all artifacts are immutable and can be cached forever. Specifically, it does not respect SNAPSHOT convention popular in Maven world. This problem is visible even with scala-tools.snapshots repository. The changingPattern property of a resolver allows to configure this behaviour but Sbt gives no way to access it.

Any reason for that?

Mark Harrah

unread,
Oct 22, 2011, 11:27:31 AM10/22/11
to simple-b...@googlegroups.com
On Thu, 20 Oct 2011 03:07:24 -0700 (PDT)
Grzegorz Kossakowski <grzegorz.k...@gmail.com> wrote:

> Hi,
>
> I noticed that there seems to be no way to configure resolver's
> changingPattern described
> here: http://ant.apache.org/ivy/history/latest-milestone/settings/resolvers.html

You can directly construct an Ivy Resolver by wrapping it in sbt.RawResolver. However, I don't think you actually want to configure changingPattern...

> Ivy assumes that all artifacts are immutable and can be cached forever.

Yes, unless changing=true is specified on the dependency or the changing pattern matches...

> Specifically, it does not respect SNAPSHOT convention popular in Maven
> world. This problem is visible even with scala-tools.snapshots repository.
> The changingPattern property of a resolver allows to configure this
> behaviour but Sbt gives no way to access it.

sbt configures the changing pattern to handle -SNAPSHOT. What is the specific problem you are having?

-Mark

> Any reason for that?
>

Grzegorz Kossakowski

unread,
Oct 25, 2011, 5:32:41 PM10/25/11
to simple-b...@googlegroups.com
On Saturday, October 22, 2011 5:27:31 PM UTC+2, Mark Harrah wrote:

> Ivy assumes that all artifacts are immutable and can be cached forever.

Yes, unless changing=true is specified on the dependency or the changing pattern matches...


I cannot define changing=true for Scala itself right?
 

> Specifically, it does not respect SNAPSHOT convention popular in Maven
> world. This problem is visible even with scala-tools.snapshots repository.
> The changingPattern property of a resolver allows to configure this
> behaviour but Sbt gives no way to access it.

sbt configures the changing pattern to handle -SNAPSHOT.  What is the specific problem you are having?

If I define Scala version like this:

scalaVersion := "2.10.0-SNAPSHOT"

resolvers += ScalaToolsSnapshots

libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _)

Then update command seems to never update Scala compiler and Scala library used in this project.

-- 
Grzegorz

Mark Harrah

unread,
Oct 27, 2011, 8:26:08 PM10/27/11
to simple-b...@googlegroups.com

Right, once sbt retrieves a version of sbt or Scala to the boot directory, it doesn't check for an updated version. The boot directory can be cleaned with 'reboot full'.

-Mark

Reply all
Reply to author
Forward
0 new messages