validate task never runs in default gulp workflow due to watchTask ordering#5133
Closed
Chaitu7032 wants to merge 1 commit intosugarlabs:masterfrom
Closed
validate task never runs in default gulp workflow due to watchTask ordering#5133Chaitu7032 wants to merge 1 commit intosugarlabs:masterfrom
Chaitu7032 wants to merge 1 commit intosugarlabs:masterfrom
Conversation
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes - #5008
description
In the original gulpfile.js, the validate task was never executed in the default workflow.
This happened because validate was placed after watchTask inside a series().
Since watchTask starts a file watcher and never completes (by design), the series never reached validate.
This PR updates the task order and behavior so validation runs deterministically.
What was Changed
1] Moved validate to run before watchTask in the default task series
2] Updated watchTask to return the watch() call, making its long-running nature explicit to Gulp
Why This Change needed ?
1] Ensures validate runs at least once during the default workflow
2] Prevents silent skipping of validation
3] Aligns task structure with Gulp’s recommended lifecycle handling for long-running tasks
4] Improves developer feedback without changing build or watch behavior
How to test
1] Run the default task:
gulp
Confirm that:
1] validate runs before watch mode starts
2] The watcher continues running as expected after validation
Impact
1] No breaking changes
2] No behavior change to watch mode
3] Improves correctness and reliability of the default workflow.
screenshots