Repository navigation
Suffix server command ids on the client and add the Marketplace icon - #192
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two extensions hosting the CloudFormation language server in the same VS Code window currently break each other. The server lists its
workspace/executeCommandids (/command/template/clear-diagnostic,/command/region/update) in its initialize result,vscode-languageclientregisters each id as a VS Code command, and VS Code rejects the second registration of an id that already exists. The rejection happens inside client initialization, so the second extension to activate loses all CloudFormation features withcommand '/command/template/clear-diagnostic' already exists. This client already sendsaws.commandSuffix, but server releases up to 1.12.0 do not honour it and advertise the bare ids.Server command ids are registered under the client suffix
SuffixedExecuteCommandFeaturereplaces the library's built-in execute-command feature. Every id the server advertises is registered with VS Code as<id>.iac-vscode, and invocations are forwarded to the server under the id it advertised, so the server sees no difference. AprovideCodeActionsmiddleware inCfnLanguageClientpoints the commands attached to server-provided code actions at the same suffixed ids and leaves commands the server did not advertise alone.CfnLanguageClientextendsLanguageClient, swaps the feature in throughregisterFeature, and is what the extension now constructs.Ids that already carry the suffix are kept as they are, so a server release that honours
aws.commandSuffixturns this code into a no-op rather than double-suffixing. It can be removed once such a release is the oldest supported server.Marketplace icon
package.jsonsetsicontoresources/marketplace/aws-cloudformation-icon.png, the AWS CloudFormation service icon copied unmodified from the public AWS Architecture Icons package (Q3 2026 release,Arch_AWS-CloudFormation_64@5x.png, 400x400).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.