New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directory standard #3681
Comments
Would it be possible to use directories like coursier does? |
Yes - with two concerns:
|
@dwijnand Let me know if I can provide any information that helps sorting this out. |
my first concern is more specific to sbt's current use of directories, and I haven't given it much thought. the other one is partially directories-specific (I see the current version of directories is "10"), but it's actually generic to libraries on the jvm: selecting a library requires everything else to be compatible with that library's binary API. in sbt's case it means if we start using directories 10 then for the rest of sbt 1 all plugins will have to use directories 10 (or a version for which the API they depend on is compatible with directories 10). |
@dwijnand Hi Dale! Regarding directories: It is built on Java 6, doesn't have any dependencies and consists of 4 files (you can probably get rid of two of them). I only publish major versions, so that no person depending on it will ever get a different version from what they originally specified in their build config, without explicitly changing it himself/herself. I would suggest shading (parts of) this library for SBT's purposes to avoid any kind of classpath or compatibility concerns. The API itself is likely to be very stable now, as I have already considered and either gone through or rejected every major redesign I (and other people) can think of. Nevertheless, you can pick a version and just stick with it. Regarding
Other platforms work the same, if you use directories it should work as intended out of the box. Regarding SBT's use of directories in projects: When I was still using Scala, one of the really annoying things (in addition to SBT dumping things into my $HOME dir), was that it mixed configuration and compiled artifacts all over the place. Not being able to copy and paste So if you decide to clean up SBT's usage of directories, I would suggest sorting this out in the same breath – have one directory for compiled artifacts, e. g. |
After a version with launcher with #3598 fix is released this can be approximated with something like this set of options in either
Add |
…itHub Actions yaml ### What changes were proposed in this pull request? This PR proposes: - Add `~/.sbt` directory into the build cache, see also sbt/sbt#3681 - Move `hadoop-2` below to put up together with `java-11` and `scala-213`, see #30391 (comment) - Remove unnecessary `.m2` cache if you run SBT tests only. - Remove `rm ~/.m2/repository/org/apache/spark`. If you don't `sbt publishLocal` or `mvn install`, we don't need to care about it. - Use Java 8 in Scala 2.13 build. We can switch the Java version to 11 used for release later. - Add caches into linters. The linter scripts uses `sbt` in, for example, `./dev/lint-scala`, and uses `mvn` in, for example, `./dev/lint-java`. Also, it requires to `sbt package` in Jekyll build, see: https://github.com/apache/spark/blob/master/docs/_plugins/copy_api_dirs.rb#L160-L161. We need full caches here for SBT, Maven and build tools. - Use the same syntax of Java version, 1.8 -> 8. ### Why are the changes needed? - Remove unnecessary stuff - Cache what we can in the build ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? It will be tested in GitHub Actions build at the current PR Closes #30391 from HyukjinKwon/SPARK-33464. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…itHub Actions yaml This PR proposes: - Add `~/.sbt` directory into the build cache, see also sbt/sbt#3681 - Move `hadoop-2` below to put up together with `java-11` and `scala-213`, see apache#30391 (comment) - Remove unnecessary `.m2` cache if you run SBT tests only. - Remove `rm ~/.m2/repository/org/apache/spark`. If you don't `sbt publishLocal` or `mvn install`, we don't need to care about it. - Use Java 8 in Scala 2.13 build. We can switch the Java version to 11 used for release later. - Add caches into linters. The linter scripts uses `sbt` in, for example, `./dev/lint-scala`, and uses `mvn` in, for example, `./dev/lint-java`. Also, it requires to `sbt package` in Jekyll build, see: https://github.com/apache/spark/blob/master/docs/_plugins/copy_api_dirs.rb#L160-L161. We need full caches here for SBT, Maven and build tools. - Use the same syntax of Java version, 1.8 -> 8. - Remove unnecessary stuff - Cache what we can in the build No, dev-only. It will be tested in GitHub Actions build at the current PR Closes apache#30391 from HyukjinKwon/SPARK-33464. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…itHub Actions yaml This PR proposes: - Add `~/.sbt` directory into the build cache, see also sbt/sbt#3681 - Move `hadoop-2` below to put up together with `java-11` and `scala-213`, see apache#30391 (comment) - Remove unnecessary `.m2` cache if you run SBT tests only. - Remove `rm ~/.m2/repository/org/apache/spark`. If you don't `sbt publishLocal` or `mvn install`, we don't need to care about it. - Use Java 8 in Scala 2.13 build. We can switch the Java version to 11 used for release later. - Add caches into linters. The linter scripts uses `sbt` in, for example, `./dev/lint-scala`, and uses `mvn` in, for example, `./dev/lint-java`. Also, it requires to `sbt package` in Jekyll build, see: https://github.com/apache/spark/blob/master/docs/_plugins/copy_api_dirs.rb#L160-L161. We need full caches here for SBT, Maven and build tools. - Use the same syntax of Java version, 1.8 -> 8. - Remove unnecessary stuff - Cache what we can in the build No, dev-only. It will be tested in GitHub Actions build at the current PR Closes apache#30391 from HyukjinKwon/SPARK-33464. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…ure GitHub Actions yaml ### What changes were proposed in this pull request? This PR backports #30391. Note that it's a partial backport. This PR proposes: - Add `~/.sbt` directory into the build cache, see also sbt/sbt#3681 - ~Move `hadoop-2` below to put up together with `java-11` and `scala-213`, see #30391 (comment) - Remove unnecessary `.m2` cache if you run SBT tests only. - Remove `rm ~/.m2/repository/org/apache/spark`. If you don't `sbt publishLocal` or `mvn install`, we don't need to care about it. - ~Use Java 8 in Scala 2.13 build. We can switch the Java version to 11 used for release later.~ - Add caches into linters. The linter scripts uses `sbt` in, for example, `./dev/lint-scala`, and uses `mvn` in, for example, `./dev/lint-java`. Also, it requires to `sbt package` in Jekyll build, see: https://github.com/apache/spark/blob/master/docs/_plugins/copy_api_dirs.rb#L160-L161. We need full caches here for SBT, Maven and build tools. - Use the same syntax of Java version, 1.8 -> 8. ### Why are the changes needed? - Remove unnecessary stuff - Cache what we can in the build ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? It will be tested in GitHub Actions build at the current PR Closes #30416 from HyukjinKwon/SPARK-33464-3.0. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…ure GitHub Actions yaml ### What changes were proposed in this pull request? This PR backports #30391. Note that it's a partial backport. This PR proposes: - Add `~/.sbt` directory into the build cache, see also sbt/sbt#3681 - ~Move `hadoop-2` below to put up together with `java-11` and `scala-213`, see #30391 (comment) - Remove unnecessary `.m2` cache if you run SBT tests only. - Remove `rm ~/.m2/repository/org/apache/spark`. If you don't `sbt publishLocal` or `mvn install`, we don't need to care about it. - ~Use Java 8 in Scala 2.13 build. We can switch the Java version to 11 used for release later.~ - Add caches into linters. The linter scripts uses `sbt` in, for example, `./dev/lint-scala`, and uses `mvn` in, for example, `./dev/lint-java`. Also, it requires to `sbt package` in Jekyll build, see: https://github.com/apache/spark/blob/master/docs/_plugins/copy_api_dirs.rb#L160-L161. We need full caches here for SBT, Maven and build tools. - Use the same syntax of Java version, 1.8 -> 8. ### Why are the changes needed? - Remove unnecessary stuff - Cache what we can in the build ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? It will be tested in GitHub Actions build at the current PR Closes #30417 from HyukjinKwon/SPARK-33464-2.4. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@eed3si9n (this seems like something you might have meant to reply to?) |
@SethTisue @ckipp01 Thanks Seth, and yea, probably this would be a good area of contribution. |
@eed3si9n, are there any updates on that ISSUE? It's quite annoying, especially if you're trying to adhere to XDG standards; sbt ends up cluttering the home directory. |
Besides the fact that I nominated this issue to sbt 2.0 ideas post, there's been no material update on this front. |
steps
Run sbt.
problem
We use
~/.sbt
etc.expectation
Adhere to directory standards?
The text was updated successfully, but these errors were encountered: