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

Add workarounds for postcss values parser error #37079

Merged
merged 1 commit into from Sep 4, 2022

Conversation

tagliala
Copy link
Contributor

@tagliala tagliala commented Sep 3, 2022

postcss-values-parser returns a syntax error when a negative value is
provided in a calc function after a CSS variable.

This is not an issue with Bootstrap itself, but a workaround to allow
projects using postcss-values-parser to keep upgrading and compiling
bootstrap

Ref: shellscape/postcss-values-parser#138, #35033

Fix: #36851

postcss-values-parser returns a syntax error when a negative value is
provided in a `calc` function after a CSS variable.

This is not an issue with Bootstrap itself, but a workaround to allow
projects using postcss-values-parser to keep upgrading and compiling
bootstrap

Ref: shellscape/postcss-values-parser#138, twbs#35033

Fix: twbs#36851
Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed it this way:

  • Put in place the reproductible environment given by @tagliala in the issue that fails
  • Checkout this branch
  • For each file, cp ../bootstrap/scss/_file.scss node_modules/bootstrap/scss/_file.scss
  • Re-run NODE_ENV=production bin/webpack
  • Result: compilation OK

IMO this PR can be merged as is. It would be better to have something in our CI to check this issue in the future but apart from a bad regex, I'm not thinking of anything else atm.
Thoughts @mdo?

@mdo mdo marked this pull request as ready for review September 4, 2022 05:15
@mdo mdo requested a review from a team as a code owner September 4, 2022 05:15
Copy link
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ship it! I can add a note to the v5.2.1 release post then too.

@mdo mdo merged commit b8880e5 into twbs:main Sep 4, 2022
@tagliala tagliala deleted the bugfix/calc-workaround-negative-values branch September 4, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

React Build Fails with 5.2
3 participants