[Solved]Should I add .bsp directory in .gitignore?

In sbt 1.4.0, project will generate sbt.json under .bsp directory under project.
Its content like following

{"name":"sbt","version":"1.4.4","bspVersion":"2.0.0-M5","languages":["scala"],"argv":["/Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home/bin/java","-Xms100m","-Xmx100m","-classpath","/Users/counter/.sdkman/candidates/sbt/1.4.2/bin/sbt-launch.jar","xsbt.boot.Boot","-bsp"]}

I will deploy this project in other machine which may not be OSX, should I add it into .gitignore file?

ref: https://www.scala-lang.org/blog/2020/10/27/bsp-in-sbt.html

1 Like

In my opinion, it makes sense to have it in .gitignore. The -classpath has a path that is specific to your username and other project members would need a bsp file that had paths specific to their machines.

2 Likes

The .bsp directory doesn’t contain any relevant information for your build, it is an IDE specific file, and as with any other IDE files, they must not be part of your repository.

4 Likes