-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Prototype for #53557 #242680
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
base: main
Are you sure you want to change the base?
Prototype for #53557 #242680
Conversation
I like it but how can you handle the json schema, is it even possible to validate the second config with the proper type? |
I think you could generate a schema which is specific to each launch.json, to say that if you have an entry that is |
I was also thinking of this, but that sounds very tricky... |
JSON schema has native support for |
It's tricky, because we want a schema for |
What's the status of this? Would be an amazing feature for increasingly complex launch configs! |
@connor4312 can we merge this and see usage? If usage increases we can add json schema support. This enables some use-cases and even deduplicates lots of code in our launch.json. |
4b6f56f
to
f2959e6
Compare
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.
I would support merging this to try it but I think before it goes to stable we should have a plan to do some kind of validation. I think it would be sad and inconsistent to have no intellisense and no validation for certain configs especially when they are the more complex ones. At the very least, if the json language service can't do it, validate it when you press F5 or something like that.
extendingConfigurations = new Set([name]); | ||
} else { | ||
if (extendingConfigurations.has(name)) { | ||
console.error(`'${name}' is involved in a circular reference. The configuration will be ignored.`); |
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.
ILogService?
Prototype for #53557
Allows configurations to use
extends
to extend a given launch config, e.g.:This would allow to cleanup the vscode launch.json a bit (also this one), but also enable more advanced configurations .
Configurations can only extend within one source (e.g. one launch.json file), but I think that is fine.
What do you think of this?