-
Notifications
You must be signed in to change notification settings - Fork 10
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
Compile TypeScript to JavaScript before publishing to npm #198
base: main
Are you sure you want to change the base?
Compile TypeScript to JavaScript before publishing to npm #198
Conversation
Thanks a bunch! Somebody recently reported an error that involved type generation which this fix will prevent in future. 👍 |
I think we might have to trigger |
eeec514
to
f0e66fe
Compare
|
Hm, this looks like the error that occurs when the pod isn't linked correctly: https://jhugman.github.io/uniffi-bindgen-react-native/guides/troubleshooting.html#compiling-for-ios-gives-an-error-unifficallinvokerh-file-not-found I'm not sure how your PR would interact with that though. 🤔 I'm currently afk and cannot check deeper, sadly. |
@Johennes Appreciate the pointers, I'm looking into it but haven't yet had any luck. Will post back if I get anywhere 👍 |
Interestingly, I can't even build locally: ![]() Clicking "Template is declared here" takes me to https://github.com/jhugman/uniffi-bindgen-react-native/blob/main/cpp/includes/Bridging.h |
@hassankhan : thank you so much for digging into this!
Just dropping in here while I'm off. A few things that have been rattling round my head thinking about this PR:
|
Hi @jhugman, hope you've had a great Christmas 🎄
I've opened #200 to address this.
Absolutely, that makes sense and I'll update the PR accordingly.
I've tried to set it up so that it won't require any change to the publishing workflow; I'm using the
(a) In the short term, we can run (b) It would be nice to have an E2E test suite that runs through the Introduction example programmatically i.e. create an app, create a turbo module, add Uniffi, get the calculator example building.
The latter. This change would only compile this library's TypeScript into JavaScript and TypeScript declaration files; the generated files in a RN module would still be TypeScript, and the consuming app is assumed to be TypeScript too (doesn't have to be I suppose). Thanks for the feedback! |
f0e66fe
to
00fda83
Compare
Have a look in |
I've had a quick look; it seems like in
I'll try my best and see how far I get 👍 |
Hey @hassankhan did we lose you!? Oh no! |
Apologies, I've been busy with another project. Still hoping to get back to this in the next few weeks 😅 |
Prevents issues with TypeScript declaration generation when the consuming project has strict mode enabled:
Fixes #196