Sam Sussman

Results 112 comments of Sam Sussman

https://github.com/functionless/functionless/blob/sussman/sdk/src/integration.ts#L211

Its not in main, I could put out a PR quick. I was using it to lazily init the integrations for the SDK. otherwise we'd need to create 1000s of...

Is it? How do you create the prewarm/init logic in the serializer? What does that look like in the function at runtime?

You can achieve lazy initialization, but not pre-initialization with the inline `getOrInit`. IMO they are different. Code that runs before any lambda invocation and code that runs inline with the...

Hmm, that would not have worked with the pulumi serializer, would the new serialize support something like that?

or are we re-writing the function? ```ts // before handler const call1 = integ1.call(); handler = () => { // at the call location call1(); } ```

> I don't see a reason to have that concept. I was saying your approach only supports that concept.

The `getOrInit` already memoizes if you pass in the `init` function (vs `get`) and call in the call body.

Well you can use a (conditional) for loop, but the conditional clause cannot use arithmetic.

Is this only an issue in tests? I remember fixing this by not emitting to files that didn't need it, but I don't remember it being an issue before outside...