-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add dev.zed.Zed #5253
base: new-pr
Are you sure you want to change the base?
Add dev.zed.Zed #5253
Conversation
Zed doesn't have an official Linux distribution yet, requiring users to help build from source -- so I decided to help make one |
dev.zed.Zed.desktop
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file should be sumbitted upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be using this instead
https://github.com/zed-industries/zed/blob/main/crates/zed/resources/zed.desktop
icons/dev.zed.Zed.svg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this icon should be submitted upstream too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using icons there https://github.com/zed-industries/zed/blob/main/crates/zed/resources/app-icon-dev.png
@@ -0,0 +1,6 @@ | |||
{ | |||
"only-arches": [ | |||
"x86_64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHY?
], | ||
"automerge-flathubbot-prs": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
], | |
"automerge-flathubbot-prs": true | |
] |
<project_group> | ||
<group>Zed</group> | ||
</project_group> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<project_group> | |
<group>Zed</group> | |
</project_group> | |
<project_group>Zed</project_group> |
<category>Utility</category> | ||
</categories> | ||
<developer_name>Zed Developers</developer_name> | ||
<update_contact>@ZedSupport</update_contact> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like valid, should be the email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-update_contact
The
<update_contact/>
tag is an optional tag which can be added to provide an email address
<component type="desktop-application"> | ||
<id>dev.zed.Zed</id> | ||
<name>Zed</name> | ||
<summary>High-performance, multiplayer code editor from the creators of Atom and Tree-sitter.</summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<summary>High-performance, multiplayer code editor from the creators of Atom and Tree-sitter.</summary> | |
<summary>High-performance, multiplayer code editor from the creators of Atom and Tree-sitter</summary> |
<videos> | ||
<video> | ||
<source>https://customer-snccc0j9v3kfzkif.cloudflarestream.com/b66a1a0a8b375d13c19afe4b37f92562/downloads/default.mp4</source> | ||
</video> | ||
<video> | ||
<source>https://customer-snccc0j9v3kfzkif.cloudflarestream.com/99f0ed130711eb6f47fca1777efa57ef/downloads/default.mp4</source> | ||
</video> | ||
</videos> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<videos> | |
<video> | |
<source>https://customer-snccc0j9v3kfzkif.cloudflarestream.com/b66a1a0a8b375d13c19afe4b37f92562/downloads/default.mp4</source> | |
</video> | |
<video> | |
<source>https://customer-snccc0j9v3kfzkif.cloudflarestream.com/99f0ed130711eb6f47fca1777efa57ef/downloads/default.mp4</source> | |
</video> | |
</videos> |
Not a valid tag and website doesn't support videos.
</categories> | ||
<developer_name>Zed Developers</developer_name> | ||
<update_contact>@ZedSupport</update_contact> | ||
<url type="homepage">https://www.zed.dev/</url> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<url type="homepage">https://www.zed.dev/</url> | |
<url type="homepage">https://zed.dev/</url> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.zed.dev/ is not reachable, zed.dev is the domain.
<developer_name>Zed Developers</developer_name> | ||
<update_contact>@ZedSupport</update_contact> | ||
<url type="homepage">https://www.zed.dev/</url> | ||
<url type="bugtracker">https://github.com/zed/zed/issues</url> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<url type="bugtracker">https://github.com/zed/zed/issues</url> | |
<url type="bugtracker">https://github.com/zed-industries/zed/issues</url> |
<update_contact>@ZedSupport</update_contact> | ||
<url type="homepage">https://www.zed.dev/</url> | ||
<url type="bugtracker">https://github.com/zed/zed/issues</url> | ||
<url type="help">https://www.zed.dev/support</url> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<url type="help">https://www.zed.dev/support</url> | |
<url type="help">https://zed.dev/support</url> |
<id>dev.zed.Zed</id> | ||
<name>Zed</name> | ||
<summary>High-performance, multiplayer code editor from the creators of Atom and Tree-sitter.</summary> | ||
<description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing developer tag https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#developer-name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post corrections this file should be submitted upstream
👋 Thanks for doing this! There is a parallel effort here too: zed-industries/zed#11949. When built under flatpak does the integrated terminal work, and language server support for rust/ruby/python/etc.etc.? I may be misunderstanding exactly how the sandbox works, but I think it's likely to result in a pretty broken zed install as is. (Not saying you shouldn't bundle it as a flatpak, but that it would be good to understand and document the limitations). |
Hey @ConradIrwin , thanks for the feedback! I wasn't aware of zed-industries/zed#11949 so I'll give that a look.
Definitely a good thing to keep in mind. Someone else addressed a similar concern in the discussion I've made here: zed-industries/zed#discussion=11945 and I've mentioned the solution could simply involve bundling more languages into the manifest, or just using the host shell since that's how the VSCode Flatpak handles this with its integrated terminal |
Converted PR to draft as I fundamentally change the build process from I found the flatpak-cargo-generator so I can convert Zed's Cargo.toml Some initial progress on the offline conversion has proven a bit challenging since I'm coming across build errors such as:
While testing and building locally with the network build arguments worked with no issues -- if it is not up to Flathub's standards I will make sure the manifest/repo is updated accordingly. |
Tagging @someone13574 for visibility |
git dependencies won't work, you have patch them (See examples 1, 2 ) or use vendored tarballs.
You likely want to integrate with ide-flatpak-wrapper like VScode/vscodium does https://github.com/flathub-infra/ide-flatpak-wrapper This will enable using the language SDK extensions published on Flathub and also display first run warnings/messages etc.
Yes this likely needs flatpak-spawn access |
- cargo fetch --manifest-path Cargo.toml --offline --verbose | ||
|
||
# Build Zed with parallel jobs | ||
- cargo build --release --locked --all-features --jobs $(nproc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- cargo build --release --locked --all-features --jobs $(nproc) | |
- cargo build --release --locked --all-features |
don't use nproc
. If you really want to add it (cargo does it by itself) use $FLATPAK_BUILDER_N_JOBS
which honour the flatpak-builder --jobs
argument.
# Install Zed | ||
- install -Dm 755 target/release/Zed --target-directory ${FLATPAK_DEST}/bin/ | ||
|
||
# Install Desktop, MetaInfo, and MIME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any MIME file.
env: | ||
- CARGO_HOME=/run/build/zed/cargo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env: | |
- CARGO_HOME=/run/build/zed/cargo | |
env: | |
CARGO_HOME: /run/build/zed/cargo |
path: patches/Cargo.toml.diff | ||
|
||
# Cargo Dependencies (Generated with: https://github.com/flatpak/flatpak-builder-tools/blob/master/cargo/flatpak-cargo-generator.py) | ||
- type: dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use type: dir
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't even see why you need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, thre is an icon in the upstream repository, use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't there a .desktop file upstream? Then it should be used.
Fairly certain that git blame integration will be broken in addition to the terminal+tasks and any language servers which don't have an sdk extension. Also dev-extensions and the cli. |
</releases> | ||
<metadata_license>CC0-1.0</metadata_license> | ||
<project_license>MIT</project_license> | ||
<content_rating type="oars-1.1"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Zed has audio and chat functionality, this needs to reflect that:
<content_attribute id="social-chat">intense</content_attribute>
<content_attribute id="social-audio">intense</content_attribute>
</description> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image>https://zed.dev/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fhero-1.bb06921e.png&w=2048&q=75</image> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These screenshots are from MacOs. https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/quality-guidelines#take-screenshots-on-linux
@ShobuPrime @someone13574 is there a way to coordinate here? We’d love to have Zed just work through flatpak, but we’re not heading in that direction right now. @ShobuPrime It makes me very unhappy to think that we’d ship a partially non-functional zed on flathub, so before you merge this I’d like to make sure you’re incorporating @someone13574’s fixes from zed-industries/zed#12006. @someone13574 On the flip side, if we need to have the recipe for building the flatpak here, I don’t think we need to have a different one in the zed repo too. Re:LSPs, relying on flatpak packaged ones is probably a non-starter for a functional IDE. The versions of the binaries you need are often per project, rather than per workstation. |
If it’d be helpful to talk through this in more detail, we can meet up in the Zed Discord at some point next week. https://discord.gg/8GubhShZ3a |
It won't be merged until everyone is confident with the final package. |
@ConradIrwin I'd be happy to coordinate! I'm traveling foe business this week so I most likely won't be able to add any more work until next week (5/28). I saw you posted the Discord and I'll be happy to join there.
Nothing to worry about here and there's certainly no rush -- as mentioned by @bbhtt it we won't need to merge it until everyone is happy and functionality is in as much parity with the native install |
Please confirm your submission meets all the criteria
Makefile