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

cmd/compile: cut dependency on go/build #31563

Closed
josharian opened this issue Apr 19, 2019 · 3 comments
Closed

cmd/compile: cut dependency on go/build #31563

josharian opened this issue Apr 19, 2019 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

// cmd/compile/internal/gc/main.go
func currentLang() string {
	tags := build.Default.ReleaseTags
	return tags[len(tags)-1]
}

This function causes cmd/compile to depend on go/build, which accounts for 1.6mb (6.5%) of the cmd/compile binary.

It'd be nice to cut this dependency. Perhaps an internal package containing the release tags? Or duplicating the release tag info in two places?

Easy to fix once we decide what path to take forward.

cc @ianlancetaylor @bradfitz

@agnivade agnivade added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Apr 19, 2019
@bradfitz
Copy link
Contributor

Seems good to me. I sent CL 172997 if others don't object.

@gopherbot
Copy link

Change https://golang.org/cl/172997 mentions this issue: internal/goversion: add new internal package to store a single constant

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Sep 3, 2019
@dmitshur dmitshur added this to the Go1.13 milestone Sep 3, 2019
@gopherbot
Copy link

Change https://golang.org/cl/193077 mentions this issue: cmd/compile/internal/gc: use GoToolPath in TestDeps

gopherbot pushed a commit that referenced this issue Sep 3, 2019
Updates #31563
Fixes #34041

Change-Id: Ib9fdcd2f83d867fd31b42eab3a813f5cef88860e
Reviewed-on: https://go-review.googlesource.com/c/go/+/193077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
t4n6a1ka pushed a commit to t4n6a1ka/go that referenced this issue Sep 5, 2019
Updates golang#31563
Fixes golang#34041

Change-Id: Ib9fdcd2f83d867fd31b42eab3a813f5cef88860e
Reviewed-on: https://go-review.googlesource.com/c/go/+/193077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@golang golang locked and limited conversation to collaborators Sep 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants