Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

sbt install issue #304

Open
gregbrowndev opened this issue Apr 29, 2023 · 1 comment
Open

sbt install issue #304

gregbrowndev opened this issue Apr 29, 2023 · 1 comment

Comments

@gregbrowndev
Copy link

Hi,

I am having trouble installing the dependency.

Details:

  • Scala: 3.2.1
  • sbt: 1.8.2
  • organize-imports: 0.6.0

When I import the build into metals, I see this error:

2023.04.29 20:05:29 INFO  [error]   not found: /home/gregbrown/.ivy2/localcom.github.liancheng/organize-imports_3/0.6.0/ivys/ivy.xml
2023.04.29 20:05:29 INFO  [error]   not found: https://repo1.maven.org/maven2/com/github/liancheng/organize-imports_3/0.6.0/organize-imports_3-0.6.0.pom))), directCause=None)), directCause=None)), directCause=None)), directCause=None)

Likewise, when I run scalafix in the sbt console, I see the same error:

[error] stack trace is suppressed; run last update for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.github.liancheng:organize-imports_3:0.6.0
[error]   Not found
[error]   Not found
[error]   not found: /home/gregbrown/.ivy2/localcom.github.liancheng/organize-imports_3/0.6.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/github/liancheng/organize-imports_3/0.6.0/organize-imports_3-0.6.0.pom
[error] Total time: 5 s, completed Apr 29, 2023, 8:09:13 PM

I may be doing something wrong whilst installing the dependency, as my build.sbt differs somewhat from the README:

ThisBuild / version := "0.1.0-SNAPSHOT"

lazy val scala3Version = "3.2.1"

lazy val server = (project in file("."))
  .settings(
    name         := "myproject",
    scalaVersion := scala3Version ,
    organization := "com.myproject",
    libraryDependencies ++= Seq(
      // other dependencies
      "com.github.liancheng" %% "organize-imports" % "0.6.0"
    )
  )
@bjaglin
Copy link
Contributor

bjaglin commented Jun 3, 2023

You should have been using scalafixDependencies, not libraryDependencies. In any case, OrganizeImports is now a built-in rule as of Scalafix 0.11.0 so this should not be required anymore.

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

No branches or pull requests

2 participants