diff --git a/formulus/AGENTS.md b/formulus/AGENTS.md index ab76a0397..66f420d83 100644 --- a/formulus/AGENTS.md +++ b/formulus/AGENTS.md @@ -66,6 +66,7 @@ pnpm does not hoist transitive packages to the package root. Anything **imported | ------- | --------- | --- | ------------- | | `axios` | `^1.16.1` (direct dep) | OpenAPI-generated Synkronus client imports it; under pnpm it was only transitive via `@openapitools/openapi-generator-cli`, so release Metro bundling (`createBundleReleaseJsAndAssets`) failed while PR `assembleDebug` could pass. | Keep as direct dep while using the `typescript-axios` generator. | | `buffer` | `^6.0.3` (direct dep) | `FRMLSHelpers.ts` imports `Buffer` from `buffer`; under pnpm it was not hoisted, so release Metro bundling failed the same way as `axios`. | Keep while app code imports the polyfill. | +| `hermes-compiler` | `0.14.0` (direct dep, match RN) | RN 0.83 moved `hermesc` into this package; under pnpm Gradle still looks under `react-native/sdks/hermesc` and fails release bundling. Also set `react.hermesCommand` in `android/app/build.gradle`. | Revisit after RN ≥ 0.85 pnpm hermes fixes; bump in lockstep with `react-native`. | | `react-native-screens` | `4.25.2` (no `^`) | `4.26+` needs RN **0.84+** and uses `React.ComponentRef` in Fabric commands; codegen **0.83** only accepts `React.ElementRef`, so Android fails at `:react-native-screens:generateCodegenSchemaFromJavaScript`. | After upgrading RN to **≥ 0.84** (ideally **0.87**): restore a caret range (e.g. `^4.27.0`) and confirm Android codegen + screens still build. | | `@nozbe/sqlite` / `@nozbe/simdjson` | `3.46.0` / `3.9.4` (direct deps) | WatermelonDB JSI `CMakeLists.txt` resolves `node_modules/@nozbe/{sqlite,simdjson}` from a relative path; pnpm does not hoist those transitive packages there, so CMake gets `No SOURCES given to target: watermelondb-jsi`. | Keep as direct deps aligned with `@nozbe/watermelondb`'s versions. | | `@nozbe/watermelondb` | patched (`patches/@nozbe__watermelondb@0.28.0.patch`) | Same CMake file uses `../../../../../../../react-native`. Under pnpm the package is symlinked into `.pnpm/…`; on Linux `..` follows the real path into the package store (sqlite/simdjson present, **react-native not**), so `#include ` fails. Patch walks up until `jsi.h` is found. | Drop the patch when upstream CMake is pnpm-safe, or after switching away from WatermelonDB JSI. | diff --git a/formulus/android/app/build.gradle b/formulus/android/app/build.gradle index 4d1714211..c132dad97 100644 --- a/formulus/android/app/build.gradle +++ b/formulus/android/app/build.gradle @@ -50,8 +50,9 @@ react { // extraPackagerArgs = [] /* Hermes Commands */ - // The hermes compiler command to run. By default it is 'hermesc' - // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" + // RN 0.83 ships hermesc via the hermes-compiler package; under pnpm Gradle cannot + // find the old sdks/hermesc path, so release bundling fails without this. + hermesCommand = "$rootDir/../node_modules/hermes-compiler/hermesc/%OS-BIN%/hermesc" // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] diff --git a/formulus/package.json b/formulus/package.json index 2a26622eb..a5f039d45 100644 --- a/formulus/package.json +++ b/formulus/package.json @@ -44,6 +44,7 @@ "@react-navigation/stack": "^7.10.23", "axios": "^1.16.1", "buffer": "^6.0.3", + "hermes-compiler": "0.14.0", "i18next": "^26.4.0", "lucide-react-native": "^0.577.0", "react": "19.2.4", diff --git a/formulus/pnpm-lock.yaml b/formulus/pnpm-lock.yaml index fd781a4d6..e15be9ac8 100644 --- a/formulus/pnpm-lock.yaml +++ b/formulus/pnpm-lock.yaml @@ -85,6 +85,9 @@ importers: buffer: specifier: ^6.0.3 version: 6.0.3 + hermes-compiler: + specifier: 0.14.0 + version: 0.14.0 i18next: specifier: ^26.4.0 version: 26.4.0(typescript@5.9.3)