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

Define reasonable platformSuffix in MillBuildPlatformModule #2635

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

lefou
Copy link
Member

@lefou lefou commented Jun 26, 2023

It's a typical use case to add plugin dependencies to a meta-build. To make this more convenient, we set the platformSuffix to _mill<binary-platform>.

@lihaoyi
Copy link
Member

lihaoyi commented Jun 27, 2023

This looks good to me. If we're relying on platformSuffix, should we also remove the special-case logic in

signature.split("[:]") match {
case Array(org, "", pname, "", version)
if org.length > 0 && pname.length > 0 && version.length > 0 =>
s"${org}::${pname}_mill$$MILL_BIN_PLATFORM:${version}"
case Array(org, "", "", pname, "", version)
if org.length > 0 && pname.length > 0 && version.length > 0 =>
s"${org}:::${pname}_mill$$MILL_BIN_PLATFORM:${version}"
that duplicates the handling of the second ::?

@lefou
Copy link
Member Author

lefou commented Jun 27, 2023

This looks good to me. If we're relying on platformSuffix, should we also remove the special-case logic in

signature.split("[:]") match {
case Array(org, "", pname, "", version)
if org.length > 0 && pname.length > 0 && version.length > 0 =>
s"${org}::${pname}_mill$$MILL_BIN_PLATFORM:${version}"
case Array(org, "", "", pname, "", version)
if org.length > 0 && pname.length > 0 && version.length > 0 =>
s"${org}:::${pname}_mill$$MILL_BIN_PLATFORM:${version}"

that duplicates the handling of the second ::?

I cleaned that up. We still need the pre-processor to handle special place holders and the empty version.

@lefou lefou marked this pull request as draft June 27, 2023 09:59
We always resolve dependencies with `ScalaModule`s,
so we already handle the platform
@lefou lefou marked this pull request as ready for review June 27, 2023 19:46
@lefou lefou requested a review from lihaoyi June 27, 2023 19:46
@lefou lefou merged commit c537f29 into main Jun 27, 2023
37 checks passed
@lefou lefou deleted the meta-build-platform branch June 27, 2023 20:25
@lefou lefou added this to the 0.11.2 milestone Jun 27, 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.

MillBuildRootModule should preset the platformSuffix to _mill0.11
2 participants