Skip to content

Conversation

@lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Dec 23, 2025

  • We generate .mill.yaml files when importing Java projects using ./mill init.

  • We still generate Scala code in mill-build/src/, which lets us avoid duplication in the .mill.yaml files since the yaml files can extend the shared trait containing the common config

  • Scala project import makes use of cross values which are currently not supported in .mill.yaml so we leave those as generating .mill files for now.

  • You can now tag top-level YAML values with !append, which concatenates the Seq the overridden value rather than completely replacing it. This is necessary for .mill.yaml Java project import to work, as we make use of super ++ in some places. This is implemented via parseYaml0 converting the !append tags into a synthetic {"$millAppend": ...} wrapper, which is then deserialized into an Appendable[T] that lets us decide later on whether to append something or not

The !append stuff is mentioned in some updated doc examples which demonstrate and exercise it

@lefou
Copy link
Member

lefou commented Dec 23, 2025

Is the YAML renderer an addition to the Scala renderer, or do we loose the latter?

Asking, since IMHO we should keep the Scala renderer, e.g. to later also convert YAML projects to Scala projects, in case, users need more customizations.

@lihaoyi lihaoyi changed the title Convert ./mill init to generate .mill.yaml format Convert ./mill init to generate .mill.yaml format, add !append support Jan 9, 2026
@lihaoyi
Copy link
Member Author

lihaoyi commented Jan 9, 2026

Going to merge this first, there's some unresolved breakage that we'll have to look into post-merge. CC @ajaychandran

@lihaoyi lihaoyi merged commit c03fa73 into com-lihaoyi:main Jan 9, 2026
31 of 34 checks passed
@lefou lefou added this to the 1.1.0-RC4 milestone Jan 9, 2026
lihaoyi added a commit that referenced this pull request Jan 10, 2026
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