Skip to content

Conversation

aki-mizu
Copy link
Contributor

@aki-mizu aki-mizu commented Apr 9, 2025

Currently only some generated folders like ios/generated and android/generated are included in gitignore while others like cpp/generated and src/generated are not.
I'm getting different files generated inside cpp/generated when I run yarn ubrn:ios, so it seems it's better to not upload those generated folders and files to avoid getting generated files different than those committed.
Please let me know if this is the correct approach.

Copy link
Member

@yukibtc yukibtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I see that android/src/main/AndroidManifestNew.xml and android/gradle.properties aren't regenerated, so should be left.

Please let me know if this is the correct approach.

I guess it's the right approach. I'm not practical with React Native, but since they are generated automatically, it makes sense. Are you aware of possible issues by removing these files? I see other projects, like https://github.com/unomed-dev/react-native-matrix-sdk, keep these files, but I guess it's because, by default, the .gitignore generated by React Native doesn't exclude those files.

@aki-mizu
Copy link
Contributor Author

I see that android/src/main/AndroidManifestNew.xml and android/gradle.properties aren't regenerated, so should be left.

Thanks for the findings.
I tried to run the example Android project using npm run android, I was able to run it without these two files.
Also I verified changing content in these two files does not have any impact on the built example app. So they are not being used in any practical way even if we keep them.
It's also not mentioned anywhere in the official documentation that these files need to be created manually.
https://jhugman.github.io/uniffi-bindgen-react-native/reference/commandline.html
From their commit history it's not clear why react-native-matrix-sdk has these two files, maybe in earlier version it was necessary to add these files.
Let me know if you still prefer to add them, I will adjust the changes.

Are you aware of possible issues by removing these files?

I tried running both example iOS and Android project, it works perfectly without the need to make any changes to those generated folders.
Since this repo is more like a template project, keeping only bare minimum files would help other projects adopt the same template, not necessarily copying from react-native-matrix-sdk repo, but that's just my opinion.

Copy link
Member

@yukibtc yukibtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried running both example iOS and Android project, it works perfectly without the need to make any changes to those generated folders.

Awesome, so we can merge it.

not necessarily copying from react-native-matrix-sdk repo, but that's just my opinion

Yeah, I checked it because I'm not practical about React Native, so just to take a cue. If everything works well, it's better to keep it as cleaned as possible.

@yukibtc yukibtc merged commit 4aa3c16 into rust-nostr:master Apr 11, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants