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

Do not store versions in VersionsCacheAlg #1241

Merged
merged 1 commit into from Jan 14, 2020
Merged

Conversation

@fthomas
Copy link
Owner

fthomas commented 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.

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 fthomas added this to the 0.6.0 milestone Jan 14, 2020
@fthomas fthomas added the enhancement label Jan 14, 2020
@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #1241 into master will increase coverage by 0.04%.
The diff coverage is 82.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1241      +/-   ##
==========================================
+ Coverage   69.33%   69.37%   +0.04%     
==========================================
  Files          99       99              
  Lines        1497     1499       +2     
  Branches       45       35      -10     
==========================================
+ Hits         1038     1040       +2     
  Misses        459      459
Impacted Files Coverage Δ
...la/org/scalasteward/core/application/Context.scala 0% <ø> (ø) ⬆️
...scala/org/scalasteward/core/update/UpdateAlg.scala 59.09% <80%> (+4.09%) ⬆️
...alasteward/core/coursier/VersionsCacheFacade.scala 81.25% <81.25%> (ø)
...a/org/scalasteward/core/coursier/CoursierAlg.scala 93.54% <87.5%> (-2.89%) ⬇️

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 556def6...91384be. Read the comment docs.

@fthomas fthomas merged commit 6824d0d into master Jan 14, 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 82.75% of diff hit (target 69.33%)
Details
codecov/project 69.37% (+0.04%) compared to 556def6
Details
@fthomas fthomas deleted the topic/versions-cache-facade branch Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.