Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

Upgrade coursier to 2.0.0-RC4-1 and use binary by default #174

Merged
merged 1 commit into from
Nov 21, 2019

Conversation

jackkoenig
Copy link
Collaborator

fetch-scala now has --jar option to force download of jar
Binary distributions are available for 64-bit Linux and 64-bit MacOS

This PR also introduces sha256 checking for the coursier download as an added safety mechanism.

We use coursier in wit for Scala dependency fetching as well as in api-scala-sifive's wake rules for dependency resolution. We have to invoke coursier for every unique set of dependencies (ie. every Scala project in the workspace) whenever fetching dependencies via wit fetch-scala or when wake is determining the classpath for compilation or execution.

The startup time ends up mattering a lot. Compared to 0.11.0, wit fetch-scala is a little bit faster for clean fetching, and much faster for invocations when there is no downloading to do (like running wit fetch-scala just to check everything is downloaded, or wake getting compilation classpaths):

For a large design, fresh installs are 17% faster with this PR, but when there isn't anything to do, it is 75% faster (and almost all of the remaining time is due to the Scala compiler bridge fetcher, a separate problem).

0.11.0
Fresh Install: ~35s
Nothing to do: ~20s

This PR
Fresh Install: ~29s
Nothing to do: ~5s

Copy link
Member

@richardxia richardxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

lib/wit/scalaplugin.py Outdated Show resolved Hide resolved
fetch-scala now has --jar option to force download of jar
Binary distributions are available for 64-bit Linux and 64-bit MacOS
@jackkoenig
Copy link
Collaborator Author

I'm going to merge this after #171 which will go into 0.11.1 while this is 0.12.0

@jackkoenig jackkoenig merged commit 2931108 into master Nov 21, 2019
@jackkoenig jackkoenig deleted the scalaplugin-binary-coursier branch November 21, 2019 22:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants