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

cs update not finding new versions without --mode force #2603

Closed
ckipp01 opened this issue Dec 1, 2022 · 3 comments · Fixed by #2607
Closed

cs update not finding new versions without --mode force #2603

ckipp01 opened this issue Dec 1, 2022 · 3 comments · Fixed by #2607

Comments

@ckipp01
Copy link
Contributor

ckipp01 commented Dec 1, 2022

I've noticed a couple different people on Discord having issues with having old version installed by scala-cli. For example I saw this issue with Bloop and with Metals. I run cs update in a morning script that I have every day so I sort of always expect my stuff to be up to date, but today I realized my scala-cli version was out of date. Even with a fresh install I wasn't getting the new one and wouldn't unless I used --mode force. For example here are the steps I took to illustrate this:

❯ cs install scala-cli
Wrote scala-cli

~
❯ scala-cli --version
Scala CLI version: 0.1.17
Scala version (default): 3.2.0

~
❯ cs update scala-cli

~
❯ cs update --mode force scala-cli
https://repo1.maven.org/maven2/io/get-coursier/apps/maven-metadata.xml
  100.0% [##########] 2.5 KiB (25.2 KiB / s)
https://repo1.maven.org/maven2/io/get-coursier/apps/1.0.34/apps-1.0.34.jar
  100.0% [##########] 11.0 KiB (456.5 KiB / s)
Updated scala-cli

~
❯ scala-cli --version
Scala CLI version: 0.1.18
Scala version (default): 3.2.1

Output of cs version

❯ cs version
2.1.0-RC2

I recently came across this issue in Scala Steward scala-steward-org/scala-steward#2797 and I wonder if these could be related?

@fthomas
Copy link
Contributor

fthomas commented Dec 1, 2022

If this is the same issue as I described in scala-steward-org/scala-steward#2797 (comment), downgrading cs to 2.1.0-RC1 would fix it.

@ckipp01
Copy link
Contributor Author

ckipp01 commented Dec 2, 2022

If this is the same issue as I described in scala-steward-org/scala-steward#2797 (comment), downgrading cs to 2.1.0-RC1 would fix it.

Yea the tricky part is that now all the cache is refreshed I don't have the same problem. So it's a bit hard to reproduce.

@ckipp01
Copy link
Contributor Author

ckipp01 commented Dec 9, 2022

Alright I was just able to confirm this. I released some new artifacts today and was unable to fetch them or see them:

❯ cs complete-dep ch.epfl.scala:bloop-maven-plugin:2.0.0-M

Just returned nothing. I then did the following:

❯ cs install cs:2.1.0-RC1
https://repo1.maven.org/maven2/io/get-coursier/apps/maven-metadata.xml
  No new update since 2022-11-03 13:28:27
Wrote cs

~/Documents/scala-workspace/scalacenter/bloop-maven-plugin main ≡
❯ cs complete-dep ch.epfl.scala:bloop-maven-plugin:2.0.0-M

https://repo1.maven.org/maven2/ch/epfl/scala/bloop-maven-plugin/maven-metadata.xml
  100.0% [##########] 381B (2.4 KiB / s)
2.0.0-M2
2.0.0-M3

And everything then worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants