Skip to content
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

Drop support for variable substition for program and runtime in package.json #31675

Closed
isidorn opened this issue Jul 28, 2017 · 7 comments
Closed
Assignees
Labels
debt Code quality issues debug Debug viewlet, configurations, breakpoints, adapter issues
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Jul 28, 2017

Stop supporting variable substitution (e.g. ${workspaceRoot}) inside the package.json runtime and program fields.

Affected are exactly these two attributes in the debuggers contribution:
2017-08-07_20-25-31

We have never marketed this feature and now it is providing some debt when introducing multi root workspaces (as the package.json can not specify against which root to resolve the variables against)

@isidorn isidorn added debt Code quality issues debug Debug viewlet, configurations, breakpoints, adapter issues labels Jul 28, 2017
@isidorn isidorn added this to the August 2017 milestone Jul 28, 2017
@isidorn isidorn self-assigned this Jul 28, 2017
@isidorn isidorn closed this as completed in 064efc9 Aug 5, 2017
@weinand
Copy link
Contributor

weinand commented Aug 7, 2017

@WebFreak001
Copy link

Did you mean the debug launch.json or the actual extension package.json? If it's the launch.json, is "cwd": "${workspaceRoot}" still supported? There isn't really a solution to change the cwd to if you want to commit the debug file to a project if that variable gets removed from cwd.

@weinand
Copy link
Contributor

weinand commented Aug 7, 2017

@WebFreak001 as the titles says, I only mean variable substitution in the "package.json" of a debugger extension. So this planned feature drop only affects debug extension authors, not end users.

@DonJayamanne
Copy link
Contributor

Phew.
Thanks for the clarification @weinand . Almost started panicking here.

@DanTup
Copy link
Contributor

DanTup commented Aug 7, 2017

@weinand I'm slightly confused by what's being dropped. I do have some instances of ${workspaceRoot} in my packages.json however I believe that all of them are just written into the launch.json literally, so no substitution is done.

Two of them (configurationAttributes/launch/properties/program/default here and initialConfigurations/program here) appear as the string ${workspaceRoot} and the other (configurationSnippets/bodyprogram here) is written as "^\"\\${workspaceRoot}/bin/main.dart\"".

Would I be right in assuming that none of this would be affected, but after the change maybe the last one would not need the escaping?

Thanks!

@weinand
Copy link
Contributor

weinand commented Aug 7, 2017

@DanTup yes, variable substitution in the package.json does not affect your contributions (and you can verify this easily because the generated launch.json should contain the ${workspaceRoot} variable literally).
The escaping for the snippets is needed because of the snippet syntax, not to prevent the variable substitution. Variable substitution only occurs for the program and runtime attributes of a debuggers contribution:

2017-08-07_20-25-31

@DanTup
Copy link
Contributor

DanTup commented Aug 7, 2017

@weinand Gotcha! Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

5 participants