-
Notifications
You must be signed in to change notification settings - Fork 48.7k
[DevTools] Add --replaceBuild
option to Older React Builds Download Script
#24621
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
Conversation
Comparing: 05c34de...bd1a9f4 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I really understand what's going on with this script.
Won't replacing the contents of build
with the older versions we downloaded also cause DevTools itself to run with those older versions? Since we're downloading both react-dom
and react-test-renderer
?
const INSTALL_PACKAGES = ['react-dom', 'react', 'react-test-renderer'];
Yeah it does, but we're only using the older versions for Jest tests that render a React App to test the DevTools backend implementation, and the DevTools code that requires React is the front end code. We don't have regression tests for jest tests that test the DevTools front end, and for e2e regression tests, we have a separate build folder for DevTools front end ( This script is in charge of downloading the npm packages and either keeping them in Do you have a different suggestion? |
Ah, okay. I see. Sorry it's a little hard to context switch between this project and Replay sometimes because the test situation is very different. What you're saying makes sense. It's a little unfortunate, since it limits the types of things we're able to test, but I guess we can still test the store and the inspect element logic which is for the most part the only things that change between versions anyway. And it's way better coverage than the nothing we had before. My main concern was that this would build all of DevTools (frontend and backend) using the older version of React that we just downloaded, so the frontend would be broken if we ever did want to use it (and maybe it wouldn't be obvious to someone who wasn't familiar with this part of the code bootstrapping):
No, probably not. I had initially imagined that we could leave the |
Yeah, and we have e2e tests that we want to expand on to hopefully test the rest.
Yeah that makes sense. I was imagining this only being used in the regression tests though (it doesn't actually create a build folder, just replace it in regression tests), so I think it's probably OK. Also open to copying the build folder, running the regression tests, and then replacing them if you think that's a better way to do it? |
Might be a nice change to have in a |
This PR adds a
--replaceBuild
option to the script that downloads older React version builds. If this flag is true, we will replace the contents of thebuild
folder with the contents of thebuild-regression
folder and remove thebuild-regression
folder after, which was the original behavior.However, for e2e tests, we need both the original build (for DevTools) and the new build (for the React Apps), so we need both the
build
and thebuild-regression
folders. Not adding the--replaceBuild
option will do this.This PR also modifies the circle CI config to reflect this change.