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

Build crash 0.12.4 -> 0.12.7 #4482

Open
Quafadas opened this issue Feb 5, 2025 · 6 comments
Open

Build crash 0.12.4 -> 0.12.7 #4482

Quafadas opened this issue Feb 5, 2025 · 6 comments

Comments

@Quafadas
Copy link
Contributor

Quafadas commented Feb 5, 2025

I can't easily share the actual build, which is not public. The error message is suggestive, that it is something to do with my useage of smithys mill plugin.

1 tasks failed======================== smithyapi.jvm.compile ============================== 35s
smithyapi.jvm.resolvedIvyDeps
Resolution failed for 1 modules:
--------------------------------------------
  mill-internal:smithyapi-jvm:0+mill-internal
        No test override found at jdk.internal.loader.ClassLoaders$AppClassLoader@5a07e868/mill/local-test-overrides/mill-internal-smithyapi-jvm

Here's the list of plugins.

import $ivy.`io.chris-kipp::mill-ci-release::0.1.9`
import $ivy.`com.disneystreaming.smithy4s::smithy4s-mill-codegen-plugin::0.18.29`
import $ivy.`com.github.lolgab::mill-crossplatform::0.2.4`
import $ivy.`com.lihaoyi::mill-contrib-artifactory:`
import $ivy.`com.goyeau::mill-scalafix::0.4.0`
import $ivy.`com.lihaoyi::mill-contrib-bloop:`

The error message points (to me) at smithy. Recorded for posterity. I have some public mill <.-> smithy experiments so if I have the chance later, I'll try and configure one and see if I can reproduce shareably.

@lihaoyi
Copy link
Member

lihaoyi commented Feb 6, 2025

CC @alexarchambault, seems like it has to do with the dependency resolution overhaul

@Quafadas
Copy link
Contributor Author

Quafadas commented Feb 6, 2025

For the sake of transparency, I tried to reproduce this in a cleanroom with a very similar setup and I couldn't - worked as expected - so I'm not quite sure what to do next, as that makes it look like an repo specific problem. I'm not clear where to start on figuring it out though.

@Quafadas
Copy link
Contributor Author

Quafadas commented Feb 6, 2025

At length I managed to get this project to provide a similar error, however, I'm not sure whether it's related to my original issue or not.

Should be able to open up a devcontainer / clone the "nativeLink" branch here;
https://github.com/Quafadas/mill-full-stack/tree/nativeLink

Then
./mill backend.nativeLink

[172/172] ============================== backend.nativeLink ============================== 25s
1 tasks failed
backend.scalaNativeWorkerClasspath 
Resolution failed for 1 modules:
--------------------------------------------
  com.lihaoyi:mill-scalanativelib-worker-0.4_2.13:0.12.7 
        No test override found at jdk.internal.loader.ClassLoaders$AppClassLoader@639fee48/mill/local-test-overrides/com.lihaoyi-mill-scalanativelib-worker-0.4_2.13
        Not an internal Mill module: com.lihaoyi:mill-scalanativelib-worker-0.4_2.13:0.12.7
        not found: /home/vscode/.ivy2/local/com.lihaoyi/mill-scalanativelib-worker-0.4_2.13/0.12.7/ivys/ivy.xml
        not found: https://repo1.maven.org/maven2/com/lihaoyi/mill-scalanativelib-worker-0.4_2.13/0.12.7/mill-scalanativelib-worker-0.4_2.13-0.12.7.pom

In this specific case, I think that the scalanativelib-worker artefact doesn't exist, because I've set it to be scala native 0.4, so this might be a red herring.

@gamlerhart
Copy link
Contributor

gamlerhart commented Feb 6, 2025

I got this crash as well. I had to fix some repositoriesTask definitions. I had something like:

object `high-level-module` ...{
    override def moduleDeps = Seq(`low-level-module`) 
    override def repositoriesTask = `low-level-module`.repositoriesTask
}

I fixed it by:

object `high-level-module` ...{
    override def moduleDeps = Seq(`low-level-module`) 
    override def repositoriesTask = {
        super.repositoryTask() ++ // copy and pasted the same repositoryTask definition as in the low-level-module, avoid the reference.
   }

I didn't look into it at all what the underlying reason could be. But looks like repositoryTask and moduleDeps have some inner dependency that you now can run into.

@lefou
Copy link
Member

lefou commented Feb 6, 2025

Could be there is already a fix for it

@alexarchambault
Copy link
Collaborator

I agree with @gamlerhart's suggestion, overriding repositoriesTask and discarding super.repositoriesTask can be a cause of such issues. But #4472 / #4465 should address that.

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

No branches or pull requests

5 participants