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

Added support for snaps #2180

Closed
wants to merge 1 commit into from
Closed

Added support for snaps #2180

wants to merge 1 commit into from

Conversation

ivan770
Copy link

@ivan770 ivan770 commented Apr 19, 2022

Closes #2171

@ivan770
Copy link
Author

ivan770 commented Apr 19, 2022

There are a few things that left to be done:

  1. I registered the name helix, but since I'm not in the org nor I'm an active maintainer I'll transfer it;
  2. Someone who receives transferred name will have to request classic snap approval on the forum. This step is required, since currently snaps do not support interop with external environment while being inside confinement. The whole process is described here;
  3. After that, we can use build.snapcraft.io to automatically build and publish new versions;

@the-mikedavis the-mikedavis added the S-waiting-on-review Status: Awaiting review from a maintainer. label May 18, 2022
@the-mikedavis the-mikedavis self-assigned this Aug 6, 2022
@the-mikedavis
Copy link
Member

the-mikedavis commented Aug 6, 2022

Sorry for the delay on this. Is there any way to package for snaps without needing anything "official" or from a maintainer? We're happy to answer questions and such but we prefer to have as much packaging done by community effort as possible - otherwise our personal time faces death by a million package managers 😄

snaps do not support interop with external environment while being inside confinement

Is confinement part of the build or runtime lifecycle? When building from releases, we provide a helix-$VERSION-source.tar.xz artifact in the GitHub Releases page which has all of the tree-sitter grammar repositories pre-downloaded. If you use that, the build process doesn't need to reach out over the network at all. Nixpkgs (i.e. the Nix package collection which builds in network isolation) uses this for example and it ends up being a very boring rust project build. That can solve build isolation and I don't think helix really needs runtime network access - it essentially shells out to git (and maybe curl in the future) for that stuff.

@the-mikedavis the-mikedavis removed the S-waiting-on-review Status: Awaiting review from a maintainer. label Aug 6, 2022
@ivan770
Copy link
Author

ivan770 commented Aug 7, 2022

Sorry for the delay on this. Is there any way to package for snaps without needing anything "official" or from a maintainer? We're happy to answer questions and such but we prefer to have as much packaging done by community effort as possible - otherwise our personal time faces death by a million package managers 😄

I think it's possible for me to publish a snap package, I'll try to handle all the publishing process then.

Is confinement part of the build or runtime lifecycle? When building from releases, we provide a helix-$VERSION-source.tar.xz artifact in the GitHub Releases page which has all of the tree-sitter grammar repositories pre-downloaded. If you use that, the build process doesn't need to reach out over the network at all. Nixpkgs (i.e. the Nix package collection which builds in network isolation) uses this for example and it ends up being a very boring rust project build. That can solve build isolation and I don't think helix really needs runtime network access - it essentially shells out to git (and maybe curl in the future) for that stuff.

Confinement is part of a runtime lifecycle, the build part is already solved out by this PR. The key feature of snaps is that they provide runtime application isolation with granular permission configuration, but since Helix is (sorta) an IDE, I'll request a permission on Snapcraft forums to publish a package without permission isolation.

@the-mikedavis
Copy link
Member

Awesome, thank you!

Looking more into confinement, I think we do need classic mode so that we can call language server binaries 👍

Naively, this snapcraft.yaml looks pretty good although I'm not too familiar with the plugins or schema. Could you rebase onto a more recent master and unmark this as a draft when it's ready? We changed up some of the actions a while back so there are some unmet required checks for the branch protection rules that will need to run to merge

@kirawi kirawi added A-packaging Area: Packaging and bundling S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 13, 2022
@kirawi kirawi added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 24, 2022
@pascalkuthe
Copy link
Member

Closing since there is a helix snap package now, see #7545

@pascalkuthe pascalkuthe closed this Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-packaging Area: Packaging and bundling S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapcraft support
4 participants