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

Move mill.BuildInfo tomill.main.BuildInfo #2537

Merged
merged 1 commit into from
May 21, 2023

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented May 20, 2023

We currently encourage import mill._, which causes problems when people want to also import mill.contrib.buildinfo.BuildInfo. There's a workaround to import mill.{BuildInfo => MillBuildInfo, _}, which we do in several places in our own codebase, but it's a pain in the neck and an unnecessary hurdle for users to cross. The majority of users would not need to access mill.BuildInfo at all, so putting it in the default namespace just adds clutter.

The mill.BuildInfo is used throughout mill.scalalib and mill.scalajslib and so on, but is not used in main/, so I put it in as downstream a module as possible which turns out to be mill.main.BuildInfo

@lihaoyi lihaoyi marked this pull request as ready for review May 21, 2023 02:14
@lihaoyi lihaoyi requested review from lefou and lolgab May 21, 2023 03:12
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Change looks ok-ish. I think having these constant defined earlier in the dependency chain is a plus, but I also see the actual collision. But now, that we identified the root issue, a plugin and it's product (a generated class) sharing the same name, we should try to fix it there. Or at least try to. Could we rename the plugin to e.g. GenBuildInfo if we want stick with the generated BuildInfo name?

@lihaoyi
Copy link
Member Author

lihaoyi commented May 21, 2023

Sounds good. I'll merge this first, and open a follow up to possibly rename BuildInfo

@lihaoyi lihaoyi merged commit 36ee950 into com-lihaoyi:main May 21, 2023
@lefou lefou added this to the 0.11.0-M10 milestone May 22, 2023
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 this pull request may close these issues.

2 participants