-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update libs #2092
Update libs #2092
Conversation
Mostly some fixes and performance improvements from what we use.
It seems that now protoparse will emit warnings for unused imports after we add WarningReporter, but it does it for all VUs which needs to be fixed before it's implemented.
Fixes support for double quotes in the query
Codecov Report
@@ Coverage Diff @@
## master #2092 +/- ##
=======================================
Coverage 72.11% 72.11%
=======================================
Files 180 180
Lines 14249 14249
=======================================
Hits 10275 10275
Misses 3348 3348
Partials 626 626
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did update them to the versions that are in the current 1.16 vendored branch. There are changes that are for go 1.17 that I haven't update to. |
an by a "did update" I mean I did run the commands to do and as nothing happened I checked and there are no changes in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I guess github.com/golang/[email protected]
depend on the master
versions then? 😕
it depends on x/tools which does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple of questions:
- Why these specific libs, or are these all that are outdated?
- Did you use
modtools
for this?
|
This adds NO_COLOR support that we are not using
This has a fix for solaris
Fixes for Inf/NaN numbers
Deprecates v1.0.1 which we already don't use
Improvements to zstd and others that we don't use
if noColorExists() { | ||
c.noColor = boolPtr(true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, the fact that they touch os
and the fact that they don't really give you a choice whether you want to respect NO_COLOR
or not is more than a bit shitty... I get that it makes the library API slightly easier to use, and it "just works" for the majority of users, but it makes testing things that use this library (like k6) such a PITA... 😭
At this point, I'd happily remove it and replace it with something else, since we moved the end-of-test summary to JS, we use it very sparingly:
rg -g '!vendor' -g '!go.mod' -g '!go.sum' 'fatih/color|color\.'
ui/form.go
27: "github.com/fatih/color"
50: if _, err := fmt.Fprintln(w, color.BlueString(f.Banner)+"\n"); err != nil {
60: displayLabel += " " + color.New(color.Faint, color.FgCyan).Sprint("["+extra+"]")
66: color.Set(color.FgCyan)
73: color.Unset()
80: if _, printErr := fmt.Fprintln(w, color.RedString("- "+err.Error())); printErr != nil {
ui/pb/progressbar.go
28: "github.com/fatih/color"
34: colorFaint = color.New(color.Faint)
35: statusColors = map[Status]*color.Color{
36: Interrupted: color.New(color.FgRed),
37: Done: color.New(color.FgGreen),
cmd/cloud.go
37: "github.com/fatih/color"
333: valueColor := getColor(noColor || !stdoutTTY, color.FgCyan)
cmd/ui.go
35: "github.com/fatih/color"
89:func getColor(noColor bool, attributes ...color.Attribute) *color.Color {
91: c := color.New()
96: c := color.New(attributes...)
102: c := getColor(noColor, color.FgCyan)
140: valueColor := getColor(noColor, color.FgCyan)
cmd/login_cloud.go
29: "github.com/fatih/color"
145: valueColor := getColor(noColor || !stdoutTTY, color.FgCyan)
Not now, but the next time we do something with colors in k6...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did test and it definitely doesn't work ... hence #2091 was made ;) So this update has no consequences for us ... it appears. I am pretty sure it's because of https://github.com/k6io/k6/blob/04c8b1fcf9a7e8628c1200603d433b404df241ba/cmd/ui.go#L86-L99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see my workaround continues to work around the issue 🎉 😅 True, we won't support NO_COLOR
until we explicitly add support for it, but I'd still prefer that approach 🤷♂️
No description provided.