(ctx context.Context)
| 170 | } |
| 171 | |
| 172 | func (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 | |
| 191 | func (node *ModTreeNode) tryRunGeneratorAsCheckScaleOut(ctx context.Context) (_ bool, rerr error) { |
| 192 | q, err := CurrentQuery(ctx) |
no test coverage detected