-
Notifications
You must be signed in to change notification settings - Fork 27
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
Firebase 9 support #205
Comments
Hey, thanks for the report. Could make a beta release on version 7. Firebase 9 is pretty different from version 8 right? |
the import are differents to make the tree shaking aviable You can take a look here : https://firebase.google.com/docs/web/modular-upgrade For exemple :
v9
|
@avelow |
Hi, Firebase 9 has been released and @angular/fire too. Do you know when you think akita-ng-fire with the new version may be aviable ? Thanks a lot ! |
We'll take a look at it in the coming weeks. But it's not in high priority for me right now. |
I just take a look and I think and I don't use enough of akita-ng-fire to be able to update it. It's a really big update and I will just wait. |
Too bad this isn't working actually. Just wanted to dive into firebase with akita and now I have to downgrade manually :-( |
FWIW I'm happy to jump in and see if I can do this over the next couple of weeks. Just want to make sure I'm not replicating work someone else has started. If there is a fork out there that has the work started let me know. Otherwise, I will this week. |
I did nothing, I wasn't confident on the big changes needed to be done. I am really happy to read that someone will do it ! |
@randallmeeker thanks for offering to help on this. You can fork branch v6. You can open a draft PR to open a discussion on the implementation, and I can provide add comments on the code along the way if you need help. |
Thanks, I'm going to get started on this today (a lil late). Does the test suite work out of the box? |
Thanks for the update I saw that the update was done using the "compat" library On https://firebase.google.com/docs/web/modular-upgrade, Firebase Team say : Modular - a new API surface designed to facilitate tree-shaking (removal of unused code) to make your web app as small and fast as possible. Keep in mind: the compat libraries are a temporary solution that will be removed completely in a future major SDK version (such as version 10 or version 11). Your ultimate goal is to remove compat code and keep only version 9 modular-style code in your app. How could we move from angular/fire/compat to the new angular/fire ? |
@randallmeeker I couldn't publish with Ivy, I've got this error message :
I removed your changed, so I could publish. You can install it with @avelow moving to angular/fire will change most of the code. And it'll introduce breaking changes from existing version. As I wrote in the readme, I'm not actively maintaining this lib anymore, but I'm ok to review PRs from the community. |
@GrandSchtroumpf since you are releasing a new major version, breaking changes are expected. I would vote for doing proper upgrade instead of this "compat mode" approach. Also, full or partial "Ivy" compilation in libraries should not be enabled since it will break backwards compatibility with older Angular versions. |
If this is not gone be maintained, a compat release now is better than waiting for a might never happen release, then we can upgrade firebase and angular/fire and migrate away from this if it is not going forward. |
I'll try to do a proper upgrade to Firebase v9 sometime next week if nobody else is taking the task. |
@hakimio I did the compat upgrade now because the full update for Firebase V9 is not feature complete with angular/fire. I assumed it was best to wait for angular/fire to finish full support before we attempted here. This allows everyone to update to Firebase v9 in the short term. |
@randallmeeker what features are missing? |
I don't know for sure, I'm just reading from the upgrade guide here |
@GrandSchtroumpf I get the IVY issue. The difference between building the app and publishing the app. Make sense. |
@randallmeeker Maybe it's support for some obscure features like |
@hakimio It looks like analytics features and a few other things are missing. I don't think anyone is saying to not continue with "proper" integration, and I have already done some of work for full v9, but that this is the best first step and unavoidable for people who want to upgrade to V9 sooner rather than later (like myself). You speak as if we are saying that this is where we stop all development when I'm not saying that at all. I think as soon as AngularFire 7.1 (here soon) is out we can see a more stable feature complete version, fixed documentation and a bunch of bugs ironed out. I don't think its a huge lift overall as I have already made what I think is about 80% of the necessary changes. I think the bigger / harder work is probably just going through and updating the documentation. Like I said I have started some work on this, but can't touch it for another week or so. I'll share a branch of my changes over the weekend and we can collab on it if you want (or feel free to submit yourself, I take no offense if you don't want to wait). |
Giving the "compat" version could be a great minor version for akita-ng-fire without breaking change and the "propre" integration could be the next major release. I would like to help but i don't really know how to. |
@randallmeeker Ok, sure. Let me know once you have pushed your changes to Github and I'll try to help with the migration. @avelow I agree. The |
@hakimio @avelow due to the dependency requirements, compat was still a breaking change and requires v7. That was unavoidable. |
@randallmeeker did you have time to share your changes? |
@hakimio Here is my branch. So far I got through the collection service. But now think this is going to need a ton more work than I thought, and I honestly don't think angularfire is there yet. https://github.com/randallmeeker/akita-ng-fire/tree/non-compat I'll keep at it, but not in a meaningful way till I see more updates on the angularfire side probably. |
@randallmeeker thanks for sharing your changes. |
Update on my progress
TODO:
@fritzschoff any tips how to run real-time db tests? |
rock! sorry for not replying sooner. My main issue is the lack of documentation, but this is good news. |
Just created a new PR (#223) to migrate to Firebase v9 modular SDK 🎉 |
@hakimio - somewhat off topic, but asking anyway since you have spent this much time with the codebase lately, Mr Basal have released a new state management framework now called Elf - have you (or anyone else here) put any thought into creating an elf-fire project based on the knowledge from this project? |
@kjetilhp yeah, I saw the new project, but, at least for now, I don't have any plans to migrate or look into creating |
To be honest, I've stopped using the "akita" part of this lib since a while. It brought more complexity that it solved. At some point I think I'll publish a |
@kjetilhp @Disane87 @randallmeeker @avelow I have also updated documentation, README and the example app for v7. It now requires EDIT: BREAKING_CHANGES |
Great I will check it out this weekend |
|
FWIW, been using this on a new project for a few weeks now and it appears fine so far props to @hakimio |
Hello, I've just release version 7.0.0 as latest after PR from @hakimio. To all of you I'm sorry it took that long for this release process. As written in the readme, I'm not actively maintaining this project anymore. As previously mentionned, I personally don't work with akita anymore, and after working a lot with akita-ng-fire, I found out that managing global stores with firestore was introducing more issues that it was solving. I still think that extending services with a Thank you all for the time and patience, and especially thanks to @hakimio & @randallmeeker for the amazing job and feedback 🎉. I feel very humbled by your contribution 😊. |
good news. I also thank @hakimio for doing the heavy lifting. and @GrandSchtroumpf this library has been great for almost all my firebase projects. I will say they are not particularly large wonder if you could give an example of where you started to hit a wall. I know I have some collections where I use the ngFirebase lib directly and don't bother creating a store I will admit that the stand-alone service is a good idea, my only suggestion that I have been wanting to implement is a firebase interceptor so that I can catch permission errors or connection issues and give context to the collections and the action being performed. When I have added rules after a large build, it has taken some creative logging to find where synced collection was breaking. |
Hello, Thank you for your hard work on this migration ! I'm running a quite small app with this library so I thought I was going to benefit a lot from this migration to the modular library (I only use auth + firestore + fileStorage). I was actually quite surprised to see that my prod bundle is actually slightly bigger after upgrade (I removed all imports of compat library). Before upgrade :
Lazy Chunk Files | Names | Raw Size | Estimated Transfer Size Build at: 2022-02-13T12:04:44.210Z - Hash: 470a775eece6ad0b - Time: 44045ms Warning: bundle initial exceeded maximum budget. Budget 500.00 kB was not met by 525.15 kB with a total of 1.00 MB. After upgrade :
Lazy Chunk Files | Names | Raw Size | Estimated Transfer Size Build at: 2022-02-13T13:12:25.176Z - Hash: 80541329b022570f - Time: 24276ms Warning: bundle initial exceeded maximum budget. Budget 500.00 kB was not met by 545.63 kB with a total of 1.02 MB. Does it make sense for you ? Is somehow tree shaking not working yet with the modular library and not in every cases ? |
@oliveti the issue is that while Firebase v9 is tree-shakable, EDIT: if you want a truly tree-shakable solution, you might want to try using vanilla |
Firebase 9 is currently and beta and support tree shaking
Angularfire 7 (in beta) support Firebase 9
it'd be lovely to be able to us akita-ng-fire and Firebase with tree shaking (even in beta, and most of the job would be done for the official release)
Thanks
The text was updated successfully, but these errors were encountered: