-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
launch configs as preferences #4947
Conversation
@@ -57,7 +57,7 @@ export namespace PreferenceScope { | |||
case 'application': | |||
return PreferenceScope.User; | |||
case 'window': | |||
return PreferenceScope.Workspace; | |||
return PreferenceScope.Folder; |
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.
hello, in which case do we have preferencescope.workpace ?
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.
it is inclusive, i.e folder allows workspace and global
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.
does it mean, users wouldn't be able to define prefs only available at the "workspace" & "user" level?
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.
actually the whole scope is valid check is bogus right now, it should be aligned with:
https://github.com/Microsoft/vscode/blob/750680d2f7ae563529501f8ec419d83ccf8ec325/src/vs/workbench/services/configuration/common/configuration.ts#L23-L26
It is not inclusive, folder preferences allow ONLY resource, workspace preference allow ONLY window and resource level. I will rework it as well.
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.
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.
yes
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.
yes it could be resolved in a separate PR. since the next release would be either on Apr 30 or May 1, do we want to hold this one until the release is made?
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.
please ask on Spectrum, if someone has concrete objections, yes
from my side, most important that it should be tested not only by me, but double checked by someone else
I tried this PR + backporting on this branch ed40d90 But I got
FYI source code is diagramsRoot(uri) {
let folder = uri ? vscode.workspace.getWorkspaceFolder(uri) : undefined;
if (!folder)
return undefined;
LINE67 --> let fsPath = path.join(folder.uri.fsPath, this.read("diagramsRoot", uri));
return vscode.Uri.file(fsPath);
} and read method is there |
@benoitf it is WIP, but thanks for the pointer will test it as well |
60ec59d
to
cf9c784
Compare
@elaihau It is not finished, but could you test support of preferences in multi-root workspace context with this PR to catch regressions earlier? |
0dd5cd7
to
fc65a6e
Compare
@elaihau thx for the review, found another bug: duplicate add and remove actions, it is easy to fix Fixed https://github.com/theia-ide/theia/pull/4947/files#diff-f9afc1d61ee7ba79952f1f81bdf6bd52 |
@elaihau What is the content of testdir i cannot reproduce #4947 (comment) |
fc65a6e
to
bc14ca1
Compare
it has nothing special. the problem can be reproduced with "theia" folder too |
btw, i also found this one #5020, but i don't think it is related to this PR |
ok, checking #4947 (comment) then, it should work, it would be a bug if there are no events then a preference provider for settings.json is removed |
@elaihau i don't think it is caused by this PR, events are reported for removed config files, but since these config files don't contain We actually don't have many tests for events. It would be something worth looking into and align with VS Code expectations as well, but separately. |
i am ok with issue mentioned in #4947 (comment) not fixed, as it is really a corner case. |
Hi, |
@ariel-bentu thanks, i will have a look whether it is possible to preserve comments, btw does VS Code do it? |
I checked and actually, to my surprise, VSCode also looses the comments ... So I guess all is good. |
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
This allows to re-validate such properties when a corresponding schema has been set. Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
…schema `UserLaunchProvider`, `WorkspaceLaunchProvider` and `FoldersLaunchProvider` handle changing of 'launch' section of preferences without paying attention whether configuration is valid or not. Once it happens a new preference schema for launch configurations builds. Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
bc14ca1
to
b9ede94
Compare
Includes:
compound launch configurationsi will completely remove it from this PR and Theia UI, should be implemented separately - support compound launch configurations #5008Running VS Code tests:
yarn && yarn compile
TODO: