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

Replace com-lihaoyi/mill/mill script with lefou/millw/millw #3464

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

lefou
Copy link
Member

@lefou lefou commented Nov 4, 2024

This replaces the mill script from the Mill project with the script from the dedicated millw project.

There is no version of the former script, that properly support all Mill version that Scala Steward can handle.

The lefou/millw project supports all Mill version.

Hopefully fix #3463

I didn't test it locally due to not having set up a test environment for Scala steward. Let me know if that is a deal breaker for you.

@lefou lefou marked this pull request as draft November 4, 2024 22:03
lefou added 4 commits November 4, 2024 23:13
The replaces the `mill` script from the Mill project with the dedicated `millw` porject.

There is no version of the former script, that properly support all Mill version that Scala Steward can handle.

The `lefou/millw` project supports all Mill version.

Probably fix scala-steward-org#3463
@lefou lefou force-pushed the use-latest-millw-script branch from 5a9fcf1 to 9a9f1f4 Compare November 4, 2024 22:14
@lefou lefou marked this pull request as ready for review November 4, 2024 22:28
@mzuehlke
Copy link
Member

mzuehlke commented Nov 5, 2024

Thanks for taking care of the mill support in Scala Steward. I have never used mill myself, so I am of no big help here.

The mill executable that you are changing is the one bundled into the Docker image. The public instance https://github.com/VirtusLab/scala-steward-repos/ uses this.
But the https://github.com/scala-steward-org/scala-steward-action/ (maintained by @scala-steward-org/gh-action) use it's own way to get a mill executable.
And the invocation is in both cases the same.

Would the command after the change still work with mill or only with millw ?

@lefou
Copy link
Member Author

lefou commented Nov 5, 2024

Since I can't see the logs of the official instance, I don't know what the issues are there, but I can tell you, that for some of my repos there are no updates for quite some months while other repos work very well. Most repos seeing no updates are in the com-lihaoyi org, which could just means, the offical Scala Steward instance doesn't support Mill 0.12 yet.

To see some logs for the very Mill project, I enabled the scala-steward-action and identified the issue being a buggy script. If this PR isn't the right location to fix it, I'm grateful for any concrete pointers. I can try to look into https://github.com/scala-steward-org/scala-steward-action/ myself, but it's not really my field of expertise.

Would the command after the change still work with mill or only with millw ?

TBH, I'm not sure how to read this question.

First, millw can be renamed to mill, which is in fact the typical usage. (I only keep the millw name, to be able to distinguish in the communication.)

millw is a drop-in replacement for mill, accepting all parameters as mill does and any kind of version selection (.mill-version file, .config/mill-version file, MILL_VERSION env var, DEFAULT_MILL_VERSION env var). It especially supports older Mill version down to 0.3.x. In fact, most Mill users just install millw into $HOME/bin/mill and never use the local ./mill script you can find in many projects.

In contrast, the recent mill script of the Mill repo only supports the latest Mill versions, and older versions of that script don't fully support newer Mill releases.

Although I think the peculiar issue #3463 is only present in a small set of releases of the mill script and definitely fixed in more recent versions, it's is still advisable to use millw instead, due to the better backward compatibility story. And since Scala Steward is all about updating older projects, it's important to be able to read those older projects. The Mill plugin Scala Steward uses, is still able to read Mill projects from version 0.6.0 upwards. So we should ensure the actual runner also works.

If you meant the other change I did (use of the --no-server instead of -i), it is just some house keeping, as the --no-server option is what we really want to use. Using -i has the same effect, but is semantically a bit off. I can split out that change, if you like.

@mzuehlke mzuehlke added this to the 0.31.1 milestone Nov 8, 2024
@mzuehlke mzuehlke added the bug Something isn't working label Nov 8, 2024
@mzuehlke mzuehlke merged commit ae6494d into scala-steward-org:main Nov 8, 2024
5 checks passed
@fthomas
Copy link
Member

fthomas commented Dec 30, 2024

The lefou/millw repository has been archived on Dec 8, 2024. It seems to me that we should download the Mill script now from https://github.com/com-lihaoyi/mill again.

@lefou lefou deleted the use-latest-millw-script branch December 30, 2024 10:06
@lefou
Copy link
Member Author

lefou commented Dec 30, 2024

Yes, all scripts now reside in the mill repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors while running on a Mill project
3 participants