FAQ
LGTM



https://codereview.appspot.com/6741050/diff/5003/src/cmd/go/test.bash
File src/cmd/go/test.bash (right):

https://codereview.appspot.com/6741050/diff/5003/src/cmd/go/test.bash#newcode148
src/cmd/go/test.bash:148: echo "go list std doesn't show in consistent
order"
"go list std ordering is inconsistent"

?

https://codereview.appspot.com/6741050/

Search Discussions

  • Minux Ma at Oct 19, 2012 at 3:50 pm
    Reviewers: golang-dev_googlegroups.com,

    Message:
    Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),

    I'd like you to review this change to
    https://code.google.com/p/go/


    Description:
    cmd/go: make package list order predicable
    also add a cleanup phase to cmd/go/test.bash.

    Please review this at http://codereview.appspot.com/6741050/

    Affected files:
    M src/cmd/go/pkg.go
    M src/cmd/go/test.bash


    Index: src/cmd/go/pkg.go
    ===================================================================
    --- a/src/cmd/go/pkg.go
    +++ b/src/cmd/go/pkg.go
    @@ -674,12 +674,11 @@
    var set = make(map[string]bool)

    for _, arg := range args {
    - set[arg] = true
    + if !set[arg] {
    + pkgs = append(pkgs, loadPackage(arg, &stk))
    + set[arg] = true
    + }
    }
    - for arg := range set {
    - pkgs = append(pkgs, loadPackage(arg, &stk))
    - }
    -
    computeStale(pkgs...)

    return pkgs
    Index: src/cmd/go/test.bash
    ===================================================================
    --- a/src/cmd/go/test.bash
    +++ b/src/cmd/go/test.bash
    @@ -142,6 +142,18 @@
    ok=false
    fi

    +# ensure that output of 'go list' is consistent between runs
    +./testgo list std > test_std.list
    +if ! ./testgo list std | cmp -s test_std.list - ; then
    + echo "go list std doesn't show in consistent order"
    + ok=false
    +fi
    +rm -f test_std.list
    +
    +# clean up
    +rm -rf testdata/bin testdata/bin1
    +rm -f testgo
    +
    if $ok; then
    echo PASS
    else
  • Minux Ma at Oct 20, 2012 at 9:32 am
    *** Submitted as
    http://code.google.com/p/go/source/detail?r=6653eb72fd46 ***

    cmd/go: make package list order predicable
    also add a cleanup phase to cmd/go/test.bash.

    R=golang-dev, bradfitz
    CC=golang-dev
    http://codereview.appspot.com/6741050



    http://codereview.appspot.com/6741050/diff/5003/src/cmd/go/test.bash
    File src/cmd/go/test.bash (right):

    http://codereview.appspot.com/6741050/diff/5003/src/cmd/go/test.bash#newcode148
    src/cmd/go/test.bash:148: echo "go list std doesn't show in consistent
    order"
    On 2012/10/19 15:19:30, bradfitz wrote:
    "go list std ordering is inconsistent"
    Oh, yeah, this is much better. thanks.

    http://codereview.appspot.com/6741050/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 19, '12 at 3:26p
activeOct 20, '12 at 9:32a
posts3
users2
websitegolang.org

2 users in discussion

Minux Ma: 2 posts Bradfitz: 1 post

People

Translate

site design / logo © 2022 Grokbase