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_4: 4.0.0 -> 4.1.0 #123895

Merged
merged 1 commit into from
Jun 1, 2021
Merged

bazel_4: 4.0.0 -> 4.1.0 #123895

merged 1 commit into from
Jun 1, 2021

Conversation

dmivankov
Copy link
Contributor

@dmivankov dmivankov commented May 21, 2021

https://github.com/bazelbuild/bazel/releases/tag/4.1.0

other minor changes:

  • grep for /bin/ rather than /bin for blanket substitute
  • invoke {pre,post}{Build,Install} hooks
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Added a release notes entry if the change is major or breaking
  • Fits CONTRIBUTING.md.

@r-rmcgibbo
Copy link

Result of nixpkgs-review pr 123895 at 3e965a42 run on x86_64-linux 1

1 package built successfully:
  • bazel_4
20 suggestions:
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/true' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/shell/Command.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env python' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:572:3:

        |
    572 |   installPhase = ''
        |   ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/true' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/shell/Command.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/shell/Command.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/true' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: missing-phase-hooks

    buildPhase should probably contain runHook preBuild and runHook postBuild.

    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:542:3:

        |
    542 |   buildPhase = ''
        |   ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env python' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env python' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/templates/be/make-variables.vm'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/bash' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/shell/Command.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env python' doesn't match anything in file 'src/main/java/com/google/devtools/build/lib/shell/Command.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/bin/env' doesn't match anything in file 'src/main/java/com/google/devtools/build/docgen/PredefinedAttributes.java'
    Near pkgs/development/tools/build-managers/bazel/bazel_4/default.nix:170:0:

        |
    170 |     description = "Build tool that builds code quickly and reliably";
        | ^
    

@dmivankov
Copy link
Contributor Author

Interesting suggestions about unused substitutions, will try to have a look

@jonringer
Copy link
Contributor

If they are being blanket applied across a host of files, I would say you can pass over the suggestions. But some of them may warrant investigation.

@uri-canva
Copy link
Contributor

Tested on macOS, works.

https://github.com/bazelbuild/bazel/releases/tag/4.1.0

other minor changes:
- grep for /bin/ rather than /bin for blanket substitute
- invoke {pre,post}{Build,Install} hooks
@dmivankov
Copy link
Contributor Author

dmivankov commented May 22, 2021

Had a quick look into suggestions:

  • added pre/post hooks invocations
  • changed grep /bin with grep /bin/
  • some unused substitutions are false positive and/or about /bin/ mentioned in comments/docs
  • in bazel source code there seems to be more (/usr)/bin/ references, but hard to tell if it is an issue or changed since 3.7 or 4.0
  • especially unclear with getconf on darwin, so let's maybe rely on tests & user tests for now

@timothyklim
Copy link
Contributor

Please, include patch for bazel-toolchains bazelbuild/bazel#13099 (comment)

@dmivankov
Copy link
Contributor Author

@timothyklim not very familiar with code around that patch

  • does it change packaged bazel binary?
  • is it to be applied to user WORKSPACE files only?

My first impression is that users simply need to use patched/suitable bazel-toolchains with bazel-4.1.0 and bazel itself can't be patched to be compatible with older versions. So unless we hit an issue compiling bazel 4.1..0 with bazel 4.1.0 (&rbe?) all should be fine?

@uri-canva
Copy link
Contributor

Please, include patch for bazel-toolchains

I'd rather it wasn't included: nixpkgs bazel behaving differently from upstream makes debugging issues with it harder, and makes discussions amongst the broader bazel community less applicable.

@uri-canva
Copy link
Contributor

ping @mboes @Profpatsch

@dmivankov
Copy link
Contributor Author

fwiw, using 4.1.0 from PR works fine for me so far on NixOS

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2021

Successfully created backport PR #125246 for release-21.05.

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.

6 participants