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

fix: upgrade rollup 4.22.2, deterministic chunk hashing fix #18151

Closed
wants to merge 1 commit into from

Conversation

mattkubej
Copy link
Contributor

@mattkubej mattkubej commented Sep 20, 2024

Description

We recently encountered an issue where hashes produced by rollup were non-deterministic when collisions occur. A fix has been upstreamed to rollup to resolve this and was released in version 4.22.2. Our application currently has a patch to mitigate this issue, so by upgrading rollup we can remove it.

More details about the issue and resolution within rollup can be found in the following PR: rollup/rollup#5644

Looking over the rollup releases, I am not seeing any change that would require an implementation change to vite. So, it seems this should be safe to upgrade.

Copy link

stackblitz bot commented Sep 20, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@mattkubej
Copy link
Contributor Author

mattkubej commented Sep 20, 2024

Looks like rollup released a couple of patches this morning. I'll update this PR to capture those as well.

Also, seeing a build error, which is present for me on main as well too. So, trying to take a look at that as well. Looks like a TS issue.

Edit: error on main is due to installing with pnpm i instead of pnpm i --frozen-lockfile

@mattkubej mattkubej changed the title fix: upgrade rollup 4.22.0, deterministic chunk hashing fix fix: upgrade rollup 4.22.2, deterministic chunk hashing fix Sep 20, 2024
@bluwy
Copy link
Member

bluwy commented Sep 20, 2024

Why do you need to patch vite to bring in the rollup upgrade? It should be possible for a package manager to update the nested dependency directly without vite bumping it. The ^ allows that.

@mattkubej
Copy link
Contributor Author

Why do you need to patch vite to bring in the rollup upgrade? It should be possible for a package manager to update the nested dependency directly without vite bumping it. The ^ allows that.

Thanks for taking a look at this!

You're right, we do not need to patch vite to bring in the rollup upgrade. I just figured this might be helpful to expedite the adoption of the change and bring more awareness to it in case others encounter it.

Happy to close this PR if you'd prefer.

@sapphi-red
Copy link
Member

Closing as Rollup was updated in #18180.

@sapphi-red sapphi-red closed this Oct 3, 2024
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