For Scala projects built with Simple Build Tool (sbt) do you normally check li开发者_如何学运维b_managed into source control or do you ignore it and run sbt update?
I think a good rule of thumb is to commit the lib folder but not the lib_managed folder. I think that if sbt generates it or pulls it in it's best to leave it out in most cases. One concern with this is that you are dependent on external repositories which may be unavailable at times. A protection around this is to self host the dependencies (SBT Resolvers). All projects that use a common library can point to this common location.
I think checking in lib_managed is contrary to the purpose of using managed artifacts from the internet. Since the sbt project file manages the version, you won't have the problem of needing to manually update the jars. However, checking in the jars will still bloat the repo. The sbt documentation specifically recommends adding lib_managed to your .gitignore.
精彩评论