You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should document the interface to declarative function signatures on the main README.md. It's not clear how to use the interface or how it interacts with non-declarative functions. There are many edge cases to consider, examples:
What happens if there are multiple functions with the same name?
What are valid function names? Do these align with GCF?
What if both a declarative and non-declarative function has been specified?
Function 'function' is not defined in the provided module.
Did you specify the correct target function to execute?
Could not load the function, shutting down.
From what I can tell, the current implementation doesn't work as expected.
For your example, you would still need to provide the target cli argument:
functions-framework-nodejs --target=function
The fallback to the default function target is only implemented for non-declarative functions. I didn't included it in the declarative API because there is already a TODO questioning it's existence. As it is today, I don't think it is possible to use the default on GCF because you must provide a target name when you deploy your function.
Also function is a keyword in javascript, so it is a really weird thing to name a method (I'm not even sure it is allowed).
We should document the interface to declarative function signatures on the main
README.md
. It's not clear how to use the interface or how it interacts with non-declarative functions. There are many edge cases to consider, examples:Implementation: #347
The text was updated successfully, but these errors were encountered: