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

build: unable to inject temporary changes to the Go stdlib #56178

Closed
knz opened this issue Oct 31, 2020 · 1 comment
Closed

build: unable to inject temporary changes to the Go stdlib #56178

knz opened this issue Oct 31, 2020 · 1 comment
Labels
A-build-system C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-dev-inf

Comments

@knz
Copy link
Contributor

knz commented Oct 31, 2020

When troubleshooting issues, I often find myself modifying files in the Go stdlib, for example in the fmt, io or os packages.

I expect these temporary changes to be automatically picked up by the Go compiler when I build my cockroach executable.

Prior to the introduction of bazel this would “just work”. However now bazel is embarking its own copy of the Go tree in the sandbox and refuses to consider my changes.

I would like a (tested) solution to this and a documentation for it in the wiki.

cc @jlinder @otan

Epic CRDB-10447

Jira issue: CRDB-7994

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-build-system labels Oct 31, 2020
irfansharif added a commit to cockroachdb/rules_go that referenced this issue Feb 20, 2022
We rely on the packaged zoneinfo zip in CRDB, found under
lib/time/zoneinfo.zip. When using the remote SDK, we untar the entire
thing into our sandbox. When pointing to a local SDK however, we ignored
everything under lib, so failed to build.

We'll need this diff in order to build CRDB with modified go
installations, or at least iterating on it locally.

+cc cockroachdb/cockroach#56178
irfansharif added a commit to cockroachdb/rules_go that referenced this issue Feb 22, 2022
We rely on the packaged zoneinfo zip in CRDB, found under
lib/time/zoneinfo.zip. When using the remote SDK macro, we untar the
entire archive into the sandbox. When pointing to a local SDK however,
we previously ignored everything under lib. It feels reasonable to also
symlink lib/ into the sandbox given they have valid symbols to build
against.

We needed this patch in order to build CRDB with local go installations.

+cc cockroachdb/cockroach#56178
@irfansharif
Copy link
Contributor

Documented how to do it in #77345.

linzhp pushed a commit to bazel-contrib/rules_go that referenced this issue Mar 15, 2022
We rely on the packaged zoneinfo zip in CRDB, found under
lib/time/zoneinfo.zip. When using the remote SDK macro, we untar the
entire archive into the sandbox. When pointing to a local SDK however,
we previously ignored everything under lib. It feels reasonable to also
symlink lib/ into the sandbox given they have valid symbols to build
against.

We needed this patch in order to build CRDB with local go installations.

+cc cockroachdb/cockroach#56178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-system C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-dev-inf
Projects
None yet
Development

No branches or pull requests

3 participants