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

tweak XLSX export worker to make Piscina happy under Electron #646

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

paulfitz
Copy link
Member

Adds a dummy default export to the worker exporter script used for producing XLSX. This method exists only to make Piscina happier. With it, Piscina will load this file using a regular require(), which under Electron will deal fine with Electron's ASAR app bundle. Without it, Piscina will try fancier methods that aren't at the time of writing correctly patched to deal with an ASAR app bundle, and so report that this file doesn't exist instead of exporting an XLSX file.

I tried various other solutions such as upgrading Electron, unpacking various files, patching Piscina, and this was overall the simplest.

See gristlabs/grist-desktop#9

Adds a dummy default export to the worker exporter script used
for producing XLSX. This method exists only to make Piscina
happier. With it, Piscina will load this file using a regular
require(), which under Electron will deal fine with Electron's
ASAR app bundle. Without it, Piscina will try fancier methods
that aren't at the time of writing correctly patched to
deal with an ASAR app bundle, and so report that this
file doesn't exist instead of exporting an XLSX file.

I tried various other solutions such as upgrading Electron,
unpacking various files, patching Piscina, and this was
overall the simplest.

See gristlabs/grist-desktop#9
@paulfitz paulfitz changed the title tweak XLSX export worker to make Piscina happy under Electon tweak XLSX export worker to make Piscina happy under Electron Aug 27, 2023
Copy link
Member

@dsagal dsagal left a comment

Choose a reason for hiding this comment

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

Thanks for digging into this and finding this little workaround.

@paulfitz paulfitz merged commit 7aebdd1 into gristlabs:main Aug 28, 2023
13 checks passed
@paulfitz paulfitz deleted the paulfitz/tweak-worker branch August 28, 2023 12:11
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.

None yet

2 participants