Tags: StefanZhiHe/coursier
Tags
Deduplicate strings in `JsonElem` (coursier#2533) I ran into an issue where `coursier fetch --json-output-file ...` was failing with `java.lang.OutOfMemoryError`. This failure persisted even with heap sizes of 8 GB. Analysis of a heap dump showed that 66% of the heap consisted of duplicate strings. In my particular case, 9% of the heap was taken up by 149,403 copies of the string `"org.scala-lang:scala-library:2.12.12"`, and another 9% was copies of the string `"org.scala-lang:scala-library:2.12.8"`. It appeared that most of these strings were held by the `reconciledVersionStr` and `requestedVersionStr` fields of `JsonElem`. This PR adds `intern` calls to the allocations of `reconciledVersion`, `reconciledVersionStr`, and `requestedVersionStr` on `JsonElem`, causing these string allocations to be effectively deduplicated in to the JVM string pool. After this change, my same fetch command was able to complete running with a much smaller heap, `-Xmx256m`. This PR also adds `lazy` to `reconciledVersionStr`, as the eager evaluation of `reconciledVersionStr` effectively forced `reconciledVersion` to be non-lazy as well. * Use `Symbol(…).name` rather than `String#intern`
Support `--architecture` flag for Java commands (coursier#2489) Previously, it was not possible to use `coursier java-home` to download an x86_64 architecture JDK on an Apple M1 computer. This may be a niche use-case, but we can't use any existing aarch64 JDK 8 distributions in the https://github.com/sourcegraph/scip-java build because none of them give access to the `com.sun` APIs as far as I can tell. With this commit, we can use `--architecture amd64 --jvm 8` to populate the boot classpath of our javac compiler plugin so that `com.sun` APIs are available during compile time.
Publish cli-tests module again (coursier#2490)
Remove publish module and command (coursier#2446) The publish module has been migrated to https://github.com/coursier/publish some time ago (and doesn't use okhttp anymore there). For the publish command, there's no 100% equivalent substitute. Scala CLI (https://github.com/VirtusLab/scala-cli) got a publish command recently, offering similar features.
Merge pull request coursier#2440 from alexarchambault/develop Maintenance, add 'version' sub-command, better authenticated proxy support
Case-insensitive OS activation (coursier#2286) * Case-insensitive OS activation * preserve the original Activation.Os values * keep Activation.Os#archMatch for binary compatibility
Set HTTP Accept header (coursier#2367) Works around remote repositories like AWS CodeArtifact that return 404 on maven-metadata.xml if requested with JVM's default Accept header (which is "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2").
PreviousNext