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

Fix xplat sync to ignore @generated header #29738

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

rickhanlonii
Copy link
Member

Use some clever git diffing to ignore lines that only change the @generated header. We can't do this for the version string because the version string can be embedded in lines with other changes, but this header is always on one line.

Copy link

vercel bot commented Jun 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 8:33pm

@react-sizebot
Copy link

react-sizebot commented Jun 3, 2024

Comparing: 4dcdf21...b617aec

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.66 kB 6.66 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 497.26 kB 497.26 kB = 89.11 kB 89.11 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 502.08 kB 502.08 kB = 89.80 kB 89.80 kB
facebook-www/ReactDOM-prod.classic.js = 594.75 kB 594.75 kB = 104.76 kB 104.76 kB
facebook-www/ReactDOM-prod.modern.js = 571.14 kB 571.14 kB = 101.18 kB 101.18 kB
test_utils/ReactAllWarnings.js Deleted 63.89 kB 0.00 kB Deleted 15.97 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 63.89 kB 0.00 kB Deleted 15.97 kB 0.00 kB

Generated by 🚫 dangerJS against b617aec

@@ -329,7 +329,7 @@ jobs:
git status
echo "===================="
echo "Checking for changes"
if git status --porcelain | grep -qv '/REVISION'; then
if git diff -- . ':(exclude)*REVISION' | grep -vE "^(@@|diff|index|\-\-\-|\+\+\+|@generated SignedSource)" | grep "^[+-]" > /dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment above explaining what its looking for an example of generated header to be matched. Otherwise its going to be rough for the next person who has to adjust this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@rickhanlonii rickhanlonii merged commit 8c3697a into facebook:main Jun 3, 2024
43 checks passed
@rickhanlonii rickhanlonii deleted the rh/fix-xplat-sync branch June 3, 2024 20:39
github-actions bot pushed a commit that referenced this pull request Jun 3, 2024
Use some clever git diffing to ignore lines that only change the
`@generated` header. We can't do this for the version string because the
version string can be embedded in lines with other changes, but this
header is always on one line.

DiffTrain build for commit 8c3697a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants