You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that VS Code itself does not have a clear strategy on what to do when the same file is claimed by two or more extensions. This then leads to unfortunate weird bugs when our users also happen to have other extensions installed which also claim terraform language (*.tf).
I saw a colleague experiencing frozen UI due to this in the past and it's also the likely cause of issues related to formatting, as pointed out in #687 (comment)
To Do
1. Identify Conflicting Extensions
We can look up any popular extensions in the VS Code Marketplace which support terraform as language ID, essentially any extensions with either of these activation events:
We can then see if there are extensions known to cause problems and/or under what circumstances.
2. Try to resolve conflicts
If this is scoped to any particular extensions, we can open an issue and try to resolve the conflict somehow.
3. (optional) Offer other extensions an API
If extension provides a functionality that our extension doesn't intend to provide, but that 3rd party extension would benefit from some data that our extension holds, we may consider exposing this data via an API that other extensions can access.
4. Inform user of known conflicts
If all of the above fails we can use VS Code API to check what extensions are installed and raise a (suppressible) warning popup to the user if any extension claims the same files - or even better - if we know the exact extension ID which causes a conflict. https://code.visualstudio.com/api/references/vscode-api#extensions
The text was updated successfully, but these errors were encountered:
A user can be explicit about which extension handles a certain file, which will have precedence over anything a particular extension registers for. It accepts a filename or a regex match and the language ID.
"files.associations": {
"*.tf":"terraform",
},
There is a facility to provide configurationDefaults inside the extension, but that does not allow setting files.associations. This would have to be documentation that we link to if we find more than our extension installed.
@jpogran How does that setting work in terms of routing the files to an extension? As you say terraform is a language ID, not extension ID, so what happens if two or more extensions claim the terraform language ID, like ours does?
Background
It appears that VS Code itself does not have a clear strategy on what to do when the same file is claimed by two or more extensions. This then leads to unfortunate weird bugs when our users also happen to have other extensions installed which also claim
terraform
language (*.tf
).I saw a colleague experiencing frozen UI due to this in the past and it's also the likely cause of issues related to formatting, as pointed out in #687 (comment)
To Do
1. Identify Conflicting Extensions
We can look up any popular extensions in the VS Code Marketplace which support
terraform
as language ID, essentially any extensions with either of these activation events:vscode-terraform/package.json
Line 34 in fc2a0d1
vscode-terraform/package.json
Line 36 in fc2a0d1
We can then see if there are extensions known to cause problems and/or under what circumstances.
2. Try to resolve conflicts
If this is scoped to any particular extensions, we can open an issue and try to resolve the conflict somehow.
3. (optional) Offer other extensions an API
If extension provides a functionality that our extension doesn't intend to provide, but that 3rd party extension would benefit from some data that our extension holds, we may consider exposing this data via an API that other extensions can access.
4. Inform user of known conflicts
If all of the above fails we can use VS Code API to check what extensions are installed and raise a (suppressible) warning popup to the user if any extension claims the same files - or even better - if we know the exact extension ID which causes a conflict.
https://code.visualstudio.com/api/references/vscode-api#extensions
The text was updated successfully, but these errors were encountered: