Skip to content

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

@lihaoyi

Description

@lihaoyi

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions