Change format of requests to show module sources #12351
Merged
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.
Doing this because:
Old format of the URI we send to vscode to display the source of a module (unencoded):
bicep-cache:{fullyQualifiedReference}#{localCacheFullPath}
Example:
bicep-cache:br:myregistry.azurecr.io/myrepo:v1#/Users/MyUserName/.bicep/br/registry.azurecr.io/myrepo/v1$/entrypoint.bicep
New format (unencoded):
bicep-extsrc:{title-to-display-for-document}?{fullyQualifiedReference}#{source-file-to-retrieve-relative-path}
Example:
bicep-extsrc:br:myregistry.azurecr.io/myrepo:main.bicep (v1)?br:myregistry.azurecr.io/myrepo:v1#main.bicep
No fragment in URI if just requesting the main.json file
Also changed other names, like:
BicepRegistryCacheRequestHandler -> BicepExternalSourceRequestHandler
Example of source document titles (exact format still being decided):
![image](https://private-user-images.githubusercontent.com/6913354/280438733-4e36bd8c-4718-42cc-83d6-9113a5c5860b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0OTQwNDgsIm5iZiI6MTcxOTQ5Mzc0OCwicGF0aCI6Ii82OTEzMzU0LzI4MDQzODczMy00ZTM2YmQ4Yy00NzE4LTQyY2MtODNkNi05MTEzYTVjNTg2MGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNy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ZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.vTh-nvpXh17J_y9zO-B2577uRNmRbMBeFouNpffYmAU)
Microsoft Reviewers: Open in CodeFlow