Use in offline build
Lunarequest opened this issue · 9 comments
I'm trying to package github-desktop in a flatpak, currently this package is causing some issues with this. what does yarn expect to download when it fetches this package?
@sergiou87 👋 this is something that would help us doing an offline version of Desktop in Flatpak, if you have time to answer. Are we able to control this like we do with DUGITE_CACHE_DIR
?
@AdvaithM can you share what error you're seeing locally when you're trying to include this? That might help us get context on what you're trying to achieve...
I currently get the following error when I try and build, it looks like its trying to clone this repo and build it.
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads https://github.com/desktop/node-detect-arm64-translation
Directory: /run/build/github-desktop
Output:
fatal: unable to access 'https://github.com/desktop/node-detect-arm64-translation/': Could not resolve host: github.com
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
verbose 84.079021333 Error: Command failed with exit code 128.
at /run/build/github-desktop/vendor/yarn-1.21.1.js:36439:32
at Generator.throw (<anonymous>)
at step (/run/build/github-desktop/vendor/yarn-1.21.1.js:310:30)
at /run/build/github-desktop/vendor/yarn-1.21.1.js:323:13
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
error Command failed with exit code 128.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: module github-desktop: Child process exited with code 128
That's an interesting message, and I think it's related to how the package is used in desktop/desktop
- it's included as a Git repository pointing to a specific tag, which npm
supports. Not sure how that affects offline building, but this looks like the URL that NPM is trying to resolve:
"detect-arm64-translation": "https://github.com/desktop/node-detect-arm64-translation#v1.0.4",
I think that means this package doesn't have any prebuilt binaries, so the changes we made to dugite
I don't think will help our case
Maybe we can point it to a precloned repo instead? Or prebuild binaries. It should be fairly easy to prebuild binaries in the flatpak
I've currently hacked around this issue by patching package.json
to point the repo to a precloned one. Currently this is the only way a offline build is possible. Could the desktop team try and come up with a better solution?
Could the desktop team try and come up with a better solution?
Yes! This is only a temporary solution until we can use a new API I added to Electron in electron/electron#29168
That's awesome to hear. Any idea roughly when we can expect the removal of this as a dependency
No idea… I was just checking if the new runningUnderARM64Translation
property has been released and I don't see anything in the release notes. Also, we try to stay 1 major version behind the latest stable, so this could still take a few months 😓
Ah that blows. It should give me enough time to sort out any issues with the current release on flatpaks.