Hello!
Since v0.12.0 the CLI finds all functions without required arguments that return a scalar/primitive value, and prints them (https://github.com/dagger/dagger/pull/7479).
I really like the feature which is super useful most of the time. However, some of my modules have leaf functions that I do not want to automatically execute.
There are leaf functions that I do not want to execute every time as it might create artifacts somewhere, take a long time to execute, ...
e.g.
func (m *MyModule) Publish(ctx context.Context) (string, error) { ... }
There are functions that will fail the whole execution as they do not have required arguments defined when they actually need some.
e.g.
func (m *MyModule) Test(ctx context.Context,
// SSH Auth Socket to access internal repositories
// +optional
sshSocket *dagger.Socket,
// GitHub Token to access internal repositories
// +optional
ghToken *dagger.Secret,
) (string, error) {
if sshSocket == nil && ghToken == nil {
return "", errors.New("either SSH or token authentication is required")
}
...
}
Is there a way to exclude functions from being resolved automatically?