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: add fixed output test case #63645

Merged
merged 4 commits into from Jul 25, 2019
Merged

Conversation

timokau
Copy link
Member

@timokau timokau commented Jun 22, 2019

Motivation for this change

Feels like a horrible hack, but it should make sure that downstream
hashes are preserved between bazel versions.

The hash changed in the 0.24 -> 0.26 update.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Profpatsch
Copy link
Member

I’ll take a look on Monday

@timokau
Copy link
Member Author

timokau commented Jun 22, 2019

Looks like my hack is not actually necessary, since bazel is already in nativeBuildInputs of the fixed output derivation and therefore any change to bazel will re-trigger the fixed output derivation build.

I seem to remember that I had some problems with fetchpatch not getting re-evaluated even though patchutils had changed, but apparently that is not the case here for some reason 🤔

Anyway, I'll remove the hack.

@Profpatsch
Copy link
Member

Can you put it in a sub-attributeset? Then one can do nix-build -A bazel.tests.downstreamPackages or something.

@timokau
Copy link
Member Author

timokau commented Jun 22, 2019

Done

pkgs/development/tools/build-managers/bazel/default.nix Outdated Show resolved Hide resolved
@kalbasit
Copy link
Member

@GrahamcOfBorg build bazel.tests.downstreamPackages

@timokau
Copy link
Member Author

timokau commented Jun 24, 2019

I just noticed that the downstream tests won't actually be run when running nix build -f. bazel.tests. Is that what you intended @Profpatsch?

@Profpatsch
Copy link
Member

I just noticed that the downstream tests won't actually be run when running nix build -f. bazel.tests. Is that what you intended @Profpatsch?

Oh, hm. Maybe we need to add recurseIntoAttrs.

@Profpatsch
Copy link
Member

Profpatsch commented Jul 23, 2019

@GrahamcOfBorg build bazel.tests

Adding recurseIntoAttrs indeed solves the issue.

@Profpatsch
Copy link
Member

@GrahamcOfBorg build bazel.tests

@Profpatsch
Copy link
Member

dm-sonnet is failing on linux.
bazel-watcher is failing on darwin (as noted in #65268).

@kalbasit can you take a look at bazel-watcher? @timokau you are maintaining dm-sonnet, can you look into it?

@kalbasit
Copy link
Member

@Profpatsch bazel-watcher fix is in #65308.

@timokau
Copy link
Member Author

timokau commented Jul 23, 2019

you are maintaining dm-sonnet, can you look into it?

Not currently. If nobody else steps up, it'll have to wait for a week or two.

@Profpatsch
Copy link
Member

Profpatsch commented Jul 24, 2019

We should also add bazel-buildtools to the downstream tests. It doesn’t use bazel …

Not currently. If nobody else steps up, it'll have to wait for a week or two.

I’ll remove it from the dependency test for now and open a new issue.

@Profpatsch
Copy link
Member

Profpatsch commented Jul 25, 2019

Rebased on master & disabled dm-sonnet

@GrahamcOfBorg build bazel.tests

@Profpatsch
Copy link
Member

And we’re live.

@Profpatsch
Copy link
Member

Tests went through, autosquashing and merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants