You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking two related TODOs in the lint job of .github/workflows/check.yml.
The lint job currently has to set up a full native toolchain — JDK 17, the Android SDK + NDK, and the x86_64-linux-android Rust target — and then bootstrap two packages, purely so that type-checking has types to work with:
# Bootstrap weak-node-api and ferric-example to get types
# TODO: Solve this by adding an option to ferric to build only types or by committing the types into the repo as a fixture for an "init" command
That is a lot of wall-clock time and cache surface for a job whose actual output is ESLint, Prettier, depcheck and publint results. It also couples the fastest-feedback job to the health of the native toolchain: an NDK or rustup hiccup fails linting on a pure-TypeScript PR.
Two things need solving, and they can be tackled independently:
weak-node-api — pnpm --filter weak-node-api run bootstrap is run for its generated types. Splitting the generation of the TypeScript/C++ declarations from the actual native build would let the lint job generate types only, dropping the JDK/Android SDK/NDK setup.
ferric-example — as the existing TODO suggests, either add an option to ferric to emit only the .d.ts (skipping the Cargo build), or commit the generated types into the repo as a fixture — the latter doubles as the fixture an init command would need (Ferric init command #299).
Once both are addressed, the JDK, Android SDK and rustup target add steps can be removed from the lint job.
Tracking two related
TODOs in thelintjob of.github/workflows/check.yml.The lint job currently has to set up a full native toolchain — JDK 17, the Android SDK + NDK, and the
x86_64-linux-androidRust target — and then bootstrap two packages, purely so that type-checking has types to work with:react-native-node-api/.github/workflows/check.yml
Lines 62 to 63 in 29a527d
react-native-node-api/.github/workflows/check.yml
Lines 76 to 77 in 29a527d
That is a lot of wall-clock time and cache surface for a job whose actual output is ESLint, Prettier, depcheck and publint results. It also couples the fastest-feedback job to the health of the native toolchain: an NDK or
rustuphiccup fails linting on a pure-TypeScript PR.Two things need solving, and they can be tackled independently:
weak-node-api—pnpm --filter weak-node-api run bootstrapis run for its generated types. Splitting the generation of the TypeScript/C++ declarations from the actual native build would let the lint job generate types only, dropping the JDK/Android SDK/NDK setup.ferric-example— as the existingTODOsuggests, either add an option toferricto emit only the.d.ts(skipping the Cargo build), or commit the generated types into the repo as a fixture — the latter doubles as the fixture aninitcommand would need (Ferricinitcommand #299).Once both are addressed, the JDK, Android SDK and
rustup target addsteps can be removed from the lint job.