If you don't mind users working with a different setting, you could define a setting `autoDependencies` that gets added to `libraryDependencies` and only operate on that. You can call the code that implements 'session save' to write it to the .sbt. It will automatically replace existing settings in a .sbt file if the new setting is definitive (it doesn't use the previous version, like += does).
-Mark
On Sun, 7 Oct 2012 16:35:55 -0700 (PDT)
Roman Timushev <
rti...@gmail.com> wrote:
> Thanks, Paul. Yes, it would be a good addition. Maven plugin does this.
> Need to think how to limit the scope of such replacement though — not
> everyone is ready to move to 2.10.0-M7 as the plugin suggests.
>
> On Monday, October 8, 2012 2:47:28 AM UTC+4, Paul Phillips wrote:
> >
> >
> >
> > On Sun, Oct 7, 2012 at 11:26 AM, Roman Timushev <
rti...@gmail.com<javascript:>
> > > wrote:
> >
> >> > dependency-updates
> >> [info] Found 3 dependency updates for test-project
> >> [info] org.scala-lang:scala-library : 2.9.2 -> 2.10.0-M7
> >> [info] ch.qos.logback:logback-classic : 1.0.6 -> 1.0.7
> >> [info] org.slf4j:slf4j-api : 1.6.6 -> 1.7.1
> >>
> >>
> > Excellent. The feature I would dearly love to see added to this is
> >
> > > dependency-updates commit
> > [info] Updating project files...
> > [info] Updated versions for: scala-library, logback-classic, slf4j-api in
> > build.sbt
> > % git diff
> > diff --git i/build.sbt w/build.sbt
> > -libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.0.6"
> > +libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.0.7"
> > [etc, you get the drift]
> >
> > Obviously if one's build is solving differential equations to figure out
> > the versions this is going to be a tall order; however in almost every case
> > they are hardcoded string literals in build.sbt or project/*.scala in which
> > case it's more of a short order.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To view this discussion on the web visit
https://groups.google.com/d/msg/simple-build-tool/-/POsKgM5isBsJ.
> To post to this group, send email to
simple-b...@googlegroups.com.
> To unsubscribe from this group, send email to
simple-build-t...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/simple-build-tool?hl=en.
>