mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[rfc] Remove top level forget directory
Sorry about the thrash in advance! This removes the top level `forget` directory which adds unnecessary nesting to our repo Hopefully everything still works
This commit is contained in:
1 parent
a13df48d4e
commit
a0dc166991
2814 files changed
+31
-163
No files matched your search
Vendored
+1
-3
@@ -14,11 +14,9 @@ jobs:
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
cache-dependency-path: yarn.lock
|
||||
- run: yarn install --frozen-lockfile
|
||||
working-directory: forget
|
||||
- run: yarn workspace babel-plugin-react-forget run build
|
||||
working-directory: forget
|
||||
- run: yarn install --frozen-lockfile
|
||||
working-directory: react
|
||||
- run: yarn test --ci
|
||||
|
||||
Vendored
+6
-10
@@ -5,15 +5,15 @@ on:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- .github/workflows/**
|
||||
- forget/crates/**
|
||||
- forget/Cargo.*
|
||||
- forget/*.toml
|
||||
- crates/**
|
||||
- Cargo.*
|
||||
- ./*.toml
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/**
|
||||
- forget/crates/**
|
||||
- forget/Cargo.*
|
||||
- forget/*.toml
|
||||
- crates/**
|
||||
- Cargo.*
|
||||
- ./*.toml
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
@@ -36,7 +36,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: cargo test
|
||||
working-directory: forget
|
||||
run: cargo test --manifest-path=Cargo.toml --locked ${{ matrix.target.features && '--features' }} ${{ matrix.target.features }}
|
||||
|
||||
lint:
|
||||
@@ -53,9 +52,7 @@ jobs:
|
||||
components: rustfmt, clippy
|
||||
- name: rustfmt
|
||||
run: grep -r --include "*.rs" --files-without-match "@generated" crates | xargs rustup run nightly-2023-08-01 rustfmt --check --config="skip_children=true"
|
||||
working-directory: ./forget/
|
||||
# - name: cargo clippy
|
||||
# working-directory: forget
|
||||
# run: rustup run nightly-2023-08-01 cargo clippy -- -Dclippy::correctness
|
||||
|
||||
build:
|
||||
@@ -65,5 +62,4 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: cargo build
|
||||
working-directory: forget
|
||||
run: cargo build --release
|
||||
+1
-4
@@ -15,15 +15,12 @@ jobs:
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
cache-dependency-path: yarn.lock
|
||||
- run: yarn install --frozen-lockfile
|
||||
working-directory: forget
|
||||
- run: yarn workspace babel-plugin-react-forget run build
|
||||
working-directory: forget
|
||||
- id: test262
|
||||
name: Run test262
|
||||
run: echo results=$(yarn --silent workspace babel-plugin-react-forget run --silent test262:ci) >> $GITHUB_OUTPUT
|
||||
working-directory: forget
|
||||
- id: format_test262_results
|
||||
name: Format test262 results
|
||||
uses: actions/github-script@v6
|
||||
|
||||
+4
-11
@@ -14,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- id: set-matrix
|
||||
run: echo "matrix=$(find forget/packages -mindepth 1 -maxdepth 1 -type d | sed 's!forget/packages/!!g' | tr '\n' ',' | sed s/.$// | jq -Rsc '. / "," - [""]')" >> $GITHUB_OUTPUT
|
||||
run: echo "matrix=$(find packages -mindepth 1 -maxdepth 1 -type d | sed 's!packages/!!g' | tr '\n' ',' | sed s/.$// | jq -Rsc '. / "," - [""]')" >> $GITHUB_OUTPUT
|
||||
|
||||
# Hardcoded to improve parallelism for babel-plugin-react-forget
|
||||
lint:
|
||||
@@ -26,18 +26,15 @@ jobs:
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
cache-dependency-path: yarn.lock
|
||||
- name: Restore cached node_modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- run: yarn install --frozen-lockfile
|
||||
working-directory: forget
|
||||
- run: yarn workspace babel-plugin-react-forget prettier:ci
|
||||
working-directory: forget
|
||||
- run: yarn workspace babel-plugin-react-forget lint
|
||||
working-directory: forget
|
||||
|
||||
# Hardcoded to improve parallelism for babel-plugin-react-forget
|
||||
jest:
|
||||
@@ -49,7 +46,7 @@ jobs:
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
cache-dependency-path: yarn.lock
|
||||
- name: Restore cached node_modules
|
||||
uses: actions/cache@v3
|
||||
id: node_modules
|
||||
@@ -57,9 +54,7 @@ jobs:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- run: yarn install --frozen-lockfile
|
||||
working-directory: forget
|
||||
- run: yarn workspace babel-plugin-react-forget jest
|
||||
working-directory: forget
|
||||
|
||||
test:
|
||||
name: Test ${{ matrix.workspace_name }}
|
||||
@@ -75,7 +70,7 @@ jobs:
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
cache-dependency-path: yarn.lock
|
||||
- name: Restore cached node_modules
|
||||
uses: actions/cache@v3
|
||||
id: node_modules
|
||||
@@ -83,6 +78,4 @@ jobs:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- run: yarn install --frozen-lockfile
|
||||
working-directory: forget
|
||||
- run: yarn workspace ${{ matrix.workspace_name }} test
|
||||
working-directory: forget
|
||||
+10
-1
@@ -10,4 +10,13 @@ target/
|
||||
**/*.rs.bk
|
||||
|
||||
# MSVC Windows builds of rustc generate these, which store debugging information
|
||||
*.pdb
|
||||
*.pdb
|
||||
|
||||
node_modules
|
||||
.watchmanconfig
|
||||
dist
|
||||
package-lock.json
|
||||
.vscode
|
||||
!packages/playground/.vscode
|
||||
.spr.yml
|
||||
testfilter.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
[submodule "forget/test262"]
|
||||
path = forget/test262
|
||||
[submodule "test262"]
|
||||
path = test262
|
||||
url = git@github.com:tc39/test262.git
|
||||
shallow = true
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -39,7 +39,7 @@ Reference
|
||||
## First-Time Setup
|
||||
|
||||
1. Install Rust using `rustup`. See the guide at https://www.rust-lang.org/tools/install.
|
||||
2. Install Visual Studio Code from https://code.visualstudio.com/.
|
||||
2. Install Visual Studio Code from https://code.visualstudio.com/.
|
||||
Note to Meta employees: install the stock version from that website, not the pre-installed version.
|
||||
3. Install the Rust Analyzer VSCode extension through the VSCode marketplace. See instructions at https://rust-analyzer.github.io/manual.html#vs-code.
|
||||
4. Install `cargo edit` which extends cargo with commands to manage dependencies. See https://github.com/killercup/cargo-edit#installation
|
||||
@@ -47,12 +47,12 @@ Reference
|
||||
|
||||
## Workspace Hygiene
|
||||
|
||||
### Adding Dependencies
|
||||
### Adding Dependencies
|
||||
|
||||
To add a dependency, add it to the top-level `Cargo.toml`
|
||||
|
||||
```
|
||||
// forget/Cargo.toml
|
||||
// Cargo.toml
|
||||
[workspace.dependencies]
|
||||
...
|
||||
new_dep = { version = "x.y.z" }
|
||||
@@ -62,7 +62,7 @@ new_dep = { version = "x.y.z" }
|
||||
Then reference it from your crate as follows:
|
||||
|
||||
```
|
||||
// forget/crates/forget_foo/Cargo.toml
|
||||
// crates/forget_foo/Cargo.toml
|
||||
[dependencies]
|
||||
...
|
||||
new_dep = { workspace = true }
|
||||
@@ -76,7 +76,7 @@ have more but smaller crates. Where possible it helps to structure crates to min
|
||||
passes depend on each other in the sense that they often must run in a certain order. However, they often don't need to call each other,
|
||||
so they can generally be split into crates of similar types of passes, so that those crates can compile in parallel.
|
||||
|
||||
As a rule of thumb, add crates at roughly the granularity of our existing top-level folds. If you have some one-off utility code that
|
||||
As a rule of thumb, add crates at roughly the granularity of our existing top-level folds. If you have some one-off utility code that
|
||||
doesn't fit neatly in a crate, add it to `forget_utils` rather than add a one-off crate for it.
|
||||
|
||||
## Running Tests
|
||||
@@ -92,7 +92,7 @@ tests. To run just these tests use:
|
||||
|
||||
```
|
||||
# quiet version
|
||||
cargo test -p forget_fixtures
|
||||
cargo test -p forget_fixtures
|
||||
|
||||
# without suppressing stdout/stderr output
|
||||
cargo test -p forget_fixtures -- --nocapture
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 2814 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user