-
Notifications
You must be signed in to change notification settings - Fork 441
feat(nativescript): v7 updates and compatibility to target es2017+ #1640
feat(nativescript): v7 updates and compatibility to target es2017+ #1640
Conversation
NathanWalker
commented
Jul 18, 2020
•
edited
Loading
edited
- updates to latest rc's to prepare codebase
- suggests @nativescript/firebase for future home (already rc published there)
- verifying all api's work as expected
@NathanWalker I don't really know the reasoning, but it looks like the postinstall script that sets up the config lives in two places, one in src, one in publish. The publish one hasn't been updated, and I believe it is used to build the src one. Here is the file: https://github.com/nstudio/nativescript-plugin-firebase/blob/feat/dep-updates/publish/scripts/installer.js#L16 If I do |
@NathanWalker I see that |
Thanks @james-criscuolo sorry for late reply - latest is pushed up now but there's some more typings to clean up which we can help with this week. Please let me know if you're able to pull the latest here. |
I was able to pull the latest, just having issues getting this running. I notice when
If the code is testable in some way, I'll get my commits on top and use the test to get to the bottom of it. If you do think it's related to the errors on |
@james-criscuolo Just FYI I got rid of that "duplicate" postinstall script in master. It was there because years ago I wanted folks to be able to pull the latest from Github directly (as opposed to npm) to test bleeding edge versions. That required the webpacked version op the master script in /publish. Since this got converted to TS it wasn't of much use (as you can't pull that into node_modules directly anyway). |
@james-criscuolo thanks for posting in a new PR - we'll see if can pull your fork down and help from that point. |
Sure thing, and it would be great if that PR was taken, but all of my questions are from the point of this PR. If I could get this PR up and running (like with the demo commands in this repo), I'd be happy to continue pulling along those changes if necessary. |
@james-criscuolo Shooting to get the typings squared out by eod Thursday -- The main thing is to allow nice/succinct symbols for each aspect of the firebase plugin to provide for good tree shaking of things not used - hence the switch here to |
4296803
to
6b8209d
Compare
ok @james-criscuolo build is fixed now - please give it a go and lemme know how things look from your end with this. |
I get no build errors now, but my apps do not get further along during their build process. I did notice one warning pop up that a change to firebase-common.ts fixes:
My next step is to go back and try building and running the demos with just this PR, as I wasn't able to do that before, but may be able to now. |
@james-criscuolo there was some global handling attaching things to that firebase object throughout which we ultimately probably may wanna move away from. Rather provide distinct symbols with relevant functions for that area on them which are exported. That way |
So i wasn't able to put much time in on this today, but I stumbled upon an interesting clue regardless. I had the new cli dependency installed, but was back on my stable branch. I'm aware there are a few things that occur differently, but I had been able to get past the install up until recently. I ended up running into the same issue as I ran into with this PR, just with my stable version of theis library. This leads me to believe something with the packaging is now messed up, or the CLI now reads packages differently. What we do in our library:
I need to read the plugin authors blog, but I'm hoping the change needed (at least, to get over this hurdle) has nothing to do with the specifics of this repo. |
Really appreciate the assistance @james-criscuolo - daily client work has been heavy - perhaps would be helpful if we did a Zoom on Thursday to look at things together to help clear any remaining issues. |
Ok so I did some digging and I noticed that my gradlew EACCESS error is all over google, and the solution is to chmod gradlew. In
And installing via
As I wanted to test the new version after chmod'ing, That install downloaded a new version of gradle and I see
I think Android Studio may have updated gradle instead of in the nativescript build process? I was able to get past this, but not sure how I ended up in this situation to begin with. So I think I'm past any issues with Android, I have an issue now related to the introduction of the new configuration file, but haven't dug in enough to get to the bottom of it yet. Once I get through that one, I plan to hop back to iOS and see what is happening there. |
It would appear the new build system expects
So my only package.json for nativescript is now in the I recognize this is not related to this issue at all. I'm happy to open a new issue, and create a test repo for this. It should be pretty easy to replicate, you end up with a max stack size exceeded if no package.json's exist. To get past this for the time being, I'm going to attempt switching back to the old configuration method. |
So my android app now runs and firebase seems to be functional. I think iOS had been blocked by the same nativescript.config.ts issue highlighted above, but now that I've tabled that temporarily, I have a new issue:
I have NativeClass elsewhere in my code, so I'm not sure why the package can not access it. |
Excellent investigations @james-criscuolo - I can help on the NativeClass - is your latest pushed up here to this branch or can let me know what fork/branch I can pull - I can clear that last hurdle momentarily. |
I've been using this branch, with #1111 rebased on top, but just fixing this branch should be enough for me to retest once this is cleared. |
@james-criscuolo ok just pushed up what should help your case. The |
Wanted to give a brief update here. I was able to get past my build issue after your most recent commit. My iOS build is now stuck trying to get the AppDelegate to work. Comparing it to our old sample repo with an AppDelegate (which works), I'm trying to narrow down the differences, as I'm not sure what else could cause it. Is there anything that won't work with a NativeClass? Our AppDelegate has static functions and variables declared in the file outside of the class, which the sample one does not have. I'm working on pulling those out, so I'm hoping to get over this hurdle tomorrow. |
Let's do a zoom @james-criscuolo to look together - lemme know a good time on Friday or Monday 👍 |
I can do anytime after 12PM eastern time tomorrow or Monday, just let me know. |
Hi guys, I just tried rc 6 on Android and it is still broken. You cannot login at all. The following code on
I do not think you can use
|
@jalberto-ghub we just published rc.7 (if using |
@NathanWalker, I had this issue on Android as well, and I confirm it's now fixed (by rc.7). Thanks a lot! Paolo |
Hi @NathanWalker, I think a bug has crept into the Firestore Document Reference object. The firebase.android.ts file now has the following function: `firebase.firestore._getDocumentReference = (docRef?: JDocumentReference): firestore.DocumentReference => { const collectionPath = docRef.getParent().getPath(); return { The onSnapshot function now has a reference to firebase.onDocumentSnapshot instead of firestore.onDocumentSnapshot which is giving a TypeError and stopping the onSnapshot call from working. Thanks. |
@shipley-dcc thank you - we'll correct this and get another rc out or may publish a final 11.0.0 version. |
@shipley-dcc rc.8 was just published - if using |
@NathanWalker That's fixed it. Thanks. |
Excellent thanks - we just published |
Any information about when will the PR get merged? |
@bellalMohamed we’re discussing with @EddyVerbruggen whether we drop this in a workspace for the scoped 11.0 ({N} 7 compat) and beyond future. There’s a number of good reasons to not merge this here actually. For quite some time if not infinitely there will always be older projects out there on {N} 6 and lower so this can and will always serve as the commonjs/es5 base. Another reason is with {N} 7 and beyond the benefits of the plugin workspace are immense with future maintainability for a plugin this large. I would anticipate some decision being made here over the next 2 weeks. Another option is to branch master to tns-core-modules and merging to master and adding a more workspace style setup here. The shift from es5 > es2017 is significant and one of the core reasons behind scoping some high use plugins to allow both ‘latest’ versions to exist on either providing some clarity to {N} 6 and below vs {N} 7 and beyond. |
My humble opinion, is to drop 11.0 in a workspace and set a depreciation date for the {N} 6 support, as the new mindset of {N} 7 is to stay up-to-date, so I know it will be hard to drop support for older projects, but it's inevitable, and too focus more on the future of {N}, and give a better support for these packages. |
Hi all, Thanks for your MR 👍 Are these RC versions available somewhere (I can't find it on npm) ? Do you know when is the version 11.0 planned ? Edit : ok find it => https://www.npmjs.com/package/@nativescript/firebase |
@EddyVerbruggen, @NathanWalker, I'm getting a random crash when trying to login with Google on iOS after upgrade to NS 7 and plugin 11. Sometimes it's fine, sometimes it's crashing.
It seems the problem is in this line: https://github.com/nstudio/nativescript-plugin-firebase/blob/b21fa1e284c7094d5592d61f03571abd264c718b/src/firebase.ios.ts#L1179 |
I'm going to release one last {N} 6 compatible version (10.6.0) because of the Crashlytics deprecation deadline coming up. Afterwards I'll probably merge this PR in this repo. Still, this repo may get transferred to some other org one day, but I don't think anyone would love to maintain a pre-{N}7 version indefinitely. |
Thanks @EddyVerbruggen - I’ll update this branch with latest master including the crashlytics updates later today and publish a new patch on 11.x 👍 |
@NathanWalker That's awesome! I just published the changes so you can go ahead. Let me know when you're done, then I'll happily merge this PR. |
@EddyVerbruggen @nativescript/[email protected] is published now which includes latest master (the crashlytics updates). It also updates codebase to use TypeScript 4.x 👍 |
@romandragan Have not seen this but it's possible the delegate may get Garbage collected early due to fact it's locally scoped inside function:
and not attached as a reference to an outside class/object. We can fix this even after a merge @EddyVerbruggen as this issue exists on master as well - safer to attach any delegate to a class or object rather than have a function scoped |
@NathanWalker, @EddyVerbruggen, I'm on the latest |
@romandragan We published 11.1.1-rc.0, see here: |
@NathanWalker, sure thing, will do. Thanks! |