Skip to content

Don't copy worker file to itself#405

Merged
simolus3 merged 1 commit intomainfrom
fix-compiling-sync-worker
Apr 14, 2026
Merged

Don't copy worker file to itself#405
simolus3 merged 1 commit intomainfrom
fix-compiling-sync-worker

Conversation

@simolus3
Copy link
Copy Markdown
Contributor

To compile the web worker, we run dart compile js -o packages/powersync/assets/powersync_db.worker.js. Afterwards, we used to copy the emitted JavaScript file to its own path. This is harmless on macOS, but causes the resulting powersync_db.worker.js file to be empty on Linux. That in turn caused release automation failures, I had to manually upload the worker file for the last releases.

This PR should fix the release process and ensure we run tests with workers available.

@simolus3 simolus3 requested a review from LucDeCaf April 14, 2026 11:30
Copy link
Copy Markdown
Contributor

@LucDeCaf LucDeCaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why were we copying the worker file to itself if it's (seemingly) unnecessary? Just curious :)

@simolus3
Copy link
Copy Markdown
Contributor Author

Out of curiosity, why were we copying the worker file to itself if it's (seemingly) unnecessary? Just curious :)

Being to lazy to look it up right now, I think it's probably because we used to emit the worker file in another directory first. I probably changed that at some point of the refactoring and forgot to look at the second half of the file.

@simolus3 simolus3 merged commit 6d63290 into main Apr 14, 2026
6 checks passed
@simolus3 simolus3 deleted the fix-compiling-sync-worker branch April 14, 2026 19:45
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