-
Notifications
You must be signed in to change notification settings - Fork 223
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
Warn about vscode-ansible conflict #404
Comments
Is there a way to check for the second installed instance and where it is? I'm asking because what happens if it is in another extension? |
It might be possible to make it a tad more generic. I did a quick look and you can do something like:
This check would only work though if everyone who had that dependency was spawning the language server and not just using the package as a library. If they were using the package as a library there would be false positives so I'm not sure if it would be worth it |
A false positive is worse. Maybe just do the hard coded fix for this singular issue. We can always come back to it if there is another case found. |
we can't depend on the "dependencies". |
Yup, better take the conservative approach and rely on vscode.extensions.getExtension(‘vscoss.vscode-ansible’) for now to avoid false positives. If conflicts with other extensions are reported, it'll be easy to update and release a fix. If you really really really want to be more "flexible", i.e. don't want to rerelease a new update every time you flag a conflicting dependency, you can always have vscode-yaml fetch a list of offending extensions at startup, so it's stays up-to-date even after a release. But that might be a tad overkill for now. |
The ansible extension provides a setting |
Thanks @egamma that would be nicer then asking the user to uninstall the ansible extension. I think we should still tell them the issue and then give them the option to turn it off with a button press. Since the issue is that we are seeing double errors, that is not critical and they may want the current yaml validation in anisble. That way they know the cause and can make it go away if they choose to. |
Quick update to avoid a wasted effort, after further discussion with the team that owns this extension it was decided to deprecate and retire the ansible extension. Having an extension that is not actively maintained will cause more frustration for users in the future. This was also suggested by users VSChina/vscode-ansible#272. |
I see commit eb107ed added a notification Ansible extension is incompatible with VSCode-YAML. Please uninstall it. Thanks. @JPinkney, maybe I am a bit illiterate, but I was afraid pressing the offered Uninstall button because I was not sure which extension would be uninstalled. Would it be possible to reword to something like "VSCode-YAML found incompatible extensions. Please uninstall Ansible." |
Closing because the original posting is no longer true. Both ansible and yaml vscode ansible are developed by redhat and they team-up quite well. Just be sure you are using the official Ansible extension from https://marketplace.visualstudio.com/items?itemName=redhat.ansible and not another one, especially as there were quite a few floating around over time. |
Is your enhancement related to a problem? Please describe.
When vscode-ansible and vscode-yaml are both installed, because vscode-ansible ships the yaml server users see duplicate yaml syntax errors.
Describe the solution you would like
What I suggest is that the vscode-yaml extension detects when the ansible extension is installed (vscode.extensions.getExtension(‘vscoss.vscode-ansible’)) and then it informs the user about the problem and provides the option to uninstall the ansible extension (this can be implemented using the VS Code CLI).
Describe alternatives you have considered
Additional context
The text was updated successfully, but these errors were encountered: