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

Avoid involving a toolchain for the other build platform #72

Merged
merged 1 commit into from
Aug 23, 2016

Conversation

yugui
Copy link
Contributor

@yugui yugui commented Aug 20, 2016

Resolve a go toolchain for the build platform earlier because it does not make sense to download toolchains for other build platforms.

  • this makes it easier to support even more platform
  • this makes it easier to support locally installed toolchain, c.f. Download all the go packages each time #46
  • this prevents "bazel query" from forcing users to download a toolchain for the other platform

_toolchain_map = {
'linux': struct(
url = "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz",
sha256 = ("702ad90f705365227e902b42d91dd1a4" +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the whole sha256 on line line? I don't think there is a strict 80 char line limit on .bzl files and the ability to grep by the sha256 without having to remember that it is just the first 32 characters is something I personally enjoy having.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@achew22
Copy link
Member

achew22 commented Aug 20, 2016

Nice patch, LGTM

@yugui yugui changed the title Avoid involving a toolchain for the other build platform [WIP] Avoid involving a toolchain for the other build platform Aug 20, 2016
Resolve a go toolchain for the build platform earlier because
it does not make sense to download toolchains for other build platforms.

* this makes it easier to support even more platform
* this makes it easier to support locally installed toolchain, c.f. #46
* this prevents "bazel query" from forcing users to download a toolchain
  for the other platform
@yugui yugui force-pushed the feature/single-gotool branch from 68237ee to 6fbe082 Compare August 22, 2016 04:33
@yugui yugui changed the title [WIP] Avoid involving a toolchain for the other build platform Avoid involving a toolchain for the other build platform Aug 22, 2016
url = "https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz",
sha256 = "702ad90f705365227e902b42d91dd1a40e48ca7f67a2f4b2fd052aaa4295cd95",
),
'mac os x': struct(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bazel-standard name is "darwin", so maybe just use that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must be consistent to ctx.os.name and it is actually "mac os x".

@pmbethe09
Copy link
Contributor

LGTM

@pmbethe09
Copy link
Contributor

Jenkins, test this please.

@yugui yugui merged commit 4c2efe6 into master Aug 23, 2016
@yugui yugui deleted the feature/single-gotool branch August 23, 2016 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants