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
Use only single rollup-plugin-copy() to avoid race condition #843
Conversation
pyscriptjs/rollup.config.js
Outdated
@@ -47,14 +61,7 @@ export default { | |||
}), | |||
// This will make sure that examples will always get the latest build folder | |||
!production && copy({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are managing file copy_targets, let's remove the !production
on line 63 limiting this to not-production
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed and removed.
I think we need to revisit this one.
|
Thanks @tedpatrick ! I've adjusted the file per your thoughts, removing the duplicate commands and cleaning up the definition of |
I think it is this line defining const production = !process.env.ROLLUP_WATCH || (process.env.NODE_ENV === "production"); |
Thanks for stopping the action - good catch! And interesting - that line has been in that form for ages... but in the commit that triggered that broken build 06fe46a, I had changed it to: - const production = !process.env.ROLLUP_WATCH || (process.env.NODE_ENV === "production");
+ const production = (process.env.NODE_ENV === "production"); Maybe that ROLLUP_WATCH flag is doing more than I thought... let me push a commit adding that flag back in and we'll see what happens in CI... |
* Upgrade and Pin Dependencies * Removal all unused deps * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * lock * remove svelte-fa reference from the svg style. Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/psf/black: 22.8.0 → 22.10.0](psf/black@22.8.0...22.10.0) - [github.com/asottile/pyupgrade: v2.38.2 → v3.1.0](asottile/pyupgrade@v2.38.2...v3.1.0) - [github.com/pre-commit/mirrors-eslint: v8.23.1 → v8.25.0](pre-commit/mirrors-eslint@v8.23.1...v8.25.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Hide py-config element * display:none for all web components * docs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add style tests for raw html and pyscript enabled html * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * test naming Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Rerunning actions. It looked to fail in an integration test. But the fact that it reaches integration is positive! |
Yes I agree, the |
@JeffersGlass Merge when ready. Merge policy: You build it, you merge it! |
Great work @JeffersGlass, Thanks. |
…t#843) * Use only single copy() plugin to avoid race condition * clean production def, better copy_target structure * Restore '!process.env.ROLLUP_WATCH to production definition Co-authored-by: Ted Patrick <tpatrick@anaconda.com>
#839 improved rollup logic - it always copies
build
folder toexamples/build
, regardless of whether this is a production build or not. However, it seems thatrollup-plugin-copy
doesn't behave nicely when used multiple times in a single rollup config. Possibly a race condition or data corruption? Errors includeEONENT: file not found 'build/index.html'
,EBUSY: resource busy or locked
on Linux and Windows build systems.This PR moves that logic outside of the exported rollup config, to avoid the error.