-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
build: make 'go get github.com/cockroachdb/cockroach' fail #25325
Conversation
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.
This may warrant a PSA on the mailing list, because I think if you've set the "scope" for go-guru in your editor to github.com/cockroachdb/cockroach
you'll need to update it to point to the new root. (although I'm apparently wrong about how this works, because I don't have go-guru-scope
set in my editor currently. I thought it was required)
The root package, github.com/cockroachdb/cockroach, previously served as the main entry point for the default CCL binary. This meant that naively running $ go get github.com/cockroachdb/cockroach would fail with cryptic errors about missing "reserved keywords", as our build requires generating some Go code via Make. Our documentation suggests that users instead run $ go get -d github.com/cockroachdb/cockroach $ make but many users, somewhat understandably, fail to read that documentation. Move the main entry point to ./pkg/cmd/cockroach. Running 'go get github.com/cockroachdb/cockroach' will now produce a less confusing error that reads: can't load package: package github.com/cockroachdb/cockroach: no Go files in GOPATH/src/github.com/cockroachdb/cockroach Hopefully this spurs users to read the build instructions. (Running 'go get github.com/cockroachdb/cockroach/pkg/cmd/cockroach' still produces the same cryptic error messages as before, but users are far less likely to construct that 'go get' invocation.) Fix cockroachdb#23583. Release note: None
@knz I've been holding off on merging this because I'll be on vacation for the next two weeks and won't have time to address the fallout. If you're willing to take responsibility, though, please feel free to notify the mailing list and merge! |
bors r=bdarnell |
25325: build: make 'go get github.com/cockroachdb/cockroach' fail r=bdarnell a=benesch The root package, github.com/cockroachdb/cockroach, previously served as the main entry point for the default CCL binary. This meant that naively running $ go get github.com/cockroachdb/cockroach would fail with cryptic errors about missing "reserved keywords", as our build requires generating some Go code via Make. Our documentation suggests that users instead run $ go get -d github.com/cockroachdb/cockroach $ make but many users, somewhat understandably, fail to read that documentation. Move the main entry point to ./pkg/cmd/cockroach. Running 'go get github.com/cockroachdb/cockroach' will now produce a less confusing error that reads: can't load package: package github.com/cockroachdb/cockroach: no Go files in GOPATH/src/github.com/cockroachdb/cockroach Hopefully this spurs users to read the build instructions. (Running 'go get github.com/cockroachdb/cockroach/pkg/cmd/cockroach' still produces the same cryptic error messages as before, but users are far less likely to construct that 'go get' invocation.) Fix #23583. Fix #23992. Release note: None Co-authored-by: Nikhil Benesch <[email protected]>
Build succeeded |
So, to get the fallout started: The docs still say
but the first step fails (just broke an automated build I'm working on). What should one do now? As an additional note, as |
Since cockroachdb#25325 landed, 'go get' no longer works. Adjust our contributing guidelines appropriately. Release note: None
26239: CONTRIBUTING.md: avoid recommendation to use 'go get' r=couchand a=benesch Since #25325 landed, 'go get' no longer works. Adjust our contributing guidelines appropriately. Release note: None /cc @rendaw (thanks for the report!) 26290: sql, opt: Add pg error codes, tests for error messages r=rytaft a=rytaft This commit ensures that all errors in the optbuilder have a pg errorcode. In order to keep the optimizer in sync with the heuristic planner, this commit also updates some of the heuristic planner error messages to match the Postgres error messages and include pgcodes. Other errors in the optbuilder which should never be thrown (e.g., in the default case of a switch statement that covers all cases) have been converted into panics. Release note (sql change): Fixed some error messages to more closely match the Postgres error messages, including the corresponding Postgres error codes. 26296: importccl: re-enable TestImportCSVStmt r=mjibson a=mjibson The underlying bug appears to have been fixed in #26259. Release note: None 26298: Makefile: fix check-libroach with linux release toolchain r=mberhault a=benesch The Linux release toolchain uses an ancient version of glibc that requires linking against -lrt. Teach CMake to link test binaries accordingly on Linux. The Linux release toolchain also uses a very recent version of libstdc++ that must be statically linked. Plumb the link flags down into CMake via the LDFLAGS variable. (Previously they were only passed down to links invoked by Go via the -extldflags flag in the LINKFLAGS variable.) Release note: None Co-authored-by: Nikhil Benesch <[email protected]> Co-authored-by: Rebecca Taft <[email protected]> Co-authored-by: Matt Jibson <[email protected]>
The root package, github.com/cockroachdb/cockroach, previously served as
the main entry point for the default CCL binary. This meant that naively
running
would fail with cryptic errors about missing "reserved keywords", as our
build requires generating some Go code via Make. Our documentation
suggests that users instead run
but many users, somewhat understandably, fail to read that
documentation.
Move the main entry point to ./pkg/cmd/cockroach. Running 'go get
github.com/cockroachdb/cockroach' will now produce a less confusing
error that reads:
Hopefully this spurs users to read the build instructions.
(Running 'go get github.com/cockroachdb/cockroach/pkg/cmd/cockroach'
still produces the same cryptic error messages as before, but users are
far less likely to construct that 'go get' invocation.)
Fix #23583.
Fix #23992.
Release note: None