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

Make test build deterministic #438

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Conversation

markw65
Copy link

@markw65 markw65 commented Sep 9, 2023

Every time I build, I get a new version of docs/js/test-bundle-min.js. It seems to be caused by @rollup/plugin-multi-entry finding finding its inputs non-deterministically.

Instead of supplying a glob pattern for input, explicitly run glob and provide a sorted array. docs/js/test-bundle-min.js no longer changes unless the source code changes.

I'm not quite sure how to test this - I ran npm run build:notidy then npm run test:web and it seemed to work the same as before.

@hildjj
Copy link
Contributor

hildjj commented Dec 3, 2023

Not sure why I didn't reply to this when you posted it, this is a great change. Please add a CHANGELOG.md entry, and I'll merge.

@hildjj
Copy link
Contributor

hildjj commented Dec 7, 2023

Quick rebase of CHANGELOG here, please, then ready to go.

@hildjj hildjj merged commit df33c16 into peggyjs:main Dec 7, 2023
9 checks passed
@markw65 markw65 deleted the deterministic-tests branch December 10, 2023 20:46
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.

2 participants