Skip to content

Make bootstrap scripts more flexible with //| mill-version key #5354

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

arturaz
Copy link
Contributor

@arturaz arturaz commented Jun 21, 2025

Removes these limitations from the //| mill-version: value frontmatter:

  • Allows //| mill-version on any line of the build header
  • Allow mill-version and value to be quoted by single or double quotes
  • Allows YAML comments to be placed after the build header: //| mill-version: 1.0.0-RC2 # this is a comment

It currently allows nonsensical quoting like //| "mill-version': "1.0.0', but I figured it's not worth complicating the parser, given that it's written in sh/cmd scripts.

Fixes #5309

import utest.framework.TestPath
import utest.*

object MillVersionFrontmatterTests extends TestSuite {
Copy link
Member

Choose a reason for hiding this comment

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

Let's test this using MILL_TEST_DRY_RUN_LAUNCHER_SCRIPT=true. That would make the tests run much faster than actually running Mill and bootstrapping a Mill daemon which is what the code does now, while still exercising the important part of the code which is the mill.bat/mill.sh parser logic

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.

Make bootstrap scripts more flexible with //| mill-version key
2 participants