Comments (7)
This is definitely a bug. I'll take a look
from react-native.
This is (sadly) a known bug. The issue is happening regardless of you using includesGeneratedCode
or not.
I have an internal ticket to work on this.
Sadly fixing it would be a breaking change for every codegen user so we're being a bit caution on when we should fix.
from react-native.
@cortinico thanks much.
Another issue is that outputDir
is not relative to package root, but to cwd. So in the reproducer if run:
cd ReproducerApp
npx react-native codegen --path ../RTNCalculator --platform android
it generates into ./android/codegen
which is ReproducerApp/android/codegen
instead of ../RTNCalculator/android/codegen
.
RTNCalculator/package.json
:
"includesGeneratedCode": true,
"outputDir": {
"android": "android/codegen"
}
Is this a bug? Shall I open a separate issue for it?
from react-native.
it generates into
./android/codegen
which isReproducerApp/android/codegen
instead of../RTNCalculator/android/codegen
.
mmm I'm not sure this follows to your previous statement.
If as you said, the path is relative to cwd (being ./ReproducerApp
in your example), then stuff should be generated inside:
./RTNCalculator/android/codegen
no?
from react-native.
mmm I'm not sure this follows to your previous statement. If as you said, the path is relative to cwd (being
./ReproducerApp
in your example), then stuff should be generated inside:./RTNCalculator/android/codegen
no?
Sorry if I wasn't clear. I'd expect
"includesGeneratedCode": true,
"outputDir": {
"android": "android/codegen"
}
to always generate into RTNCaclulator/android/codegen
so always into the lib, but if I run from the app directory it creates new folder in the app
cd ReproducerApp
npx react-native codegen --path ../RTNCalculator --platform android
it generates into ReproducerApp/android/codegen
ReproducerApp % ls -la android/codegen/java/com/rtncalculator
total 8
drwxr-xr-x 3 boga staff 96 Jun 20 14:24 .
drwxr-xr-x 4 boga staff 128 Jun 20 14:24 ..
-rw-r--r-- 1 boga staff 1130 Jun 20 14:24 NativeRTNCalculatorSpec.java
from react-native.
@dmytrorykun can help you more here as he implemented the react-native codegen
command. But yes this is probably a separate bug which needs a separate issue
from react-native.
Related Issues (20)
- Not able to run my react-native app HOT 3
- useWindowDimensions does not work for Expo 51 HOT 2
- Android Talkback - Checkbox accessibility state stuck with announcing "mixed" once the mixed state is introduced HOT 2
- codegen - 0.74: Int32 | null generates Nullable Integer on java side, but Ljava/lang/Double on c++ side. HOT 12
- `maxLength` of TextInput does not work when value is changed after state update HOT 2
- React native pod file use_modular_headers! throwing Redefinition of module 'ReactCommon' error HOT 2
- [BUG] :: MainActivity memory leak when running foreground service HOT 1
- [Android] Timing of NativeCommands delivery vs. calls of TurboModule methods vs. AppState changes HOT 2
- TextInput callbacks inconsistent order of onSelectionChange and onChange/onChangeText HOT 2
- 0.74.2: RCTDeprecation/RCTDeprecation.h file not found HOT 1
- Finish implementing URL accessors like host, hostname, username, password HOT 5
- 0.72: Backport fix for privacy manifest generation path being nil HOT 2
- iOS: useWindowDimensions is not returning correct values after rotating when phone is locked. HOT 1
- [iOS] onChangeText of TextInput is fired with text longer than maxLength, then press undo app crashed HOT 7
- Need support for 16KB page size on Android HOT 2
- Adding custom fonts in react native cli not working (using yarn as package manager ) HOT 4
- [Web Socket][Android] Sec-WebSocket-Protocol header should have a space after the comma HOT 5
- Memory Leak in Dialog Management: ReactRootView not removed from View Tree when Dialog is not showing HOT 3
- Timers in the new architecture are not spec compliant HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.