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

Implement a way to determine if an extension is conflicting with VSCo… #405

Merged
merged 3 commits into from
Mar 9, 2021

Conversation

JPinkney
Copy link
Contributor

@JPinkney JPinkney commented Dec 2, 2020

Implement a way to determine if an extension is conflicting with VSCode-YAML

Signed-off-by: Josh Pinkney [email protected]

What does this PR do?

This PR makes it so that a notification will pop up prompting a user to uninstall conflicting extensions with VSCode-YAML

What issues does this PR fix or reference?

#404

Is it tested? How?

Launch extension with Ansible already installed -> you should see notification saying to uninstall -> click it and it should be uninstalled (though manual reload is required)

Launch extension without Ansible installed -> install Ansible -> you should see notification saying to uninstall -> click it and it should be uninstalled (though manual reload is required)

@joshuawilson
Copy link
Member

@JPinkney I like the suggestion to just turn off validation in anisible here #404 (comment)

@JPinkney
Copy link
Contributor Author

JPinkney commented Dec 2, 2020

Yeah, I can change the code to be that. The only reason I had it like this originally is there are actually a few more conflicting extensions but I can't seem to find their VSCode ID's ATM. The other conflicting extensions are under 50k installs though so I'm not sure if it matters or not

@joshuawilson
Copy link
Member

You could do both since you already have this. Set a generic check for a conflict and then the specific one for ansible that just turns off validation.

@JPinkney
Copy link
Contributor Author

JPinkney commented Dec 2, 2020

I went with just the ansible specific thing. It got a little awkward trying to determine what happened if VSCode Ansible and another extension were conflicting and what message I should show there etc

@joshuawilson
Copy link
Member

Based on the comments in #404 (comment) I think we should go back to the generic version.

Copy link
Collaborator

@evidolob evidolob left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuawilson
Copy link
Member

Approved as is. Did you plan to look for those other extensions that conflict?

@JPinkney
Copy link
Contributor Author

JPinkney commented Dec 4, 2020

It took me a while but I finally found the conflicting extension that I was thinking of: https://marketplace.visualstudio.com/items?itemName=ms-vscode-deploy-azure.azure-deploy. If you install it along VSCode-YAML you get multiple YAML Support output channels and two YAML language servers are started when opening a yaml file.

Do you know if a deprecated extension still shows on the marketplace? Just wondering if we should switch back to generic and make it so that VSCode-Ansible/others will automatically uninstall (since VSCode-Ansible will be deprecated anyways) or if I should still have the ansible.validation: false for VSCode-Ansible users that are still using it and a generic solution for all other extensions. Any thoughts on which one I should do?

@joshuawilson
Copy link
Member

I have not tried using a deprecated ext. I think generic is better but if you can't then just doing something simple for now is good enough. Though "automatically uninstalling" is not very nice. I think it is enough to tell them the cause.

@JPinkney
Copy link
Contributor Author

JPinkney commented Dec 4, 2020

Though "automatically uninstalling"

by automatic uninstalling I meant to say prompt them with a button asking if they want to uninstall (the way the PR was originally)

@gorkem
Copy link
Collaborator

gorkem commented Dec 5, 2020

ms-vscode-deploy-azure.azure-deploy seems to be active. Can you file an issue on its repo and ask them to switch to using the extension and not the yaml-language-server.

@JPinkney
Copy link
Contributor Author

JPinkney commented Dec 5, 2020

I filed one July 15 but I didn't get a response: microsoft/vscode-deploy-azure#130

@evidolob evidolob added this to the 0.14.0 milestone Dec 9, 2020
@evidolob evidolob removed this from the 0.14.0 milestone Jan 11, 2021
@evidolob evidolob mentioned this pull request Jan 11, 2021
@ssbarnea
Copy link
Member

ssbarnea commented Mar 5, 2021

I am inclined to believe that haaaad.ansible and sysninja.vscode-ansible-mod should be added to the list.

@JPinkney
Copy link
Contributor Author

JPinkney commented Mar 5, 2021

I made some changes so that when an extension is conflicting it will only show in one information window. Previously when you installed Ansible, then installed vscode-deploy you'd get two popups. The first would say:

Remove ansible

and the second would say

Remove ansible and vscode-deploy

@JPinkney JPinkney merged commit f3c0efe into master Mar 9, 2021
@JPinkney JPinkney deleted the notify-if-ansible branch March 9, 2021 12:50
bleach31 pushed a commit to bleach31/vscode-yaml that referenced this pull request Jan 25, 2022
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.

5 participants