Skip to content
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

Null safety support #75

Open
doppio opened this issue Mar 29, 2021 · 8 comments
Open

Null safety support #75

doppio opened this issue Mar 29, 2021 · 8 comments

Comments

@doppio
Copy link

doppio commented Mar 29, 2021

I'm not sure if this library is still being maintained, but would you consider supporting null safety?

@JohannesMilke
Copy link

Thumbs up 👍

@SupposedlySam
Copy link

It doesn't really look like these packages are maintained anymore. However, I went ahead and drafted a PR to support NNBD. I wouldn't mind if you all tested this out for me.

Just add it to your pubspec.yaml as a git dependency:

  firebase_functions_interop: 
    git: [email protected]:SupposedlySam/firebase-functions-interop.git

alternatively you can access it via https rather than ssh

  firebase_functions_interop: 
    git: https://github.com/SupposedlySam/firebase-functions-interop.git

Thanks in advance!

@JohannesMilke
Copy link

@SupposedlySam Do you know why this error occurs while changing to your firebase_functions_interop?

image

@blaueeiner
Copy link

blaueeiner commented May 23, 2021

@JohannesMilke The underlying build_node_compilers package does not support compiling Dart code to Node-compatible JavaScript modules for dependencies in null safety yet. Our team faced the same problem but we are looking forward to a general better solution to run serverless Dart code on GCP.

I recommend trying out Functions Framework since all of the packages related to this one here by @pulyaevskiy do not seem to get maintained anymore.

For more information about using the Dart Functions Framework for serverless Dart running in Cloud Run by for example also using triggers from Firestore and in advance literally every cloud service via EventArc just reach out to me.

@Tameflame
Copy link

@blaueeiner Hey getting Functions Framework to work with Firestore triggers is exactly the kind of thing I'm trying to figure out. Do you have any resources you could point us towards, maybe an example function code or article, or basic tutorial? Would be amazing!

I've taken a look at EventArc's docs, but if there's any dart/flutter specific resource that would be awesome!

Thanks.

@kaciula
Copy link

kaciula commented Jul 7, 2021

@blaueeiner I would also be interested in an example on how to integrate Firestore triggers using the functions framework.

@blaueeiner
Copy link

@Tameflame @kaciula Firestore triggers in Eventarc are not supported yet, since "Firestore does not support audit logs for operations that read, write, and delete documents" yet. They will be available soon. You can read more about it here. The workaround would be to publish a Pub/Sub message from inside of lightweight Javascript/Typescript Firestore Triggered Cloud Functions, which will basically forward the trigger event to your Cloud Run service. The Cloud Run service should be configured to subscribe on the specific Pub/Sub topic.

@Rexios80
Copy link

I just released firebase_js_interop which follows all modern Dart standards such as null safety

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 a pull request may close this issue.

7 participants