[Possible Live Dev Bug? `0.60.2`]: Saving one func...
# sst
d
[Possible Live Dev Bug? `0.60.2`*]:* Saving one function deploys a completely different one.
@thdxr any idea if this is/was an issue?
t
is that function used in your stacks?
the second one
d
both are
t
So the reason this happens is there's some kind of dependency link between the two functions
d
and keep in mind we’re no longer using “lambda code” (which both these are) in “cdk code”
t
when we detect a change we traverse the import tree for each function and see which funcs need to be rebuilt
d
both function depend on the same file but I’m not editting that file
t
if you run
Copy code
esbuild --bundle  --platform=node ./lambda/graphql/graphql.ts --outfile=output.js --analyze=verbose
You'll get a print out of the dep tree
d
also… no matter what traversing is being done… THE function I’m editting SHOULD deploy, no?
t
it should rebuild if it was already invoked once
d
“if it was already invoked once”
?
t
When doing "sst start" it doesn't build any of your functions. Once a request comes in it'll build the function and then keep it monitored for rebuilds
d
so I need to invoke that other function once in order for liveediting to work?
t
Yeah it lazy loads them so there's not a big slowdown on sst start for people who have a large number of functions
d
ah! then that is likely it
then its still just odd that editing one function causing an unrelated one to deploy even though they only share one file that both dep on that I’m not editting
t
There might be something non-obvious going on, that analyze command should help you see if grpahql.ts is depending on the other function
d
not sure how there could be a dep… they are both high lvl functions?
unless it simply because they are in adjacent folders?
f
Just following up on this, @Dan Van Brunt r u still seeing this weird behavior?
Did this command offer any insight?
Copy code
esbuild --bundle  --platform=node ./lambda/graphql/graphql.ts --outfile=output.js --analyze=verbose