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

cannot install: Can't find a scala version suffix #2832

Open
gogamid opened this issue Sep 5, 2023 · 6 comments
Open

cannot install: Can't find a scala version suffix #2832

gogamid opened this issue Sep 5, 2023 · 6 comments

Comments

@gogamid
Copy link

gogamid commented Sep 5, 2023

I have been stuck to setup coursier for corporate laptop. I am using mirror.properties.
I get this error when i run coursier install metals:

https://jfrog.[mycompany.com]/artifactory/public/io/get-coursier/apps/maven-metadata.xml
  No new update since 2023-08-16 16:52:10
Exception in thread "main" java.lang.Exception: coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::metals:latest.stable (likely a non existing module or version)
        at coursier.install.AppDescriptor.artifacts(AppDescriptor.scala:109)
        at coursier.install.InstallDir.update$1(InstallDir.scala:262)
        at coursier.install.InstallDir.$anonfun$createOrUpdate$22(InstallDir.scala:408)
        at coursier.install.InstallDir.$anonfun$createOrUpdate$22$adapted(InstallDir.scala:407)
        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:73)
        at coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:93)
        at coursier.install.Updatable$.writing(Updatable.scala:106)
        at coursier.install.InstallDir.createOrUpdate(InstallDir.scala:407)
        at coursier.install.InstallDir.createOrUpdate(InstallDir.scala:96)
        at coursier.cli.install.Install$.$anonfun$run$7(Install.scala:128)
        at coursier.cli.install.Install$.$anonfun$run$7$adapted(Install.scala:115)
        at scala.collection.immutable.List.foreach(List.scala:431)
        at coursier.cli.install.Install$.run(Install.scala:115)
        at coursier.cli.install.Install$.run(Install.scala:23)
        at caseapp.core.app.CaseApp.main(CaseApp.scala:150)
        at caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:115)
        at coursier.cli.Coursier$.main(Coursier.scala:118)
        at coursier.cli.Coursier.main(Coursier.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at coursier.bootstrap.launcher.a.a(Unknown Source)
        at coursier.bootstrap.launcher.Launcher.main(Unknown Source)
Caused by: coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::metals:latest.stable (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)
        ... 25 more

weirdly coursier bootstrap/resolve/fetch metals works :(
coursier: 2.1.5
OS: Windows
Scala: Scala code runner version 2.12.12 -- Copyright 2002-2020, LAMP/EPFL and Lightbend, Inc.
java version "1.8.0_361"

@tgodzik
Copy link
Collaborator

tgodzik commented Sep 5, 2023

Thanks for reporting! Does it work when you do coursier install metals:1.0.1 ? Alternatively, bootstrap command should be enough.

@gogamid
Copy link
Author

gogamid commented Sep 5, 2023

@tgodzik same with this command coursier install metals:1.0.1
this happens also in the part of coursier setup, i dont really know how to run setup with bootstrap...

@tgodzik
Copy link
Collaborator

tgodzik commented Sep 5, 2023

Hmm... maybe:
coursier install org.scalameta:metals_2.13:1.0.1
would work?

I think there might be some additional files we use on maven central and that doesn't work on corporate repositories?

@tgodzik
Copy link
Collaborator

tgodzik commented Sep 5, 2023

Ach no, your best case is to do coursier bootstrap -o metals org.scalameta:metals_2.13:1.0.1

@gogamid
Copy link
Author

gogamid commented Sep 5, 2023

running coursier install org.scalameta:metals_2.13:1.0.1 gives me this time:
Cannot find app org.scalameta in channels io.get-coursier:apps

@gogamid
Copy link
Author

gogamid commented Sep 5, 2023

as i said, coursier bootstrap/resolve/fetch metals works somehow, but install and setup doesnt't work

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

2 participants