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

Bazel 027 #957

Merged
merged 14 commits into from
Jun 27, 2019
Merged

Bazel 027 #957

merged 14 commits into from
Jun 27, 2019

Conversation

guibou
Copy link
Contributor

@guibou guibou commented Jun 18, 2019

Summary of the tasks done for this PR.

  • bazel 0.27 upstream in nixpkgs
    • Fix the /bin/bash
    • Fix the ijar ld loader
    • Fix the checkPhase issues
    • Python compatibility with python3
    • Merged PR
  • bazel 0.27 incompatibles flags (It works without it, but it may be better to remove the compatibility flags)
    • Deprecated cpu attribute
    • --incompatible_disable_genrule_cc_toolchain_dependency
    • --incompatible_no_transitive_loads
    • --incompatible_disable_deprecated_attr_params=false
    • --incompatible_new_actions_api=false
    • --incompatible_no_support_tools_in_action_inputs=false
    • --incompatible_require_ctx_in_configure_features=false
    • --incompatible_depset_is_not_iterable=false
    • --incompatible_depset_union=false
    • --incompatible_use_python_toolchains=false
  • CI failures
    • Netlify. It was using bazel 0.20. Upgrade to 0.27 breaks due to GLIBC symbols.. NOTE: I'm using bazel 0.26 for netlify.
    • Windows
    • Linux-nixpkgs
    • Darwin-nixpkgs
    • Linux-bindist: it fails because the --build_tag_filters are not taken into account, leading to the build of the nixpkgs_package targets.

Open issue

--incompatible_use_python_toolchains is a pain to manage with the three platform we use. For now it was reactivated. The code for the python toolchain (working on linux / darwin nixpkgs) is still here, but the toolchain is not used and --incompatible_use_python_toolchains=false is set in .bazelrc.

That's difficult to fix considering that the windows python autodetection bazel script is not functional (bazel issue reported in comments). I think it is a correct tradeoff for now, considering that it won't leak in user code. That's only used for our tests, so I prefer keeping it simple for now and wait for future bazel upgrade which may comes with a functional windows autodetection script.

This closes #956 and #948.

@guibou
Copy link
Contributor Author

guibou commented Jun 19, 2019

See NixOS/nixpkgs#63532 for nixpkgs upstream work.

@guibou guibou force-pushed the bazel_027 branch 3 times, most recently from da215a2 to a6376a5 Compare June 20, 2019 20:17
@guibou
Copy link
Contributor Author

guibou commented Jun 20, 2019

Ok, the only remaining task is to wait for the nixpkgs upstream PR to be merged. Once bazel will be in the binary cache, I'll investigate the build failures.

@guibou guibou force-pushed the bazel_027 branch 5 times, most recently from 9540199 to f4f4b13 Compare June 25, 2019 10:03
@guibou
Copy link
Contributor Author

guibou commented Jun 26, 2019

Yeah, I found that: bazelbuild/bazel#8723 which was the reason why bindist was not green. Everything is green!

Cleaning and converting to a real PR.

@guibou guibou marked this pull request as ready for review June 26, 2019 10:45
- bazel 0.27 will default to python3 in this context
- I removed the "hackish" print statement, it does not crash. I assume
  the issue is fixed.
- list > int is not valid in python3 (it was always True in python 2)
Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

tests/cc_haskell_import/python_add_one.py Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
@guibou
Copy link
Contributor Author

guibou commented Jun 26, 2019

Thank you @aherrmann for the PR approval. I'll fix the space issue and the regression on windows (probably due to the latest rebase, I'll see) and I merge.

@guibou guibou force-pushed the bazel_027 branch 5 times, most recently from 8d34ad4 to 342be04 Compare June 26, 2019 21:04
aherrmann and others added 2 commits June 27, 2019 14:26
The amount of shell indirection seems to have changed in Bazel 0.27.
Meaning that we would need twice as many `\` for the `sed` call on
Windows. The `tr` command is insensitive to single backslashes, so it's
an easier alternative.
@guibou guibou added the merge-queue merge on green CI label Jun 27, 2019
@mergify mergify bot merged commit 1f7a51b into master Jun 27, 2019
@mergify mergify bot deleted the bazel_027 branch June 27, 2019 12:49
@mergify mergify bot removed the merge-queue merge on green CI label Jun 27, 2019
@mboes mboes mentioned this pull request Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bazel 0.27 support
3 participants