mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to v0.14.0-rc1
Update buildkit dependency to v0.14.0-rc1. Update the tracing infrastructure to use the new detect API which updates how the delegated exporter is configured. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
7
vendor/github.com/moby/buildkit/util/progress/progressui/display.go
generated
vendored
7
vendor/github.com/moby/buildkit/util/progress/progressui/display.go
generated
vendored
@ -285,7 +285,6 @@ type rawJSONDisplay struct {
|
||||
// output of status update events.
|
||||
func newRawJSONDisplay(w io.Writer) Display {
|
||||
enc := json.NewEncoder(w)
|
||||
enc.SetIndent("", " ")
|
||||
return Display{
|
||||
disp: &rawJSONDisplay{
|
||||
enc: enc,
|
||||
@ -744,6 +743,7 @@ func (t *trace) update(s *client.SolveStatus, termWidth int) {
|
||||
v.jobCached = false
|
||||
if v.term != nil {
|
||||
if v.term.Width != termWidth {
|
||||
termHeight = max(termHeightMin, min(termHeightInitial, v.term.Height-termHeightMin-1))
|
||||
v.term.Resize(termHeight, termWidth-termPad)
|
||||
}
|
||||
v.termBytes += len(l.Data)
|
||||
@ -823,7 +823,7 @@ func (t *trace) displayInfo() (d displayInfo) {
|
||||
}
|
||||
var jobs []*job
|
||||
j := &job{
|
||||
name: strings.Replace(v.Name, "\t", " ", -1),
|
||||
name: strings.ReplaceAll(v.Name, "\t", " "),
|
||||
vertex: v,
|
||||
isCompleted: true,
|
||||
}
|
||||
@ -913,7 +913,7 @@ func addTime(tm *time.Time, d time.Duration) *time.Time {
|
||||
if tm == nil {
|
||||
return nil
|
||||
}
|
||||
t := (*tm).Add(d)
|
||||
t := tm.Add(d)
|
||||
return &t
|
||||
}
|
||||
|
||||
@ -957,6 +957,7 @@ func setupTerminals(jobs []*job, height int, all bool) []*job {
|
||||
|
||||
numFree := height - 2 - numInUse
|
||||
numToHide := 0
|
||||
termHeight = max(termHeightMin, min(termHeightInitial, height-termHeightMin-1))
|
||||
termLimit := termHeight + 3
|
||||
|
||||
for i := 0; numFree > termLimit && i < len(candidates); i++ {
|
||||
|
6
vendor/github.com/moby/buildkit/util/progress/progressui/init.go
generated
vendored
6
vendor/github.com/moby/buildkit/util/progress/progressui/init.go
generated
vendored
@ -13,7 +13,10 @@ var colorCancel aec.ANSI
|
||||
var colorWarning aec.ANSI
|
||||
var colorError aec.ANSI
|
||||
|
||||
var termHeight = 6
|
||||
const termHeightMin = 6
|
||||
|
||||
var termHeightInitial = termHeightMin
|
||||
var termHeight = termHeightMin
|
||||
|
||||
func init() {
|
||||
// As recommended on https://no-color.org/
|
||||
@ -43,6 +46,7 @@ func init() {
|
||||
if termHeightStr != "" {
|
||||
termHeightVal, err := strconv.Atoi(termHeightStr)
|
||||
if err == nil && termHeightVal > 0 {
|
||||
termHeightInitial = termHeightVal
|
||||
termHeight = termHeightVal
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user