Skip to content

Conversation

@dgreif
Copy link
Member

@dgreif dgreif commented Jul 29, 2022

What are you trying to accomplish?

We would like to detect postcss warnings at build time, and prevent them from being merged/published

What approach did you choose and why?

Throw an error when a warning is detected during postcss build. Sample output from a few commits back:

@dgreif ➜ /workspaces/css (37deef3a ✗) $ script/dist.js
autoprefixer: /workspaces/css/src/layout/index.scss#sass:586:2: start value has mixed support, consider using flex-start instead
Error: Warnings while compiling src/layout/index.scss.  See output above.
    at file:///workspaces/css/script/dist.js:60:15
    at async Promise.all (index 17)
    at async dist (file:///workspaces/css/script/dist.js:72:5)
autoprefixer: /workspaces/css/src/core/index.scss#sass:1:0: start value has mixed support, consider using flex-start instead
autoprefixer: /workspaces/css/src/index.scss#sass:10455:2: start value has mixed support, consider using flex-start instead

This will cause script/dist.js to exit with code 1

What should reviewers focus on?

Is failing the build for warnings the right approach?

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢

@dgreif dgreif requested a review from a team as a code owner July 29, 2022 20:05
@dgreif dgreif requested a review from jonrohan July 29, 2022 20:05
@changeset-bot
Copy link

changeset-bot bot commented Jul 29, 2022

🦋 Changeset detected

Latest commit: ca2d3ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot temporarily deployed to Storybook Preview July 29, 2022 20:12 Inactive
@github-actions github-actions bot temporarily deployed to Storybook Preview July 29, 2022 20:12 Inactive
@jonrohan jonrohan merged commit c71e7df into main Jul 29, 2022
@jonrohan jonrohan deleted the dg-fail-on-warnings branch July 29, 2022 20:26
@primer-css primer-css mentioned this pull request Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants