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

Issue with re-bootstrapping #4353

Open
lihaoyi opened this issue Jan 17, 2025 · 1 comment
Open

Issue with re-bootstrapping #4353

lihaoyi opened this issue Jan 17, 2025 · 1 comment

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Jan 17, 2025

Seems like there's something funny going on with coursier repository setup. @alexarchambault do you have any idea what may be going on?

https://github.com/com-lihaoyi/mill/actions/runs/12828051470/job/35771528190?pr=4351#step:4:73

main.api.fix java.lang.Exception: Unrecognized repository: InternalRepo(
  projects = List(
    Project(
      module = Module(
        organization = Organization(value = "mill-internal"),
        name = ModuleName(value = "main-api"),
        attributes = Map()
      ),
      version = "0+mill-internal",
      dependencies = List(
        (
          Configuration(value = "compile"),
          Dependency(
            module = Module(
              organization = Organization(value = "mill-internal"),
              name = ModuleName(value = "main-client"),
              attributes = Map()
            ),
            version = "0+mill-internal",
            configuration = Configuration(value = "compile"),
            minimizedExclusions = MinimizedExclusions(data = ExcludeNone),
            publication = Publication(
              name = "",
              type = Type(value = ""),
              ext = Extension(value = ""),
              classifier = Classifier(value = "")
            ),
            optional = false,
            transitive = true,
            overrides = Map(),
            boms = List(),
            bomDependencies = List(),
            overridesMap = Impl(map = Map())
          )
        ),
        (
          Configuration(value = "runtime"),
          Dependency(
            module = Module(
              organization = Organization(value = "org.scala-sbt"),
              name = ModuleName(value = "test-interface"),
              attributes = Map()
            ),
            version = "1.0",
            configuration = Configuration(value = "runtime"),
            minimizedExclusions = MinimizedExclusions(data = ExcludeNone),
            publication = Publication(
              name = "",
              type = Type(value = ""),
              ext = Extension(value = ""),
              classifier = Classifier(value = "")
            ),
            optional = false,
            transitive = true,
            overrides = Map(),
            boms = List(),
            bomDependencies = List(),
            overridesMap = Impl(map = Map())
          )
        )
      ),
      configurations = HashMap(
        Configuration(value = "test") -> List(Configuration(value = "runtime")),
        Configuration(value = "provided") -> List(Configuration(value = "provided")),
        Configuration(value = "compile") -> List(),
        Configuration(value = "default") -> List(Configuration(value = "runtime")),
        Configuration(value = "runtime") -> List(Configuration(value = "compile"))
      ),
      parent = None,
      dependencyManagement = List(),
      properties = List(),
      profiles = List(),
      versions = None,
      snapshotVersioning = None,
      packagingOpt = None,
      relocated = false,
      actualVersionOpt = None,
      publications = List(),
      info = Info(
        description = "",
        homePage = "",
        developers = List(),
        publication = None,
        scm = None,
        licenseInfo = List()
      ),
      overrides = Impl(map = Map())
    ),
    Project(
      module = Module(
        organization = Organization(value = "mill-internal"),
        name = ModuleName(value = "main-client"),
        attributes = Map()
      ),
      version = "0+mill-internal",
      dependencies = List(),
      configurations = HashMap(
        Configuration(value = "test") -> List(Configuration(value = "runtime")),
        Configuration(value = "provided") -> List(Configuration(value = "provided")),
...
    com.goyeau.mill.scalafix.CoursierUtils$.toApiRepository(CoursierUtils.scala:25)
    com.goyeau.mill.scalafix.ScalafixCache$.$anonfun$scalafixArgumentsCache$2(ScalafixCache.scala:24)
    scala.collection.immutable.List.map(List.scala:247)
    scala.collection.immutable.List.map(List.scala:[79](https://github.com/com-lihaoyi/mill/actions/runs/12828051470/job/35771528190?pr=4351#step:4:80))
    com.goyeau.mill.scalafix.ScalafixCache$.$anonfun$scalafixArgumentsCache$1(ScalafixCache.scala:24)
    com.goyeau.mill.scalafix.ScalafixCache$Cache.$anonfun$getOrElseCreate$1(ScalafixCache.scala:43)
    java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
    com.goyeau.mill.scalafix.ScalafixCache$Cache.getOrElseCreate(ScalafixCache.scala:41)
    com.goyeau.mill.scalafix.ScalafixCache$.getOrElseCreate(ScalafixCache.scala:33)
    com.goyeau.mill.scalafix.ScalafixModule$.fixAction(ScalafixModule.scala:[80](https://github.com/com-lihaoyi/mill/actions/runs/12828051470/job/35771528190?pr=4351#step:4:81))
    com.goyeau.mill.scalafix.ScalafixModule.$anonfun$fix$1(ScalafixModule.scala:24)
    mill.define.Task$TraverseCtx.evaluate(Task.scala:219)
@alexarchambault
Copy link
Collaborator

alexarchambault commented Jan 18, 2025

Looks like an issue adapting the default coursier API (coursier.) to the Java one (coursierapi.), on the mill-scalafix side, but maybe also the coursier Java API. Because of the in-memory repo for internal modules introduced in #4145.

I should be able to have a look tomorrow or on Monday.

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