zed
zed copied to clipboard
auto_update fails on deserializing release step
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
The problem is most probably clear for devs, but the error message is "cryptic" for people trying to compile and run Zed
.
[2024-04-28T01:13:33+03:00 ERROR auto_update] auto-update failed: error:error deserializing release
Caused by:
expected value at line 1 column 1
Firstly I started to think that there is a bug in the code or the response is empty, but after I have found the source of problem it's obvious that some code has been called when it was not expected. It should be fixed (not soon I guess) or it should fail much sooner with a proper message.
The error happens in async fn update(this: Model<Self>, mut cx: AsyncAppContext) -> Result<()>
which is located in src/auto_update.rs
file in auto_update
crate.
The following request is called: https://zed.dev/api/releases/latest?asset=Zed.dmg&os=linux&arch=x86_64
The API responds with 400
error and Failed to find a matching asset for os 'linux' and architecture 'x86_64'
message.
To make sure that people would not be confused now and in the future (other platforms) there needs to be some kind of if
condition on OS
, so the code returns early with a proper message that specific feature is temporary not supported for specific OS/arch.
Some notes on auto-updating on Linux
:
- I guess that by default it should be disabled as this would most probably be handled by package managers anyway
- It should be also disabled by default when compiling from source as the update in such case is as simple as
git pull
and samecargo run --release
call - The auto-update feature may be considered in cases like
AppImage
support - In case you are interested I have created an issue describing how to create and maintain
Gentoo
ebuild repository: https://github.com/z411/trackma/issues/720
Environment
Zed: v1.0.0 (Zed Dev d2569afe662be93c926eed1aeb2b17d050ba90b0) OS: Linux 1.0.0 Memory: 62.5 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your ~/Library/Logs/Zed/Zed.log
file to this issue.
No response