Open cometkim opened 1 month ago
This seems sensible to me. Feel free to ping me when this diff is ready for review (I see it's still marked as Draft).
I wonder if there's a sensible way to add some tests which assert that the compiler and this code arrive at the same hash?
That's is easy if we can run the printer standalone. Or, it would be ideal to publish to NPM and directly use its WASM or NAPI distribution
Workaround: Commit md5 hashes for all the fixtures in the graphql-text-printer crate test suite. Then we can compare it when running the babel plugin tests.
@captbaritone I added idempotency testing using compiler-side fixtures. Fixed 4 failures related to spaces between multiple definitions and it all passes.
@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
I think it makes more sense for each package to have a lockfile since there is no workspaces setup, or gitignoring. yarn install
is needed to run the test suite for react-relay
, but it doesn't seem to be running anywhere?
Anyway, I'd suggest clearing it and activating the workspaces, it would improve your CI cache hits a lot.
@cometkim Yeah, I could have sworn we had a workspace setup. Here's where we do the global yarn install. I guess we'll need to either setup the workspace or manually run install for this package.
https://github.com/facebook/relay/blob/main/.github/workflows/ci.yml#L45
setup here? or another pr?
Either way. Whatever you prefer.
https://github.com/facebook/relay/pull/4711
I'm not sure it could actually boost the CI, let's see.
See #3628 and #4226