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

Import files not working #4618

Open
joan38 opened this issue Feb 24, 2025 · 3 comments
Open

Import files not working #4618

joan38 opened this issue Feb 24, 2025 · 3 comments

Comments

@joan38
Copy link
Collaborator

joan38 commented Feb 24, 2025

Related to #4524

Reproduce

mkdir mill-issue-4618 && cd $_
curl -L https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/0.13.0-M0/mill -o mill && chmod +x mill

cat > .mill-version <<EOF
0.13.0-M0-95-606de3
EOF

cat > build.mill <<EOF
package build

import mill.*

object \`package\` extends RootModule with SparkConfig
EOF

cat > MyJob.mill <<EOF
package build

trait MyJob extends SparkConfig
EOF

cat > SparkConfig.mill <<EOF
package build

trait SparkConfig extends mill.Module
EOF

./mill clean
[build.mill-62/66] compile
[build.mill-62] [info] compiling 3 Scala sources to /.../mill-issue-4618/out/mill-build/compile.dest/classes ...
[build.mill-62] [error] -- [E6] /.../mill-issue-4618/MyJob.mill:3:21
[build.mill-62] [error] 3 │trait MyJob extends SparkConfig
[build.mill-62] [error]   │                    ^^^^^^^^^^^
[build.mill-62] [error]   │Not found: type SparkConfig
[build.mill-62] [warn] -- /.../mill-issue-4618/build.mill:9:1
[build.mill-62] [warn] Line is indented too far to the left, or a `}` is missing
[build.mill-62] [warn] one warning found
[build.mill-62] [error] one error found

Thanks

@joan38 joan38 changed the title Cyclic reference involving val <import> Import files not working Feb 24, 2025
@lihaoyi
Copy link
Member

lihaoyi commented Feb 25, 2025

@joan38 could you minimize it further?

@joan38
Copy link
Collaborator Author

joan38 commented Feb 25, 2025

Done.
I was actually trying to report some cyclic issue but then got this one in trying to minimize. So let's start with this import issue.
Looks like it's having trouble to transitively import files.

@lefou
Copy link
Member

lefou commented Feb 25, 2025

@joan38 I really love how you provide reproducers. Reminds me of my early Linux from Scratch days.

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

3 participants