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

Deterministic args file stamp #189

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

gontard
Copy link
Contributor

@gontard gontard commented Feb 23, 2021

Since #188 the scalafix is almost machine-independent but we discovered that the args was not determinist across machines.
This PR fixes this issue by sorting the classpath and the dependencies before hashing them.

Sort the classpath and the dependencies to ensure that the
stamping is deterministic across machines.
@gontard gontard marked this pull request as ready for review February 23, 2021 10:30
@bjaglin bjaglin merged commit 30a5703 into scalacenter:master Feb 23, 2021
@bjaglin
Copy link
Collaborator

bjaglin commented Feb 23, 2021

I can't find an easy way to guard this against regression via a scripted. The best I could think of would be to compare the args stamp generated by a scripted across JVMs/OS on GitHub Actions using a shared volume somehow, but that's far from trivial... I think this is something we'll have to consider if/when we leverage/advertise support for sbt/sbt#6298 in sbt-scalafix. Until then, the "machine-independant" nature of the sbt-scakafix cache remains partial and best-effort anyway.

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.

3 participants