You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pyodide.loadPackage() should not access the file system with nodeFsPromisesMod.mkdir when not necessary, or the cache dir already exists.
It can be done automatically, or by providing an option to skip the file system access.
Motivation
loadPackage()calls nodeFsPromisesMod.mkdir any time to ensure the directory exists.
However, it causes an error if the file system is read-only even when the directory and the cached packages already exist.
My actual use case is to ship Pyodide in an Electron app with the downloaded package files. In this case, the bundled files are visible to the Node process of the Electron app via fs module but not writable as they are packaged in an ASAR archive and the archive is read-only. It's whitphx/stlite#831 (comment).
Pitch
One option is to call mkdir only when the cache directory does not exist.
Another is to add an option to skip the file system access, e.g. loadPackage(packageName, { skipDownload: true }).
The text was updated successfully, but these errors were encountered:
馃殌 Feature
pyodide.loadPackage()
should not access the file system withnodeFsPromisesMod.mkdir
when not necessary, or the cache dir already exists.It can be done automatically, or by providing an option to skip the file system access.
Motivation
loadPackage()
callsnodeFsPromisesMod.mkdir
any time to ensure the directory exists.However, it causes an error if the file system is read-only even when the directory and the cached packages already exist.
My actual use case is to ship Pyodide in an Electron app with the downloaded package files. In this case, the bundled files are visible to the Node process of the Electron app via
fs
module but not writable as they are packaged in an ASAR archive and the archive is read-only. It's whitphx/stlite#831 (comment).Pitch
mkdir
only when the cache directory does not exist.loadPackage(packageName, { skipDownload: true })
.The text was updated successfully, but these errors were encountered: