Skip to content

validate task never runs in default gulp workflow due to watchTask ordering#5133

Closed
Chaitu7032 wants to merge 1 commit intosugarlabs:masterfrom
Chaitu7032:gulpfix
Closed

validate task never runs in default gulp workflow due to watchTask ordering#5133
Chaitu7032 wants to merge 1 commit intosugarlabs:masterfrom
Chaitu7032:gulpfix

Conversation

@Chaitu7032
Copy link
Contributor

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

image

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Chaitu7032 Chaitu7032 closed this Jan 11, 2026
@Chaitu7032 Chaitu7032 deleted the gulpfix branch January 11, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant