Don't save all "dirty editors" when a task is executed #94285
Labels
feature-request
Request for new features or functionality
good first issue
Issues identified as good for first-time contributors
help wanted
Issues identified as good community contribution opportunities
on-testplan
tasks
Task system issues
Milestone
The Problem
When I have multiple editors with changes open and I invoke a task (like the default build/test task) all editors are automatically saved before the task is executed. Sometimes this causes my test run to fail because the other files are not yet ready to be tested, they are still a work in progress. Other times I simply want to compile my current file to see if it actually compiles against the rest of the project, only to discover that my other pending changes have been saved to disk as well and they now break the compilation for a myriad of reasons (syntax errors, unfinished implementations etc.).
This forces me to either painfully stash away the unwanted changes and run the task again or keep "flying blind" until I make the codebase fully functional again.
The solution
I would love to have some control over that autosave-on-task-run functionality. I was unable to find anything relevant in Settings or task definitions.
Option 1
Ask me each time I run a task with other "dirty" editors to either save them or run as-is.
Option 2
Add a configuration option/checkbox to specify ahead of time whether to save any dirty editors before task runs or to simply run them straight away.
Option 3
Allow a task definition to control this mechanism through a flag (via tasks.json).
The text was updated successfully, but these errors were encountered: