MCPcopy Index your code
hub / github.com/dagger/dagger / runGeneratorAsCheckLocally

Method runGeneratorAsCheckLocally

core/modtree.go:172–189  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

170}
171
172func (node *ModTreeNode) runGeneratorAsCheckLocally(ctx context.Context) error {
173 changes, err := node.runGeneratorLocally(ctx)
174 if err != nil {
175 return err
176 }
177 if changes.Self() == nil {
178 return nil
179 }
180 empty, err := changes.Self().IsEmpty(ctx)
181 if err != nil {
182 return err
183 }
184 if !empty {
185 return fmt.Errorf("generate function %s produced changes; run 'dagger generate %s' to apply",
186 node.PathString(), node.PathString())
187 }
188 return nil
189}
190
191func (node *ModTreeNode) tryRunGeneratorAsCheckScaleOut(ctx context.Context) (_ bool, rerr error) {
192 q, err := CurrentQuery(ctx)

Callers 1

RunGeneratorAsCheckMethod · 0.80

Calls 4

runGeneratorLocallyMethod · 0.95
PathStringMethod · 0.95
SelfMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected