Add latest version of bazel#13813
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@adamjstewart I don't really know how module.bazel = Executable('bazel')in bazel('build', make_jobs)? If there are no issues that would be the most straightforward solution. |
b73a04a to
2343a4f
Compare
| version('0.4.4', sha256='d52a21dda271ae645711ce99c70cf44c5d3a809138e656bbff00998827548ebb') | ||
|
|
||
| depends_on('java@8:', type=('build', 'link', 'run')) | ||
| depends_on('zip') |
There was a problem hiding this comment.
It's unclear if zip/unzip are needed for linking or just to unzip the download tarball...
|
Okay, I added a ton of new versions and made sure are patches correctly apply to every version. This does not mean we are patching all the files that we need to though. Last step is to actually test a few bazel installations. |
|
|
||
| # https://docs.bazel.build/versions/master/install-compile-source.html#bootstrap-bazel | ||
| depends_on('java@8', type=('build', 'link', 'run')) | ||
| depends_on('python', type=('build', 'link', 'run')) |
There was a problem hiding this comment.
Docs for 0.17-1.2 say both Python 2 and 3 work, no docs prior to 0.17... (can we not support ancient versions of bazel and TF?)
There was a problem hiding this comment.
That is totally fine for me!
| patch('fix_env_handling-0.9.0.patch', when='@0.9.0:0.12.0') | ||
| patch('fix_env_handling-0.13.0.patch', when='@0.13.0:0.13.999') | ||
| patch('fix_env_handling-0.17.2.patch', when='@0.14.0:') | ||
| patch('link.patch') |
There was a problem hiding this comment.
I dropped this patch as the fix_env_handling patches apply correctly to every version, and I couldn't find a version where link.patch worked. This may need to be resurrected.
| version('1.8.0_131-b11', sha256='62b215bdfb48bace523723cdbb2157c665e6a25429c73828a32f00e587301236', curl_options=curl_options, | ||
| url='http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz') | ||
|
|
||
| provides('java') |
|
Okay, I think this is finally ready to merge! I built a dozen or so versions of the package. The unit tests passed for me. We may need additional tweaks once we start working on TF, but this package is a lot better than it used to be. |
| + if (envName.startsWith("SPACK_")) { | ||
| + builder.put(envName, env.get(envName)); | ||
| + } | ||
| + } |
There was a problem hiding this comment.
Previously, we enumerated through every Spack environment variable and passed it to the build if it was set. This was extremely error prone, as the exact env vars Spack sets in build_environment.py and uses in the compiler wrappers changes frequently. About half of the env vars we were setting no longer exist, and the other half weren't being passed.
With this newer patch, bazel will pass all SPACK_* env vars to the build environment. I haven't written Java in a loooong time, but I think I did things right.
| @@ -12,12 +12,8 @@ | |||
| + ] | |||
| + | |||
| + env = repository_ctx.os.environ | |||
| + if "SPACK_DEPENDENCIES" in env: | |||
| + for dep in env["SPACK_DEPENDENCIES"].split(":"): | |||
There was a problem hiding this comment.
SPACK_DEPENDENCIES no longer exists, long live SPACK_INCLUDE_DIRS!
|
Local tests pass, but ftpmirror.gnu.org is down so the build tests are currently failing. We'll either have to wait for ftpmirror.gnu.org to come back online, or switch the download URLs. |
healther
left a comment
There was a problem hiding this comment.
Looks good to me, far better than our version :)
* use bazel commit in spack#13112, and add version 0.24.1, and corresponding cc_env patch * undo preferred java version by dodo47 * patch for v0.26 * Update install steps * Add patches for more versions * Add unit tests * Update patches for new Spack env vars * env is already defined, use spackEnv
Split off of #13112
Installed bazel 1.2.0 with Clang 11.0.0, Python 3.7.4, and JDK 1.8.0_231-b11 on macOS 10.15.1. Unit tests pass.
setup_dependent_packageFixes #12398
Fixes #11850
Closes #11120
Closes #10422
@jcftang @aweits @obreitwi @rubendibattista @dodo47 @healther