Skip to content
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

Scala Steward without sbt-updates #1209

Merged
merged 36 commits into from Jan 22, 2020
Merged

Scala Steward without sbt-updates #1209

merged 36 commits into from Jan 22, 2020

Conversation

@fthomas
Copy link
Owner

fthomas commented Jan 2, 2020

This shows how Scala Steward would work without sbt-updates.

fthomas added 3 commits Jan 2, 2020
@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 2, 2020

Codecov Report

Merging #1209 into master will increase coverage by 0.17%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1209      +/-   ##
=========================================
+ Coverage   67.62%   67.8%   +0.17%     
=========================================
  Files         100      99       -1     
  Lines        1492    1491       -1     
  Branches       51      41      -10     
=========================================
+ Hits         1009    1011       +2     
+ Misses        483     480       -3
Impacted Files Coverage Δ
...la/org/scalasteward/core/application/Context.scala 0% <ø> (ø) ⬆️
.../scala/org/scalasteward/core/application/Cli.scala 93.75% <ø> (ø) ⬆️
...ala/org/scalasteward/core/application/Config.scala 0% <0%> (ø) ⬆️
.../main/scala/org/scalasteward/core/sbt/SbtAlg.scala 94.44% <100%> (ø) ⬆️
...main/scala/org/scalasteward/core/sbt/command.scala 100% <100%> (ø) ⬆️
...alasteward/core/coursier/VersionsCacheFacade.scala 80% <100%> (+1.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a069046...53b1c71. Read the comment docs.

@fthomas fthomas mentioned this pull request Jan 3, 2020
fthomas added a commit that referenced this pull request Jan 3, 2020
If #1209 is merged, our own `Order[Version]` will become more important.
To prevent that it does something stupid, this adds a double-check which
uses coursier.core.Version to verify that the next version of an update
is greater than the current. Once our own ordering is battle-tested
enough, this can be removed again.
fthomas added a commit that referenced this pull request Jan 3, 2020
If #1209 is merged, our own `Order[Version]` will become more important.
To prevent that it does something stupid, this adds a double-check which
uses coursier.core.Version to verify that the next version of an update
is greater than the current. Once our own ordering is battle-tested
enough, this can be removed again.
fthomas added 11 commits Jan 3, 2020
fthomas added 2 commits Jan 4, 2020
@fthomas

This comment has been minimized.

Copy link
Owner Author

fthomas commented Jan 5, 2020

My public Scala Steward instance is now using this branch and I love it. Instead of 2 to 3 hours to check all 900 repos it now only takes 30 to 40 minutes.

fthomas added 2 commits Jan 6, 2020
@fthomas fthomas mentioned this pull request Jan 6, 2020
fthomas added 3 commits Jan 6, 2020
@fthomas fthomas mentioned this pull request Jan 9, 2020
fthomas added a commit that referenced this pull request Jan 14, 2020
This renames VersionsCacheAlg to VersionsCacheFacade and changes it to
not store versions anymore. Versions are now always obtained from
Coursier. VersionsCacheFacade's job now is to keep track of when
versions where updated by Coursier and to rate limit calls to Coursier
that hit the network (because of #1218).

The big advantage of this change is that we don't need to build and
maintain our own versions cache (which would always be inferior to
Coursier's cache). For example, until now we've neglected the
repositories where dependencies are available in our cache which would
have lead to incorrect PRs with #1209.

VersionsCacheFacade still ignores resolvers when storing the timestamp
of the last update, but this will only lead to unlimited calls to
Coursier that might hit the network but not to incorrect data and
behaviour.
fthomas added a commit that referenced this pull request Jan 14, 2020
This renames VersionsCacheAlg to VersionsCacheFacade and changes it to
not store versions anymore. Versions are now always obtained from
Coursier. VersionsCacheFacade's job now is to keep track of when
versions where updated by Coursier and to rate limit calls to Coursier
that hit the network (because of #1218).

The big advantage of this change is that we don't need to build and
maintain our own versions cache (which would always be inferior to
Coursier's cache). For example, until now we've neglected the
repositories where dependencies are available in our cache which would
have lead to incorrect PRs with #1209.

VersionsCacheFacade still ignores resolvers when storing the timestamp
of the last update, but this will only lead to unlimited calls to
Coursier that might hit the network but not to incorrect data and
behaviour.
fthomas added 6 commits Jan 16, 2020
WIP
@mwz

This comment has been minimized.

Copy link
Contributor

mwz commented Jan 19, 2020

This is an amazing performance improvement @fthomas!

fthomas added 2 commits Jan 19, 2020
@fthomas fthomas marked this pull request as ready for review Jan 19, 2020
@fthomas fthomas changed the title WIP Scala Steward without sbt-updates Scala Steward without sbt-updates Jan 19, 2020
@fthomas

This comment has been minimized.

Copy link
Owner Author

fthomas commented Jan 19, 2020

@mwz Yeah, turns out that not calling sbt repeatedly really helps with performance. ;-)

The other nice consequence of this change is that it will be much easier to add support for other build systems because the only things we're now querying the build system for are dependencies and resolvers.

fthomas added 6 commits Jan 20, 2020
To prevent being blocked by Maven Central.
@fthomas fthomas merged commit 244c2c6 into master Jan 22, 2020
5 of 6 checks passed
5 of 6 checks passed
Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
Summary no rules match, no planned actions
Details
Travis CI - Branch Build Passed
Details
Travis CI - Pull Request Build Passed
Details
codecov/patch 75% of diff hit (target 67.62%)
Details
codecov/project 67.8% (+0.17%) compared to a069046
Details
@fthomas fthomas added the enhancement label Jan 22, 2020
@fthomas fthomas added this to the 0.6.0 milestone Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.