Skip to content
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

x/pkgsite: start localserver Pkg.go.dev fail #54692

Closed
y4ney opened this issue Aug 26, 2022 · 3 comments
Closed

x/pkgsite: start localserver Pkg.go.dev fail #54692

y4ney opened this issue Aug 26, 2022 · 3 comments

Comments

@y4ney
Copy link

y4ney commented Aug 26, 2022

What is the URL of the page with the issue?

http://localhost:6061/project_name

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Screenshot

image

What did you do?

  • Start the local server of pkg.go.dev fail
pkgsite -http=:6061 
listing mods (consider passing -list=false): running go with ["list" "-json" "-m" "all"]: exit status 1: 
  • pass listing mods and visit web page
pkgsite -http=:6061 -list=false
2022/08/26 17:52:49 Info: Listening on addr http://:6061
2022/08/26 17:53:12 Info: FetchDataSource: fetching std@latest
2022/08/26 17:53:32 Info: FetchDataSource: fetched std@latest in 19.992450708s with error <nil>
2022/08/26 17:53:32 Info: returning 424 (Failed Dependency) for error serveUnitPage(ctx, w, r, ds, &{cnsp-cli std latest}): servePathNotFoundPage(w, r, "cnsp-cli", "latest"): 424 (Failed Dependency): <nil> (epage=&{{   <nil> false   false false   }  {<h3 class="Error-message">This page is not supported by this datasource.</h3>} <nil>})
2022/08/26 17:53:32 Info: returning 424 (Failed Dependency) for error serveUnitPage(ctx, w, r, ds, &{cnsp-cli std latest}): servePathNotFoundPage(w, r, "cnsp-cli", "latest"): 424 (Failed Dependency): <nil> (epage=&{{   <nil> false   false false   }  {<h3 class="Error-message">This page is not supported by this datasource.</h3>} <nil>})
 go list -m -json all
go: can't compute 'all' using the vendor directory
        (Use -mod=mod or -mod=readonly to bypass.)
go list -mod=mod                                       
project_name

enviroment

I use gvm to manage the go version. Is it because of this?

go version      
go version go1.19rc1 darwin/arm64
go env    
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/yaney/Library/Caches/go-build"
GOENV="/Users/yaney/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/yaney/.gvm/pkgsets/go1.19rc1/global/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/yaney/.gvm/pkgsets/go1.19rc1/global"
GOPRIVATE=""
GOPROXY="https://goproxy.cn"
GOROOT="/Users/yaney/.gvm/gos/go1.19rc1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/yaney/.gvm/gos/go1.19rc1/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19rc1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/yaney/go/src/cnsp-cli/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t0/5dc5xbgs6qg__wghsr84hrym0000gn/T/go-build1146121684=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you expect to see?

Start the local server of pkg.go.dev successfully

What did you see instead?

No relevant information found

@y4ney y4ney added the pkgsite label Aug 26, 2022
@gopherbot gopherbot added this to the Unreleased milestone Aug 26, 2022
@thediveo
Copy link

pkgsite is a separate package, (not fully) independent of your go version. Did you try an go install golang.org/x/pkgsite/cmd/pkgsite@master to be on the safe side?

I also noted from my own pkgsite experiments, that there seem to be problems with package paths that do not contain one of the repository systems in that pkgsite confuses a simple project module name with a std package and as that doesn't exist, it refuses to load. If you name your package github.com/foobar/package then it starts to work.

@thediveo
Copy link

Are you aware of issue #40371?

@seankhliao
Copy link
Member

Duplicate of #51368

@seankhliao seankhliao marked this as a duplicate of #51368 Aug 26, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
@golang golang locked and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants