Skip to content

cmd/go: special case for chiselapp.com interferes with '.fossil' extension #31014

@urandom2

Description

@urandom2

What version of Go are you using (go version)?

$ go version
go version go1.12.1 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build279953534=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I tried to clone a fossil repo from chiselapp using the .fossil to test self-hosted fossil repos. It looks like the chiselapp.com/user/kyle/repository/fossilgg format is handled separately in cmd/go/internal/get/vcs.go.

$ go get chiselapp.com/user/kyle/repository/fossilgg.fossil

What did you expect to see?

The go get succeeds and documentation can be listed via go doc for confirmation:

$ go doc -u -all -src fossilgg
package fossilgg.fossil // import "chiselapp.com/user/kyle/repository/fossilgg.fossil"


CONSTANTS

const greeting = "Hello from fossil!"

FUNCTIONS

func Hello() string {
        return greeting
}

What did you see instead?

The fossil clone fails:

# cd .; fossil clone https://chiselapp.com/user/kyle/repository/fossilgg.fossil /home/user/go/src/chiselapp.com/user/kyle/repository/fossilgg.fossil/.fossil
redirect limit exceeded
server returned an error - clone aborted
package chiselapp.com/user/kyle/repository/fossilgg.fossil: exit status 1

This also leaves behind an empty fossilgg.fossil directory in $GOPATH that has the side effect of preventing future calls to go get:

$ go get chiselapp.com/user/kyle/repository/fossilgg.fossil
can't load package: package chiselapp.com/user/kyle/repository/fossilgg.fossil: no Go files in /home/user/go/src/chiselapp.com/user/kyle/repository/fossilgg.fossil

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeGoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions