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

Please split hak task on two steps fetch and build #594

Closed
sergeymarkow opened this issue Mar 26, 2023 · 3 comments
Closed

Please split hak task on two steps fetch and build #594

sergeymarkow opened this issue Mar 26, 2023 · 3 comments

Comments

@sergeymarkow
Copy link

Hi

I'm a packager for a Linux distro and trying to add element-desktop but I can do it without hak only. Which means avoiding of some useful features. The issue is because yarn run hak do fetch before build but our build server do build offline. That is why we do any fetching before build. For most of the project we can split fetch an build by yarn cache. Unfortunately hak do not use yarn cache for matrix-seshat and keytar.

Workaround for now is fetching and building matrix-seshat&keytar manually then placing them to element-desktop folder. I'm working on this steps now but it will take a long time to do it and it will be hard to support(((

@sergeymarkow sergeymarkow changed the title Please split hak task on to steps fetch and build Please split hak task on two steps fetch and build Mar 26, 2023
@t3chguy
Copy link
Member

t3chguy commented Mar 27, 2023

The script is already split, without any arguments it runs all its subcommands, you can run them individually though.

https://github.com/vector-im/element-desktop/blob/develop/scripts/hak/index.ts#L116

So you

yarn run hak check
yarn run hak fetch
yarn run hak fetchDeps

then in your build environment

yarn run hak build
yarn run hak copyandlink

@t3chguy t3chguy closed this as completed Mar 27, 2023
@sergeymarkow
Copy link
Author

sergeymarkow commented Mar 28, 2023

It sill tries to fetch some artifacts:
neon info forcing rebuild for new build settings
neon info running cargo
Updating crates.io index
warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
error: Unable to update registry crates-io

Caused by:
failed to fetch https://github.com/rust-lang/crates.io-index

Caused by:
network failure seems to have happened
if a proxy or similar is necessary net.git-fetch-with-cli may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
neon ERR! cargo build failed

@t3chguy
Copy link
Member

t3chguy commented Mar 29, 2023

If the underlying build stages of openssl, sqlcipher, keytar need the internet I'm not sure what we can do about it. If it is seshat then I suggest an issue https://github.com/matrix-org/seshat - given the cargo looking error, I'm inclined to think it could be neon/seshat needing the internet.

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

2 participants