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

Nondeterministic behavior when running zinc multiple times in different folders #1540

Open
lihaoyi opened this issue Mar 4, 2025 · 1 comment

Comments

@lihaoyi
Copy link
Contributor

lihaoyi commented Mar 4, 2025

steps

./mill -w 'integration.feature[reproducibility].local.server' mill.integration.ReproducibilityTests.diff`
  • Extract and decompress the zinc analysis files via
cp out/integration/feature/reproducibility/local/server/test.dest/sandbox/run-1/out/mill-build/compile.dest/zinc zinc-1.txt.gz && cp out/integration/feature/reproducibility/local/server/test.dest/sandbox/run-2/out/mill-build/compile.dest/zinc zinc-2.txt.gz &&  gunzip zinc-2.txt.gz && gunzip zinc-1.txt.gz

problem

This results in two different files

Image

Attached

zinc-1.txt
zinc-2.txt

It seems that this libraryClassName key in the zinc config picks a random class from each jar to store in the analysis file, and which class gets picked differs every time

expectation

I would expect the zinc files to contain the same contents every time. I already have custom ReadWriteMappers that successfully normalize all the file paths, but this class-based non-determinism doesn't seem related to any files

notes

It seems like libraryClassName should contain a list of every class available in each library, but somehow it's only containing a single class per library, presumably picked arbitrarily. Not sure if we're configuring zinc incorrectly or something

@lihaoyi
Copy link
Contributor Author

lihaoyi commented Mar 4, 2025

@szeiger did you bump into this when you were working on reproducibility at Databricks?

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

No branches or pull requests

1 participant