mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
hack: generate vtproto files for buildx
Integrates vtproto into buildx. The generated files dockerfile has been modified to copy the buildkit equivalent file to ensure files are laid out in the appropriate way for imports. An import has also been included to change the grpc codec to the version in buildkit that supports vtproto. This will allow buildx to utilize the speed and memory improvements from that. Also updates the gc control options for prune. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
14
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/errors.go
generated
vendored
14
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/errors.go
generated
vendored
@ -34,12 +34,24 @@ func withLocation(err error, start, end int) error {
|
||||
|
||||
// WithLocation extends an error with a source code location
|
||||
func WithLocation(err error, location []Range) error {
|
||||
return setLocation(err, location, true)
|
||||
}
|
||||
|
||||
func SetLocation(err error, location []Range) error {
|
||||
return setLocation(err, location, false)
|
||||
}
|
||||
|
||||
func setLocation(err error, location []Range, add bool) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
var el *ErrorLocation
|
||||
if errors.As(err, &el) {
|
||||
el.Locations = append(el.Locations, location)
|
||||
if add {
|
||||
el.Locations = append(el.Locations, location)
|
||||
} else {
|
||||
el.Locations = [][]Range{location}
|
||||
}
|
||||
return err
|
||||
}
|
||||
return stack.Enable(&ErrorLocation{
|
||||
|
Reference in New Issue
Block a user