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

Yarn replace-fork should not silently error #22156

Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Aug 22, 2021

If the Yarn replace-fork script fails while running the lint sub-command, catch and report the error. (Previously this error was being swallowed and causing CI to incorrectly report a different problem.)

Relates to #21998, #22151

@bvaughn bvaughn requested a review from acdlite August 22, 2021 18:37
@facebook-github-bot facebook-github-bot added React Core Team Opened by a member of the React Core Team CLA Signed labels Aug 22, 2021
@bvaughn bvaughn force-pushed the fix-yarn-replace-fork-to-not-silently-error branch from bc4f3b4 to fd8cc7d Compare August 22, 2021 18:37
@sizebot
Copy link

sizebot commented Aug 22, 2021

Comparing: fc3b6a4...5e1b71f

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.min.js = 127.58 kB 127.58 kB = 40.72 kB 40.72 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 130.40 kB 130.40 kB = 41.65 kB 41.65 kB
facebook-www/ReactDOM-prod.classic.js = 405.16 kB 405.16 kB = 75.04 kB 75.04 kB
facebook-www/ReactDOM-prod.modern.js = 393.72 kB 393.72 kB = 73.32 kB 73.32 kB
facebook-www/ReactDOMForked-prod.classic.js = 405.16 kB 405.16 kB = 75.04 kB 75.04 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 5e1b71f

@bvaughn bvaughn force-pushed the fix-yarn-replace-fork-to-not-silently-error branch from fd8cc7d to 5e1b71f Compare August 22, 2021 18:52
@ryota-murakami
Copy link
Contributor

Nice fix!
In the case shouldn't reach last warn message.

"Reconciler forks are not the same! Run yarn replace-fork. Or, if this was intentional, disable this CI check."

@ryota-murakami
Copy link
Contributor

https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---quiet

--exit-code
Make the program exit with codes similar to diff(1). That is, it exits with 1 if there were differences and 0 means no differences.

--quiet
Disable all output of the program. Implies --exit-code.

I see, git diff --quiet option also enabling --exit-code.
there is diff = 1, no diff = 0

@bvaughn bvaughn merged commit 4df10c5 into facebook:main Aug 22, 2021
@bvaughn bvaughn deleted the fix-yarn-replace-fork-to-not-silently-error branch August 22, 2021 20:53
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
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.

None yet

5 participants