forked from scalacenter/bloop
-
Notifications
You must be signed in to change notification settings - Fork 7
Merge upstream changes #115
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
Merged
alexarchambault
merged 31 commits into
scala-cli:main
from
alexarchambault:merge-upstream
Aug 16, 2022
Merged
Merge upstream changes #115
alexarchambault
merged 31 commits into
scala-cli:main
from
alexarchambault:merge-upstream
Aug 16, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bump dependency submission
Previously, Bloop's `CompilerCache` could return instances of
`JavaCompiler` relying on using the local JDK Java compiler API
("unforked" compilation) in cases where the javac options included
options expected to be passed to the runtime system (options starting
with `-J`, eg. `-J-Dfoo=bar`).
This happened, because the compiler instances are cached and the path to
the `javac` binary was used as cache key. This means that if 2 projects
A and B share the same path to the `javac` binary, but only project B
has javac options that should be passed to the runtime system, then
Bloop could use a local compiler to compile project B, because the cache
would have been populated with the local compiler used to compile
project A. See the test cases included in this commit.
This commit fixes this issue by encoding in the cache key whether a
local compiler can be used.
* Cache Scala.js linkers for incremental linking * Use TrieMap instead of mutable.Map * Avoid caching fullLinkJS linker to save memory * Cache only one linker per target path * Use `withClosureCompiler` instead of `withClosureCompilerIfAvailable` * Avoid redundant `withOptimizer(true)` * Use SoftReference instead of WeakReference Co-authored-by: Sébastien Doeraene <sjrdoeraene@gmail.com>
They mainly depend on bloop-config and jsoniter-scala, which should be stable enough.
…ter#1764) I'm noticed that this outputStream might produce an unhandled OOM error when it used from Metals (~80MB in memory). Can be reproduced on long running session with a lot of diagnostics.
…mat (scalacenter#1766) This is to enable usage of Bloop/Metals in Enterprise environments where only the valid-POM format is accepted for JAR downloads (meaning most SBT plug-ins don't work -- currently making Scala unusable from VS Code at organizations with stricter security policies), for thousands of developers. -- How this is tested locally: `publishM2`, then in the target project that uses sbt-bloop, in its `project/metals.sbt` add, e.g.: ``` libraryDependencies += "ch.epfl.scala" % "sbt-bloop_2.12_1.0" % "1.5.2-13-15ded987-20220726-1436" // only needed if published to local .m2 via publishM2 resolvers += Resolver.mavenLocal ```
…management-voln Upgrade sbt-librarymanagement to 1.1.5 due to CVEs in its 1.0.x tree.
Support scala android plugin on Gradle
Do it in the same way how it's implemeted in zinc - https://github.com/sbt/zinc/blob/189d33bcf6678fcc86e7e3e438c551d6cc51be8a/internal/zinc-core/src/main/scala/sbt/internal/inc/IncrementalCommon.scala#L396-L405 Technically it shouldn't be an issue, if user don't touch clasees then there is no need to check `removedProducts`. However, sometimes when I do a lot of switches between branches in combination with Metals by some reason I'm getting an invalid state of project where some products were removed and their sources aren't presented in changed files.
fix: check if products were removed in inc compilation
Conflicts: build.sbt project/project/build.sbt
Conflicts: .github/workflows/sbt-dependency-graph.yml
Conflicts: integrations/maven-bloop/src/main/scala/bloop/integrations/maven/MojoImplementation.scala integrations/maven-bloop/src/test/scala/bloop/integrations/maven/MavenConfigGenerationSuite.scala
Conflicts: project/Dependencies.scala
Conflicts: .github/workflows/sbt-dependency-graph.yml
Conflicts: .github/workflows/ci.yml benchmark-bridge build.sbt frontend/src/test/resources/compiler-plugin-allowlist/project/plugins.sbt frontend/src/test/resources/cross-test-build-scala-native-0.4/project/plugins.sbt frontend/src/test/resources/cross-test-build-scalajs-0.6/project/plugins.sbt frontend/src/test/resources/cross-test-build-scalajs-1.0/project/plugins.sbt frontend/src/test/resources/cross-test-build-scalajs-1.x/project/plugins.sbt frontend/src/test/resources/custom-test-framework/project/plugins.sbt frontend/src/test/resources/no-test-frameworks/project/plugins.sbt frontend/src/test/resources/scala-seed-project/project/plugins.sbt frontend/src/test/resources/simple-build/project/plugins.sbt project/build.sbt project/project/build.sbt
Conflicts: launcher-core/src/main/scala/bloop/launcher/bsp/BspBridge.scala
Conflicts: docs/build-tools/sbt.md project/build.sbt
Conflicts: project/Dependencies.scala
Conflicts: integrations/gradle-bloop/src/main/scala/bloop/integrations/gradle/model/BloopConverter.scala integrations/gradle-bloop/src/main/scala/bloop/integrations/gradle/tasks/BloopInstallTask.scala integrations/gradle-bloop/src/test/scala/bloop/integrations/gradle/ConfigGenerationSuite.scala
6d52291 to
1413c20
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.