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
cleanup vendoring of test deps #16294
Conversation
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
6b5a684
to
8ef7aaf
Compare
pkgs=( $(go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}" | grep -E "^${PROJECT}" | grep -vE "^${PROJECT}/vendor" | sort -u) ) | ||
pkgs+=( ${packages[@]} ) | ||
testImports=( $(go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${pkgs[@]}" | sort -u) ) | ||
printf '%s\n' "${testImports[@]}" |
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.
is this print here on purpose?
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.
yes so that those thinngs are in the array
On Tue, Sep 15, 2015 at 4:22 PM, David Calavera notifications@github.com
wrote:
In hack/.vendor-helpers.sh
#16294 (comment):local imports=( $( for platform in "${dockerPlatforms[@]}"; do export GOOS="${platform%/*}"; export GOARCH="${platform##*/}"; for buildTags in "${buildTagCombos[@]}"; do
go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}"
go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${packages[@]}"
pkgs=( $(go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}" | grep -E "^${PROJECT}" | grep -vE "^${PROJECT}/vendor" | sort -u) )
pkgs+=( ${packages[@]} )
testImports=( $(go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${pkgs[@]}" | sort -u) )
printf '%s\n' "${testImports[@]}"
is this print here on purpose?
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/16294/files#r39578200.
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.
👌
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.
Won't this only print the first item of the array as-is? Doesn't it need to be [*]
to print all of them with just %s
?
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.
hmmm it worked for me locally :/
On Wed, Sep 16, 2015 at 3:48 PM, Tianon Gravi notifications@github.com
wrote:
In hack/.vendor-helpers.sh
#16294 (comment):local imports=( $( for platform in "${dockerPlatforms[@]}"; do export GOOS="${platform%/*}"; export GOARCH="${platform##*/}"; for buildTags in "${buildTagCombos[@]}"; do
go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}"
go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${packages[@]}"
pkgs=( $(go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}" | grep -E "^${PROJECT}" | grep -vE "^${PROJECT}/vendor" | sort -u) )
pkgs+=( ${packages[@]} )
testImports=( $(go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${pkgs[@]}" | sort -u) )
printf '%s\n' "${testImports[@]}"
Won't this only print the first item of the array as-is? Doesn't it need
to be [*] to print all of them with just %s?—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/16294/files#r39694927.
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.
Oh interesting, printf
appears to just "handle" this for us:
$ printf '%s\n' a b c
a
b
c
👍
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.
You had me worried!
On Wednesday, September 16, 2015, Tianon Gravi notifications@github.com
wrote:
In hack/.vendor-helpers.sh
#16294 (comment):local imports=( $( for platform in "${dockerPlatforms[@]}"; do export GOOS="${platform%/*}"; export GOARCH="${platform##*/}"; for buildTags in "${buildTagCombos[@]}"; do
go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}"
go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${packages[@]}"
pkgs=( $(go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}" | grep -E "^${PROJECT}" | grep -vE "^${PROJECT}/vendor" | sort -u) )
pkgs+=( ${packages[@]} )
testImports=( $(go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${pkgs[@]}" | sort -u) )
printf '%s\n' "${testImports[@]}"
Oh interesting, printf appears to just "handle" this for us:
$ printf '%s\n' a b cabc
[image: 👍]
—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/16294/files#r39696176.
LGTM |
1 similar comment
LGTM |
cleanup vendoring of test deps
fixes the problems for #16229
ping @tianon @icecrime