I am updating a local module that is used as dependency in another local module.
I cannot make dagger SDK aware of the new function signature (which added a param).
Pretty much this issue: https://github.com/dagger/dagger/issues/9304
1 messages · Page 1 of 1 (latest)
I am updating a local module that is used as dependency in another local module.
I cannot make dagger SDK aware of the new function signature (which added a param).
Pretty much this issue: https://github.com/dagger/dagger/issues/9304
@plush falcon any chance you can share a minimal repro?
I try
@short reef wait a second, maybe I spotted the problem...
The function was changed from func Clone()
into func Clone(commitSha string)
I was expecting the imported function to be changed to "string" arg, indeed it becomes
type GitclonerCloneOpts struct {
CommitSha string
}
func (r *Gitcloner) Clone(opts ...GitclonerCloneOpts) *Directory {
...
}
So in module importing the function is not using a string but a custom struct, to reflect the optional arguments too
Nice, I hope this can be a reference for other newbies
awesome! that's because you made commitSha optional, correct?
yes exactly
yep, that makes sense
if you make it required, then it becomes its own unique argument
I see. But it is not only more elegant, even more readable. As long as you get that