Skip to content

Builds are non-deterministic if multiple files share the same #1770

Discussion options

You must be logged in to vote

I think this is indeed a bug.

One idea to fix this was check whether finalDestLoc already used in 0. Find all source files. phase before building them.

   // 0. Find all source files.
   for (const [mountedDir, mountEntry] of Object.entries(config.mount)) {
+    const finalDestLocSet = new Set();
     const allFiles = glob.sync(`**/*`, {
       ignore: [...config.exclude, ...config.testOptions.files],
       cwd: mountedDir,
@@ -424,6 +425,13 @@ export async function command(commandOptions: CommandOptions) {
       const fileLoc = path.resolve(rawLocOnDisk); // this is necessary since glob.sync() returns paths with / on windows.  path.resolve() will switch them to the native path separato…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@Rich-Harris
Comment options

@FredKSchott
Comment options

Answer selected by FredKSchott
Comment options

You must be logged in to vote
2 replies
@FredKSchott
Comment options

@FredKSchott
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants