Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Add mirror env variable when set by the user #423

Merged
merged 2 commits into from
Feb 25, 2022

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Feb 24, 2022

This can be found https://github.com/coursier/coursier/blob/master/modules/paths/src/main/java/coursier/paths/Mirror.java#L26

Tested it out and seems to work (URLs go replaced by my string)

Will create VS Code PR soon.

@tgodzik tgodzik requested review from ckipp01 and kpodsiad February 24, 2022 16:28
@@ -17,6 +17,7 @@ export function detectLaunchConfigurationChanges(
"serverProperties",
"javaHome",
"customRepositories",
"coursierMirror",
Copy link
Member

Choose a reason for hiding this comment

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

Can we extract these keys as constants and use them in vscode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In a couple of places yes, but unfortunately not in package.json which would be most useful

Copy link
Member

Choose a reason for hiding this comment

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

That's true, but at least we can reduce 3 possible sources of errors (config options names) to just 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added!

@tgodzik tgodzik requested a review from kpodsiad February 24, 2022 18:16
*
* - https://scalameta.org/metals/docs/integrations/new-editor#metals-user-configuration
*/
export const UserConfiguration = {
Copy link
Member

Choose a reason for hiding this comment

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

I think you can use enum, with it exporting type shouldn't be necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed!

@tgodzik tgodzik merged commit a195d81 into scalameta:main Feb 25, 2022
@tgodzik tgodzik deleted the add-mirror branch February 25, 2022 10:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants