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

[DO NOT MERGE] Release 0.50 CI Test #4077

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

[DO NOT MERGE] Release 0.50 CI Test #4077

wants to merge 15 commits into from

Commits on Aug 30, 2024

  1. Lazy expand absolute path to avoid including them in the output (#4009)

    **What type of PR is this?**
    
    Bug fix
    
    **What does this PR do? Why is it needed?**
    
    It fixes reproducibility issues reported in
    #3994 by lazy-expanding
    paths to absolute paths
    
    **Which issues(s) does this PR fix?**
    
    Fixes #3994
    AlessandroPatti authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    53ff4b9 View commit details
    Browse the repository at this point in the history
  2. Remove get_nogo from context (#4029)

    **What type of PR is this?**
    Cleanup
    
    **What does this PR do? Why is it needed?**
    It seems odd to hang helpers off the `go` context because they still
    need to take `go` as a param. It's clearer to just import them.
    
    **Which issues(s) does this PR fix?**
    
    Fixes #
    
    **Other notes for review**
    dzbarsky authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    0dd58b3 View commit details
    Browse the repository at this point in the history
  3. Tweak nogo archive handling (#4023)

    This is one of the sources of feeding structs into `deps`.
    
    **What type of PR is this?**
    Starlark cleanup
    
    **What does this PR do? Why is it needed?**
    
    **Which issues(s) does this PR fix?**
    
    Fixes #
    
    **Other notes for review**
    dzbarsky authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    c5299a8 View commit details
    Browse the repository at this point in the history
  4. Add qnx and osx platforms (#4036)

    **What type of PR is this?**
    
    Bug fix
    
    **What does this PR do? Why is it needed?**
    
    **Which issues(s) does this PR fix?**
    
    **Other notes for review**
    
    This change was requested in
    bazel-contrib/bazel-gazelle#1735 (comment)
    tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    eb9a7af View commit details
    Browse the repository at this point in the history
  5. Making gopackagesdriver correctly handle relative queries made from a…

    … subdirectory. (#4002)
    
    <!-- Thanks for sending a PR! Before submitting:
    
    1. If this is your first PR, please read CONTRIBUTING.md and sign the
    CLA
       first. We cannot review code without a signed CLA.
    2. Please file an issue *first*. All features and most bug fixes should
    have
    an associated issue with a design discussed and decided upon. Small bug
       fixes and documentation improvements don't need issues.
    3. New features and bug fixes must have tests. Documentation may need to
    be updated. If you're unsure what to update, send the PR, and we'll
    discuss
       in review.
    4. Note that PRs updating dependencies and new Go versions are not
    accepted.
       Please file an issue instead.
    -->
    
    **What type of PR is this?**
    
    Bug fix
    
    **What does this PR do? Why is it needed?**
    
    It allows gopackagesdriver to be called within a subdirectory of a
    workspace and properly resolve queries from gopls from IDEs like VSCode
    when they include relative references. For example, if you have the
    following repo/workspace structure:
    ```
    WORKSPACE
    project1/BUILD.bazel
    project1/main.go
    project2/BUILD.bazel
    project2/main.go
    ...
    ```
    
    If you run gopackagesdriver using bazel run from project1 directory and
    receive the following queries:
    ```
    file=./main.go
    ./...
    ```
    The existing code will try to resolve those queries against the root of
    the workspace, when instead we would expect it to resolve relative to
    the project1 directory.
    
    **Which issues(s) does this PR fix?**
    
    Fixes #4001 
    
    **Other notes for review**
    waltercacau authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    9599402 View commit details
    Browse the repository at this point in the history
  6. Support GOOS=wasip1 (#4045)

    **What type of PR is this?**
    
    Feature
    
    **What does this PR do? Why is it needed?**
    
    Adds support for GOOS=wasip1 so that users can build wasi binaries using
    rules_go
    
    **Which issues(s) does this PR fix?**
    
    Fixes #4046
    
    **Other notes for review**
    
    None
    rockwotj authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    6583a73 View commit details
    Browse the repository at this point in the history
  7. builder: work around change in filepath.EvalSymlinks behavior (#4050)

    **What type of PR is this?**
    
    > Bug fix
    
    **What does this PR do? Why is it needed?**
    
    filepath.EvalSymlinks works differently on Windows in Go 1.23.0: mount
    points and reparse points are no longer treated as symbolic links by
    os.Stat. Bazel uses junctions (implemented as reparse points) for
    inputs, so this means EvalSymlinks can fail with some kinds of inputs
    where it didn't before.
    
    replicateTree calls EvalSymlinks before constructing an input tree for
    `GoStdlib`. This seems to be necessary in some cases, though I'm not
    altogether sure why. EvalSymlinks fails due to the new behavior though.
    
    This change sets `GODEBUG=winsymlink=0` when invoking the builder binary
    to revert to the old behavior. This should not affect the behavior of
    user code compiled using the builder. This may not be a permanent
    solution, but it should work at least through Go 1.25.
    
    **Which issues(s) does this PR fix?**
    
    Fixes #4049
    
    **Other notes for review**
    
    No test, but verified locally. Simply running `GoStdlib` with Go 1.23.0
    will cover this. rules_go currently builds with Go 1.21.8 (no longer a
    version supported by Google!).
    jayconrod authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    c8fca5c View commit details
    Browse the repository at this point in the history
  8. gomock: allow passing extra flags to mockgen_tool (#4066)

    **What type of PR is this?**
    
    > Feature
    
    **What does this PR do? Why is it needed?**
    
    Adds the ability to pass extra arguments to gomock
    
    **Which issues(s) does this PR fix?**
    
    Fixes #4065
    Closes #4067
    
    **Other notes for review**
    
    cleaner
    TvdW authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    7666720 View commit details
    Browse the repository at this point in the history
  9. Update nogo.rst (#4071)

    Resolves #3996
    
    ---------
    
    Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
    tyler-french and fmeum committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    e470f85 View commit details
    Browse the repository at this point in the history
  10. Forward -testfilter to nogo and fix failure in case of no srcs (#4075)

    **What type of PR is this?**
    
    Bug fix
    
    **What does this PR do? Why is it needed?**
    
    Without this, nogo runs on the external test sources when compiling the
    internal test library, which can result in missing deps errors and is
    also wasteful. Since filtering out files made certain nogo actions run
    on no files, also fix a bug that affects this situation by writing out
    an empty log in addition to an empty facts file.
    
    The code that checks imports and builds the importcfg was shared between
    `compilepkg` and `nogo` and is now extracted into a common method. Along
    the way, have it output the file into the working directory, which
    simplifies cleanup, makes the file easier to find and avoids writing
    files unknown to Bazel into the output directory.
    
    Also removes some unused test files.
    
    **Which issues(s) does this PR fix?**
    
    Fixes #4062
    Fixes #4070
    Fixes #4073
    
    **Other notes for review**
    fmeum authored and tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    dfaceea View commit details
    Browse the repository at this point in the history
  11. prepare rules_go release 0.50.0 (#4064)

    This will be merged, but we will end up cherry picking certain commits
    onto an `release-0.50` branch, which will not include all of the commits
    on master.
    tyler-french committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    6df867c View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Do not report nogo diagnostics for cgo generated files (#4081)

    **What type of PR is this?**
    
    Bug fix
    
    **What does this PR do? Why is it needed?**
    
    **Which issues(s) does this PR fix?**
    
    Fixes #4079
    
    **Other notes for review**
    fmeum authored and tyler-french committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    c93053c View commit details
    Browse the repository at this point in the history
  2. Run nogo on internal and external tests libs, not testmain (#4082)

    **What type of PR is this?**
    
    Bug fix
    
    **What does this PR do? Why is it needed?**
    
    nogo should run on both the internal and external libraries compiled for
    a `go_test`, but didn't. It also shouldn't run on the generated
    `testmain.go` file, but did.
    fmeum authored and tyler-french committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    046d5bc View commit details
    Browse the repository at this point in the history
  3. Only print type-checking error once in nogo (#4083)

    **What type of PR is this?**
    
    Bug fix
    
    **What does this PR do? Why is it needed?**
    
    Previously, it was printed once by analyzer.
    
    **Which issues(s) does this PR fix?**
    
    Fixes #4080
    
    **Other notes for review**
    fmeum authored and tyler-french committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    5e2e09d View commit details
    Browse the repository at this point in the history
  4. prepare patch release 0.50.1 (#4087)

    This PR prepares for the cherry-picked `0.50.1` patch release, which
    will include:
    #4081 
    #4082 
    #4083 
    
    These commits will be cherry-picked to the branch `release-0.50`
    tyler-french committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    1e855e2 View commit details
    Browse the repository at this point in the history