-
Notifications
You must be signed in to change notification settings - Fork 748
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
Change format of requests to show module sources #12351
Conversation
Test this change out locally with the following install scripts (Action run 6856854941) VSCode
Azure CLI
|
return Task.FromResult(new BicepExternalSourceResponse(contents)); | ||
} | ||
|
||
/// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new code
@@ -0,0 +1,140 @@ | |||
// Copyright (c) Microsoft Corporation. | |||
// Licensed under the MIT License. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of this file same as renamed file except name changes
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):
Microsoft Reviewers: Open in CodeFlow