tkawachi / sbt-lock

Gemfile.lock for sbt
75 stars 12 forks source link

Cross compile issue #11

Open tkawachi opened 10 years ago

tkawachi commented 10 years ago

lock.sbt contains scala binary version of scalaVersion configuration. It will be a problem when it comes to cross compiling with +compile.

bdarfler commented 8 years ago

I love sbt-lock so it makes me quite sad that I cannot use it on my projects that require cross compilation. Any possibility this will be addressed?

tkawachi commented 8 years ago

thank you for feedback. I'll try to solve it when I have time

michaelahlers commented 6 years ago

Might try to find time to make a pull-request for this. Proposal: lock files uniquely named for all possible cross compilations, with assignment to dependencyOverrides made conditional by applicable settings (i.e., matching on CrossVersion.partialVersion(scalaVersion.value) with default to Nil). Initially, this would only support Scala, but the pattern could be applied more broadly down the road (for SBT plugins, runtime targets). To illustrate, invoking lock, with scalaVersion := "2.12.7" produces a single lock_scala_2.12.sbt file with a match on Some((2, 12)), while invoking +lock would result in a respective lock for each element of crossScalaVersions (.e.g, lock_scala_2.13.sbt, lock_scala_2.11.sbt). Thoughts?

tkawachi commented 6 years ago

It seems good. Please try to make a PR.