tkawachi / sbt-lock

Gemfile.lock for sbt
75 stars 12 forks source link

Test dependencies in lock.sbt #15

Closed catena2w closed 7 years ago

catena2w commented 8 years ago

Test dependencies in build.sbt, like libraryDependencies += "com.typesafe.akka" %% "akka-testkit" % "2.+" % "test" are resolved as normal dependencies in lock.sbt, like "com.typesafe.akka" % "akka-testkit_2.11" % "2.4.9" which leads to bigger library size when it's pushed to maven. How to keep "test" scope for such dependencies?

mcoffin commented 7 years ago

@catena2w I'm on 0.3.0 and I don't see any of my test-scoped dependencies in the lock.sbt at all.

What version of sbt-lock are you using, and how exactly did you generate lock.sbt?

mcoffin commented 7 years ago

@tkawachi How are we supposed to be handling test dependencies? One would think that you would want to lock them, but you've pretty explicitly listed only the dependencies from the Compile configuration. What's your reasoning here?

tkawachi commented 7 years ago

When I created this plugin, my concern is creating a stable production build. But there's no reason not to support Test environment.

tkawachi commented 7 years ago

@catena2w lock.sbt sets dependencyOverrides key. If I understand correctly, dependencyOverrides only specify a version of a library, it doesn't add library dependencies. It will not increase package size.

catena2w commented 7 years ago

I used 0.2.3, in 0.3.0 there are no test dependencies in lock.sbt, thanks!