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

Use in offline build #1

Open
Lunarequest opened this issue Jun 20, 2021 · 9 comments
Open

Use in offline build #1

Lunarequest opened this issue Jun 20, 2021 · 9 comments

Comments

@Lunarequest
Copy link

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?

@shiftkey
Copy link
Member

shiftkey commented Jul 6, 2021

@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...

@Lunarequest
Copy link
Author

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

@shiftkey
Copy link
Member

shiftkey commented Jul 8, 2021

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:

https://github.com/desktop/desktop/blob/3b3b36ce70222c3920f41e76c3445db5d4bd1d80/app/package.json#L29

    "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

@Lunarequest
Copy link
Author

Maybe we can point it to a precloned repo instead? Or prebuild binaries. It should be fairly easy to prebuild binaries in the flatpak

@Lunarequest
Copy link
Author

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?

@sergiou87
Copy link
Member

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

@Lunarequest
Copy link
Author

That's awesome to hear. Any idea roughly when we can expect the removal of this as a dependency

@sergiou87
Copy link
Member

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 😓

@Lunarequest
Copy link
Author

Ah that blows. It should give me enough time to sort out any issues with the current release on flatpaks.

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

No branches or pull requests

4 participants
@shiftkey @sergiou87 @Lunarequest and others