Fix Issue #4421 - always clean rebuild
This change addresses item #4421
This fixes a bug which would always run clean rebuild instead of build
The following changes are proposed:
- Update the
findBuildTaskfunction to properly account for the two existing templates. - Properly select the
buildtask instead ofclean rebuildtask. The cleaning in theCMake: Clean Rebuildcommand is handled separately and currently is being done twice.
Other Notes/Information
The debugging process with code snippets and screenshots has been documented in the respective issue.
Hi @RedSkittleFox, thank you for working on fixing this bug!
Just wanted to let you know that the CI pipeline is failing due to linting issues in your changes. It may have to do with the spacing in front of the if and also the equality with == as opposed to ===.
Also, I noticed there might be some duplication in the logic. It looks like you have overlapping conditions for handling 2 tasks. The current change shows: First condition handles length === 1 || length === 2. Then immediately after, another condition handles length === 1 || length === 3. Could you clarify and elaborate on the intended logic here?
Once you fix the linting issues, the tests should pass. You can run yarn lint --fix locally to automatically fix some of these issues before pushing!
Thanks again for your contribution! Let me know if you need any help with these changes.
Hi @RedSkittleFox, thank you for working on fixing this bug!
Just wanted to let you know that the CI pipeline is failing due to linting issues in your changes. It may have to do with the spacing in front of the if and also the equality with
==as opposed to===.Also, I noticed there might be some duplication in the logic. It looks like you have overlapping conditions for handling 2 tasks. The current change shows: First condition handles
length === 1 || length === 2. Then immediately after, another condition handleslength === 1 || length === 3. Could you clarify and elaborate on the intended logic here?Once you fix the linting issues, the tests should pass. You can run
yarn lint --fixlocally to automatically fix some of these issues before pushing!Thanks again for your contribution! Let me know if you need any help with these changes.
Hey, I've fixed the the formatting. The first condition only handles the case 2. The diff is a bit confusing.
Okay, this is embarrassing. Give me a moment, I wrongly assumed that running the vs-code's format command is going to resolve the issue. I need to look into that.
Okay, now I've fixed it and confirmed it with yarn run lint. I've looked into the error and it turns out that the vs-code's formatter fixed my issue but caused another one that wasn't visible in the local diffs. Sorry for the confusion.