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

Consolidate import $file.foo.bar into build.foo.bar namespace #3894

Closed
lihaoyi opened this issue Nov 2, 2024 · 0 comments · Fixed by #4462
Closed

Consolidate import $file.foo.bar into build.foo.bar namespace #3894

lihaoyi opened this issue Nov 2, 2024 · 0 comments · Fixed by #4462
Milestone

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Nov 2, 2024

This would make it more consistent with how Scala source files behave in general and allow IDEs to understand the references without any customization. The old syntax can remain for migration compatibility

Might need to wait for 0.13.0 depending on whether this needs scala 3 or whether it needs to break bincompat (not sure). We should at the same time split Discover[T] into an API trait and implementation class to minimized the surface area constrained by binary compatibility requirements

@lihaoyi lihaoyi changed the title Consolidate import $file.foo.bar into mill.foo.bar namespace Consolidate import $file.foo.bar into build.foo.bar namespace Nov 2, 2024
@lihaoyi lihaoyi added this to the 0.13.0 milestone Nov 3, 2024
lihaoyi added a commit that referenced this issue Nov 11, 2024
…#3942)

This helps make the IDE happy

Before:

<img width="976" alt="Screenshot 2024-11-12 at 12 57 33 AM"
src="https://github.com/user-attachments/assets/20cc2f6b-280c-44e5-bc32-7131d46713a1">

After:

<img width="976" alt="Screenshot 2024-11-12 at 1 23 51 AM"
src="https://github.com/user-attachments/assets/e09cd2fe-b39a-4810-a900-711317b06f94">




We can't do similar for `import $file`, because it conflicts with the
`=> $file` renaming import in the code generation. But hopefully that
would be fixed later by #3894
@lihaoyi lihaoyi closed this as completed in 598aaea Feb 4, 2025
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

Successfully merging a pull request may close this issue.

1 participant