code: func (c *Client) Solve(ctx context.Context, def *llb.Definition, opt SolveOpt, statusChan chan *SolveStatus) (*SolveResponse, error) {
  	defer func() {
  		if statusChan != nil {
  			close(statusChan)
  		}
  	}()
  
  	if opt.Frontend == "" && def == nil {
  		return nil, errors.New("invalid empty definition")
  	}
  	if opt.Frontend != "" && def != nil {
  		return nil, errors.Errorf("invalid definition for frontend %s", opt.Frontend)
  	}
  
  	return c.solve(ctx, def, nil, opt, statusChan)
  }
docs: // Solve calls Solve on the controller.
  // def must be nil if (and only if) opt.Frontend is set.