Skip to content
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

USWDS-Compile - Feature: Flag to stop on errors #62

Open
2 tasks done
patrickcate opened this issue Jun 14, 2023 · 2 comments
Open
2 tasks done

USWDS-Compile - Feature: Flag to stop on errors #62

patrickcate opened this issue Jun 14, 2023 · 2 comments
Labels
Affects: Compiling Related to compiling Sass or JavaScript Role: Dev Development/engineering skills needed Type: Feature Request New functionality Type: Spike A short research activity to help make a decision

Comments

@patrickcate
Copy link

Is your feature request related to a problem? Please describe.

With #5334 I ran into an issue with Sass not compiling. I would have expected the Gulp task to fail, but it didn't.

I run the Sass compilation within a CI/CD process but because the gulp task did not error, it allowed the update to pass.

Is there a way emit an error if the Sass compiling, or other tasks, fail?

Not sure if this is a feature request or just a support/documentation request.

Describe the solution you'd like

A way to catch errors in the Gulp tasks so they can be acted upon.

Describe alternatives you've considered

Writing a custom Gulp Sass compiling task, but that adds a maintenance burden that my client may not be comfortable taking on. It also negates one of the main reasons for using this project for our build process.

Additional context

From what I can tell the buildSass task only emits an end event, not an error.

function handleError(error) {
  log(error.message);
  return this.emit("end");
}

Code of Conduct

@patrickcate patrickcate added Status: Triage We're triaging this issue and grooming if necessary Type: Feature Request New functionality labels Jun 14, 2023
@mejiaj
Copy link
Contributor

mejiaj commented Jun 22, 2023

@patrickcate handling errors without crashing process was an intentional decision at the start. During active development it can be frustrating to have the entire process stop on a failure. Even one as small as missing semi-colon.

Is your feature request the option to crash or continue when handling errors?

@mejiaj mejiaj added Affects: Compiling Related to compiling Sass or JavaScript Needs: Author Response 🔴 We're waiting for more information from a participant Role: Dev Development/engineering skills needed and removed Status: Triage We're triaging this issue and grooming if necessary labels Jun 22, 2023
@patrickcate patrickcate changed the title USWDS-Compile - Feature: [YOUR TITLE] USWDS-Compile - Feature: Flag to stop on errors Jun 22, 2023
@patrickcate
Copy link
Author

During active development it can be frustrating to have the entire process stop on a failure. Even one as small as missing semi-colon.

I can agree this is helpful during development when using the watch task, but I would suggest the compile task should fail on errors. Otherwise there is no reliable way (I'm aware of) to know when there is a problem compiling.

Is your feature request the option to crash or continue when handling errors?

I guess my feature request is to fail on errors when using the compile task, or at least provide that as an option.

@mejiaj mejiaj added Status: Triage We're triaging this issue and grooming if necessary and removed Needs: Author Response 🔴 We're waiting for more information from a participant labels Nov 14, 2023
@brunerae brunerae added the Type: Spike A short research activity to help make a decision label Jun 6, 2024
@brunerae brunerae moved this from TBD to Needs refinement in USWDS Core Project Data Jun 6, 2024
@brunerae brunerae removed the Status: Triage We're triaging this issue and grooming if necessary label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Compiling Related to compiling Sass or JavaScript Role: Dev Development/engineering skills needed Type: Feature Request New functionality Type: Spike A short research activity to help make a decision
Projects
Status: Needs refinement
Development

No branches or pull requests

3 participants