Skip to content

Commit

Permalink
[Scala3] Add cross build support to Mill (#4492)
Browse files Browse the repository at this point in the history
Refactor Mill sources
  • Loading branch information
adkian-sifive authored Nov 12, 2024
1 parent d660f47 commit 7ade4df
Show file tree
Hide file tree
Showing 4 changed files with 395 additions and 435 deletions.
Loading

3 comments on commit 7ade4df

@seldridge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adkian-sifive: I think this commit broke publishing or broke something with SiFive's internal flows using Chisel.

If I try to use this published version, the internal flows fail to find the following file in the internal artifactory mirror:

org/scala-lang/scala-reflect/macros[2.13.15].scalaVersion/scala-reflect-macros[2.13.15].scalaVersion.jar

Do you have any idea what is going on with this?

CC: @jackkoenig

@seldridge
Copy link
Member

@seldridge seldridge commented on 7ade4df Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, this commit did something weird to the pom. Specifically, the entry for the macros dependency seems off. With this change, the pom dependency entry looks like this (https://s01.oss.sonatype.org/content/repositories/snapshots/org/chipsalliance/chisel_2.13/7.0.0-M2+174-7ade4dff-SNAPSHOT/chisel_2.13-7.0.0-M2+174-7ade4dff-SNAPSHOT.pom):

<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-reflect</artifactId>
    <version>macros[2.13.15].scalaVersion</version>
</dependency>

Previously, this looked like (https://s01.oss.sonatype.org/content/repositories/snapshots/org/chipsalliance/chisel_2.13/7.0.0-M2+173-d660f47a-SNAPSHOT/chisel_2.13-7.0.0-M2+173-d660f47a-SNAPSHOT.pom):

<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-reflect</artifactId>
    <version>2.13.15</version>
</dependency>

@jackkoenig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a fix to main: 59a9904

It's really interesting that this doesn't break standard Coursier dependency resolution (the latest SNAPSHOTs work just fine in normal Scala flows). I believe this is because any String is a valid version in Maven and depending on the order in which you fetch dependencies and resolve versions, you may identify that 2.<whatever> is a higher version than macros[2.13.15].scalaVersion and thus never try to fetch this "version" of scala-reflect. Clearly our internal flow does things in a different order.

Please sign in to comment.