-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
codegen: outputDir is not relative to the package, but to the current directory #45112
Labels
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Comments
mfazekas
added
Needs: Triage 🔍
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
labels
Jun 22, 2024
cortinico
added
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
and removed
Needs: Triage 🔍
labels
Jun 22, 2024
dmytrorykun
added a commit
to dmytrorykun/react-native
that referenced
this issue
Jun 25, 2024
Summary: This is a fix for facebook#45112 This diff changes the codegen so that the output path is computed relative to project root (or `path` if provided) instead of current working directory. Changelog: [General][Fixed] - Codegen computes output path relative to project root instead of current working directory. Reviewed By: fkgozali Differential Revision: D59009821
Thank you for a high quality issue! The fix is on the way #45165 |
facebook-github-bot
pushed a commit
that referenced
this issue
Jun 26, 2024
Summary: Pull Request resolved: #45165 This is a fix for #45112 This diff changes the codegen so that the output path is computed relative to project root (or `path` if provided) instead of current working directory. Changelog: [General][Fixed] - Codegen computes output path relative to project root instead of current working directory. Reviewed By: fkgozali Differential Revision: D59009821 fbshipit-source-id: 3a138a3508fc239c8600b8c9f242f1c665f8e3c0
This was referenced Jun 26, 2024
Picks requested. |
Titozzz
pushed a commit
that referenced
this issue
Jul 1, 2024
Summary: Pull Request resolved: #45165 This is a fix for #45112 This diff changes the codegen so that the output path is computed relative to project root (or `path` if provided) instead of current working directory. Changelog: [General][Fixed] - Codegen computes output path relative to project root instead of current working directory. Reviewed By: fkgozali Differential Revision: D59009821 fbshipit-source-id: 3a138a3508fc239c8600b8c9f242f1c665f8e3c0
cortinico
pushed a commit
that referenced
this issue
Jul 1, 2024
Summary: Pull Request resolved: #45165 This is a fix for #45112 This diff changes the codegen so that the output path is computed relative to project root (or `path` if provided) instead of current working directory. Changelog: [General][Fixed] - Codegen computes output path relative to project root instead of current working directory. Reviewed By: fkgozali Differential Revision: D59009821 fbshipit-source-id: 3a138a3508fc239c8600b8c9f242f1c665f8e3c0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
If my rtn-caclulator package.json have:
i'd expect codegen to generate into
rtn-caclulator/android/codegen
but codegen will generate code intoandorid/codegen
so it'll depend on where i execute codegen from.Steps to reproduce
cd ReproducerApp yarn install
ReproducerApp % ls -la android/codegen/java/com/rtncalculator/ total 8 drwxr-xr-x 3 boga staff 96 Jun 22 07:20 . drwxr-xr-x 3 boga staff 96 Jun 22 07:20 .. -rw-r--r-- 1 boga staff 1130 Jun 22 07:20 NativeRTNCalculatorSpec.java
It think that in code the issue is that in the bellow code
projectRoot
points to the project's root, whileoutputDirFromPkgJson
is just a relative path.react-native/packages/react-native/scripts/codegen/generate-artifacts-executor.js
Lines 367 to 371 in 2a6a895
React Native Version
0.74.2
Affected Platforms
Runtime - Android
Areas
Codegen
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/mfazekas/rn-codegen-javapackagename/
Screenshots and Videos
The text was updated successfully, but these errors were encountered: