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

Is there a way to "install" a snapshot? #188

Open
ckipp01 opened this issue Nov 10, 2022 · 2 comments
Open

Is there a way to "install" a snapshot? #188

ckipp01 opened this issue Nov 10, 2022 · 2 comments

Comments

@ckipp01
Copy link
Collaborator

ckipp01 commented Nov 10, 2022

I sort of assumed I could do something like this:

cs install -r sonatype:snapshots metals:0.11.9+128-92db24b7-SNAPSHOT

But when I try this I get:

❯ cs install -r sonatype:snapshots metals:0.11.9+128-92db24b7-SNAPSHOT
https://repo1.maven.org/maven2/org/scala-lang/scala-library/maven-metadata.xml
  No new update since 2022-10-08 20:29:56
Exception in thread "main" java.lang.Exception: coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::metals:0.11.9+128-92db24b7-SNAPSHOT (likely a non existing module or version)
        at coursier.install.AppDescriptor.artifacts(AppDescriptor.scala:109)
        at coursier.install.InstallDir.update$1(InstallDir.scala:271)
        at coursier.install.InstallDir.$anonfun$createOrUpdate$22(InstallDir.scala:417)
        at coursier.install.InstallDir.$anonfun$createOrUpdate$22$adapted(InstallDir.scala:416)
        at coursier.install.Updatable$.get$1(Updatable.scala:61)
        at coursier.install.Updatable$.$anonfun$writing$1(Updatable.scala:106)
        at coursier.cache.CacheLocks$.loop$1(CacheLocks.scala:71)
        at coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:95)
        at coursier.install.Updatable$.writing(Updatable.scala:106)
        at coursier.install.InstallDir.createOrUpdate(InstallDir.scala:416)
        at coursier.install.InstallDir.createOrUpdate(InstallDir.scala:96)
        at coursier.cli.install.Install$.$anonfun$run$7(Install.scala:127)
        at coursier.cli.install.Install$.$anonfun$run$7$adapted(Install.scala:114)
        at scala.collection.immutable.List.foreach(List.scala:431)
        at coursier.cli.install.Install$.run(Install.scala:114)
        at coursier.cli.install.Install$.run(Install.scala:22)
        at caseapp.core.app.CaseApp.main(CaseApp.scala:149)
        at caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:115)
        at coursier.cli.Coursier$.main(Coursier.scala:118)
        at coursier.cli.Coursier.main(Coursier.scala)
Caused by: coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::metals:0.11.9+128-92db24b7-SNAPSHOT (likely a non existing module or version)
        at coursier.install.AppDescriptor.$anonfun$processDependencies$9(AppDescriptor.scala:231)
        at scala.Option.toRight(Option.scala:485)
        at coursier.install.AppDescriptor.processDependencies(AppDescriptor.scala:231)
        at coursier.install.AppDescriptor.artifacts(AppDescriptor.scala:107)
        ... 19 more

Is this meant to work, or is there any way to achieve this?

@alexarchambault
Copy link
Member

It seems repositories passed to cs install aren't used to install the app for now. These are only used to fetch the channel data (that contains the app descriptors).

It seems this could be changed… The app descriptor can be changed in the AppInfo around here. Then the passed repositories should be taken into account.

@tgodzik
Copy link
Collaborator

tgodzik commented Mar 29, 2023

So I failed to make it work and I need to focus on other things currently. My initial approach was in https://github.com/tgodzik/coursier/tree/add-repositories-to-install if anyone wants to continue.

@tgodzik tgodzik removed their assignment Mar 29, 2023
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

No branches or pull requests

3 participants