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

Fix for: Coursier not resilient to changing local ivy cache directory #665 #705

Merged
merged 5 commits into from Dec 6, 2017

Conversation

Projects
None yet
2 participants
@Mocuto
Contributor

Mocuto commented Dec 3, 2017

Made to address issue: #665
New priority for ivy home location is:

  1. ivy.home property
  2. sbt.ivy.home property
  3. user.home property

One primary question with this fix: Will this address instances where coursier is used from CLI/API/Jar file?

@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Dec 4, 2017

Member

@Mocuto Thanks! I'm not sure it works as expected as is. If ivy.home is ~/.ivy2, the local repo should be under ~/.ivy2/local. It seems to be ~/.ivy2/.ivy/local with the current changes.

Also, this setting doesn't apply from the sbt plugin (sbt defines the repo itself). So I'm not sure sbt.ivy.home should be taken into account here. Possibly a coursier.ivy.home instead, but not sbt.ivy.home I think.

Member

alexarchambault commented Dec 4, 2017

@Mocuto Thanks! I'm not sure it works as expected as is. If ivy.home is ~/.ivy2, the local repo should be under ~/.ivy2/local. It seems to be ~/.ivy2/.ivy/local with the current changes.

Also, this setting doesn't apply from the sbt plugin (sbt defines the repo itself). So I'm not sure sbt.ivy.home should be taken into account here. Possibly a coursier.ivy.home instead, but not sbt.ivy.home I think.

@Mocuto

This comment has been minimized.

Show comment
Hide comment
@Mocuto

Mocuto Dec 4, 2017

Contributor

Gotcha, so it is expected that the val ivy2HomeUri should point to the actual .ivy2 directory, rather than the directory that CONTAINS the .ivy2 directory?

Is that interpretation correct?

Contributor

Mocuto commented Dec 4, 2017

Gotcha, so it is expected that the val ivy2HomeUri should point to the actual .ivy2 directory, rather than the directory that CONTAINS the .ivy2 directory?

Is that interpretation correct?

Mocuto and others added some commits Dec 4, 2017

Tweaking
- give `coursier.ivy.home` the priority over `ivy.home`
- use get method on sys.props instead of checking for nulls
@alexarchambault

This comment has been minimized.

Show comment
Hide comment
@alexarchambault

alexarchambault Dec 5, 2017

Member

@Mocuto Yep, that's what I meant. I pushed some tweaking over your commit, I'll merge right after once CI is green.

Member

alexarchambault commented Dec 5, 2017

@Mocuto Yep, that's what I meant. I pushed some tweaking over your commit, I'll merge right after once CI is green.

@alexarchambault alexarchambault merged commit da7fd65 into coursier:master Dec 6, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment