-
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
Allow not persistent changes for task before run #5312
Conversation
This pull request is ready for review again. |
FYI @mmorhun is on PTO for a couple of weeks |
Signed-off-by: Mykola Morhun <[email protected]>
@benoitf @RomanNikitenko @akosyakov I will keep this one on hold for now. |
@RomanNikitenko thank you for the explanation |
i don't know the use case to thouroughly test this one. |
I think @mmorhun tested it for che infrastructure. To test changes for TaskProviderAdapter we need register task provider and use I provided 'How to test' section for my PR #5591 with reference for sample. It contains registered task, but execution of 'run task' command is absent. So it can be modified a little to test this PR. I'm going to test this PR as I described above as well. So please let me know if I'm wrong or you have any questions. btw: we need to update this branch to have this changes |
I created the sample to test this changes locally. It works well for me when I pass empty array with args for command for example: But the configuration looks strange when args for command exist and I try to override them: So for first case I have: For second case I have: @mmorhun @evidolob |
That's deepmerge. It's handling of arrays does not seem to be well-defined. See for example TehShrike/deepmerge#14 I would suggest avoiding deepmerge. Instead of providing |
@mmorhun @RomanNikitenko could someone rebase it? @elaihau @vince-fugnitto @evidolob Could someone test according to #5312 (comment) afterwards? |
I will take a look in a few days |
I tried to rebase it, but the resolving conflict for So, I think it would be better to wait for @mmorhun to review the approach |
While my work on this PR was delayed, some parts for running tasks with customizations was added. So, I think, I should align my future steps in this PR with you @akosyakov @elaihau @RomanNikitenko @azatsarynnyy.
{
"label": "some-task",
"type": "my-custom",
"propx": {
"a": 1,
"b": "2",
"c": false
}
} and I want to set Would like to hear you opinion, concerns, suggestions. |
Using 'replace' strategy would result in args disappearing in unintuitive ways.
That is the only way to go. Full flexibility and a simple API with no scope for confusion. |
@theia-ide/task-extension please help to move it forward |
@akosyakov #5348 was created by me. Right now it is blocked by #5975 not getting merged (changes in 5975 are needed to remove duplicated task configs in fetchTasks()). I rewrote the @mmorhun @RomanNikitenko if you have time, could you please review #5348, so that this PR and #5348 can be unblocked? Thank you ! |
Thank you all who took part in this PR, but the functionality proposed here was implemented meanwhile in this PR. So closing this one... |
Signed-off-by: Mykola Morhun [email protected]
Description
This PR adds ability to run existing task with some temporary (one-time) changes.
It might be useful in some cases, especially when a parameter of task depends on some environment or UI state. For example, when task console command is the same, but path in which it should be run depends on current file opened in the editor, etc.
Depends on
#5313 (
toTask
method patch intype-converters.ts
)