Skip to content

Commit

Permalink
Update on "[compiler][hir] Correctly remove non-existent terminal pre…
Browse files Browse the repository at this point in the history
…ds when pruning labels"

Missed this initially in `pruneUnusedLabelsHIR`. It wasn't an active bug as `preds` wasn't referenced by later passes, until #30079

[ghstack-poisoned]
  • Loading branch information
mofeiZ committed Jun 25, 2024
2 parents f8026d0 + 13e21bf commit b1db59f
Show file tree
Hide file tree
Showing 60 changed files with 764 additions and 608 deletions.
65 changes: 2 additions & 63 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ jobs:
at: .
- setup_node_modules
- run: ./scripts/circleci/download_devtools_regression_build.js << parameters.version >> --replaceBuild
- run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion << parameters.version >> --ci
- run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion << parameters.version >> --ci=circleci

run_devtools_e2e_tests_for_versions:
docker: *docker
Expand Down Expand Up @@ -345,31 +345,6 @@ jobs:
yarn extract-errors
git diff --quiet || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false)
check_generated_fizz_runtime:
docker: *docker
environment: *environment
steps:
- checkout
- attach_workspace: *attach_workspace
- setup_node_modules
- run:
name: Confirm generated inline Fizz runtime is up to date
command: |
yarn generate-inline-fizz-runtime
git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false)
yarn_test:
docker: *docker
environment: *environment
parallelism: *TEST_PARALLELISM
parameters:
args:
type: string
steps:
- checkout
- setup_node_modules
- run: yarn test <<parameters.args>> --ci

yarn_test_build:
docker: *docker
environment: *environment
Expand All @@ -382,7 +357,7 @@ jobs:
- attach_workspace:
at: .
- setup_node_modules
- run: yarn test --build <<parameters.args>> --ci
- run: yarn test --build <<parameters.args>> --ci=circleci

RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
docker: *docker
Expand Down Expand Up @@ -432,42 +407,6 @@ workflows:
build_and_test:
unless: << pipeline.parameters.prerelease_commit_sha >>
jobs:
- check_generated_fizz_runtime:
filters:
branches:
ignore:
- builds/facebook-www
- yarn_test:
filters:
branches:
ignore:
- builds/facebook-www
matrix:
parameters:
args:
# Intentionally passing these as strings instead of creating a
# separate parameter per CLI argument, since it's easier to
# control/see which combinations we want to run.
- "-r=stable --env=development"
- "-r=stable --env=production"
- "-r=experimental --env=development"
- "-r=experimental --env=production"
- "-r=www-classic --env=development --variant=false"
- "-r=www-classic --env=production --variant=false"
- "-r=www-classic --env=development --variant=true"
- "-r=www-classic --env=production --variant=true"
- "-r=www-modern --env=development --variant=false"
- "-r=www-modern --env=production --variant=false"
- "-r=www-modern --env=development --variant=true"
- "-r=www-modern --env=production --variant=true"
- "-r=xplat --env=development --variant=false"
- "-r=xplat --env=development --variant=true"
- "-r=xplat --env=production --variant=false"
- "-r=xplat --env=production --variant=true"

# TODO: Test more persistent configurations?
- '-r=stable --env=development --persistent'
- '-r=experimental --env=development --persistent'
- yarn_build:
filters:
branches:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Compiler Playground
name: (Compiler) Playground

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: React Compiler (Rust)
name: (Compiler) Rust

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: React Compiler (TypeScript)
name: (Compiler) TypeScript

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devtools_check_repro.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DevTools Check for bug repro
name: (DevTools) Check for bug repro
on:
issues:
types: [opened, edited]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Commit Artifacts for Meta WWW and fbsource
name: (Runtime) Commit Artifacts for Meta WWW and fbsource

on:
push:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/runtime_fizz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: (Runtime) Fizz

on:
push:
branches: [main]
pull_request:
paths-ignore:
- 'compiler/**'

jobs:
check_generated_fizz_runtime:
name: Confirm generated inline Fizz runtime is up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Restore cached node_modules
uses: actions/cache@v4
id: node_modules
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: |
yarn generate-inline-fizz-runtime
git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Flags
name: (Runtime) Flags

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Flow
name: (Runtime) Flow

on:
push:
Expand Down Expand Up @@ -44,4 +44,4 @@ jobs:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: node ./scripts/tasks/flow-ci-ghaction ${{ matrix.flow_inline_config_shortname }}
- run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: facebook/react/fuzz_tests
name: (Runtime) Fuzz tests
on:
schedule:
- cron: 0 * * * *
Expand Down Expand Up @@ -28,5 +28,5 @@ jobs:
shell: bash
- name: Run fuzz tests
run: |-
FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci
FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci
FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci=github
FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci=github
85 changes: 85 additions & 0 deletions .github/workflows/runtime_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: (Runtime) Test

on:
push:
branches: [main]
pull_request:
paths-ignore:
- 'compiler/**'

env:
# Number of workers (one per shard) to spawn
SHARD_COUNT: 5

jobs:
# Define the various test parameters and parallelism for this workflow
build_test_params:
name: Build test params
runs-on: ubuntu-latest
outputs:
params: ${{ steps.define-params.outputs.result }}
shard_id: ${{ steps.define-shards.outputs.result }}
steps:
- uses: actions/github-script@v7
id: define-shards
with:
script: |
function range(from, to) {
const arr = [];
for (let n = from; n <= to; n++) {
arr.push(n);
}
return arr;
}
return range(1, process.env.SHARD_COUNT);
- uses: actions/github-script@v7
id: define-params
with:
script: |
return [
"-r=stable --env=development",
"-r=stable --env=production",
"-r=experimental --env=development",
"-r=experimental --env=production",
"-r=www-classic --env=development --variant=false",
"-r=www-classic --env=production --variant=false",
"-r=www-classic --env=development --variant=true",
"-r=www-classic --env=production --variant=true",
"-r=www-modern --env=development --variant=false",
"-r=www-modern --env=production --variant=false",
"-r=www-modern --env=development --variant=true",
"-r=www-modern --env=production --variant=true",
"-r=xplat --env=development --variant=false",
"-r=xplat --env=development --variant=true",
"-r=xplat --env=production --variant=false",
"-r=xplat --env=production --variant=true",
// TODO: Test more persistent configurations?
"-r=stable --env=development --persistent",
"-r=experimental --env=development --persistent"
];
# Spawn a job for each shard for a given set of test params
test:
name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard_id }})
runs-on: ubuntu-latest
needs: build_test_params
strategy:
matrix:
params: ${{ fromJSON(needs.build_test_params.outputs.params) }}
shard_id: ${{ fromJSON(needs.build_test_params.outputs.shard_id) }}
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Restore cached node_modules
uses: actions/cache@v4
id: node_modules
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn test ${{ matrix.params }} --ci=github --shard=${{ matrix.shard_id }}/${{ env.SHARD_COUNT }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint
name: (Shared) Lint

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuration for stale action workflow - https://github.com/actions/stale
name: 'Manage stale issues and PRs'
name: (Shared) Manage stale issues and PRs
on:
schedule:
# Run hourly
Expand Down
2 changes: 1 addition & 1 deletion compiler/packages/babel-plugin-react-compiler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-react-compiler",
"version": "0.0.0-experimental-179941d-20240614",
"version": "0.0.0-experimental-696af53-20240625",
"description": "Babel plugin for React Compiler.",
"main": "dist/index.js",
"license": "MIT",
Expand Down
Loading

0 comments on commit b1db59f

Please sign in to comment.