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

Make ExtensionBaseUrl configurable. #39

Merged
merged 3 commits into from
Dec 26, 2023
Merged

Conversation

chunhualiu
Copy link
Contributor

I am using a github mirror. So I want to make extensionBaseUrl configurable.

@thedemons thedemons self-requested a review December 26, 2023 02:53
@thedemons
Copy link
Contributor

Hello, thanks for the PR!

Are there any reasons that you need to use a GitHub mirror for downloading? I feel like this setting is a bit problematic and would confuse the users because the URL needs to be in a specific format. We also need to (prompt the user to) re-download the language server after applying the setting, or at least warn the user in the description that they would need to manually delete the current one to force a re-download.

@chunhualiu
Copy link
Contributor Author

Hello, thanks for the PR!

Are there any reasons that you need to use a GitHub mirror for downloading? I feel like this setting is a bit problematic and would confuse the users because the URL needs to be in a specific format. We also need to (prompt the user to) re-download the language server after applying the setting, or at least warn the user in the description that they would need to manually delete the current one to force a re-download.

Because in China, github is not always accessible.
I am using an open source github proxy which acts like a mirror: https://github.com/hunshcn/gh-proxy
It can provide github mirror URL in format like https://gh.api.99988866.xyz/https://github.com/Exafunction/CodeiumVisualStudio/...
That's why I keep the original URL in CodeiumVS/SettingsPage.cs, so user can easily configure the URL.
Since github is not accessible, so the first download will fail.
After user correct the URL, I do found Codeium plugin prompts a re-download.
If no re-download, simply restart VS will cause download from new URL too.
Also if there is a current one, it is no need to manually delete the current one, because it's a mirror, do a re-download will get the same thing.

@chunhualiu
Copy link
Contributor Author

BTW. I also made below changes:

-        await _package.LogAsync($"Downloading language server v{_languageServerVersion}");
+        await _package.LogAsync($"Downloading language server v{_languageServerVersion} from {_languageServerURL}");

So user can know it's downloading from new URL or not.

CodeiumVS/SettingsPage.cs Outdated Show resolved Hide resolved
CodeiumVS/LanguageServer/LanguageServer.cs Outdated Show resolved Hide resolved
@thedemons thedemons merged commit 33b3291 into Exafunction:main Dec 26, 2023
1 check passed
@thedemons
Copy link
Contributor

Merged. Thank you!

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

Successfully merging this pull request may close these issues.

2 participants