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

csharp: Solve problem of omnisharp server failing to download #13367

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

windoflake
Copy link

@windoflake windoflake commented Jun 21, 2024

Fix issue #9181: #9181.

  1. The root cause for the issue is that zed downloads the zip files and it used external command utility 'unzip' to extract to zip file. However, not all systems are equipped with it at default. So zed reports error like 'failed to start language server "OmniSharp": No such file or directory (os error 2)'. Once it fails, zed keep constantly downloading the zip file.
  2. The solution is to use async_zip crate to extract the downloaded language zip file instead of calling 'unzip' command. So for any systems without unzip, zed should be working fine with it.

Release Notes:

Copy link

cla-bot bot commented Jun 21, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: 杨小龙.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@maxdeviant maxdeviant changed the title omnisharp: solve problem of omnisharp server failing to download csharp: Solve problem of omnisharp server failing to download Jun 21, 2024
@maxdeviant maxdeviant self-assigned this Jun 21, 2024
Copy link
Member

@maxdeviant maxdeviant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it’s touching non-zip code paths.

The tar and tar.gz paths should be left as-is.

Copy link

cla-bot bot commented Jun 21, 2024

We require contributors to sign our Contributor License Agreement, and we don't have @windoflake on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

Copy link

cla-bot bot commented Jun 21, 2024

The cla-bot has been summoned, and re-checked this pull request!

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jun 21, 2024
Use async_zip to extract the downloaded language zip file instead of
calling 'unzip' command.

Fixes zed-industries#9181
@windoflake
Copy link
Author

This looks like it’s touching non-zip code paths.

The tar and tar.gz paths should be left as-is.

@maxdeviant , That's right. I've updated the code accordingly.
And there is no need to check whether the zip file is downloaded or not. The check logic should have been done in CsharpExtension::language_server_binary_path from csharp.cs. So I just change the unzip code.

Copy link
Author

@windoflake windoflake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I seem to overwrite my last push by a forcing push.
This is actually the commit that I changed according to the review comments. @maxdeviant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linux: omnisharp server failing to download
2 participants