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

chore(copybara): sync commits from Aspect-internal silo #629

Merged
merged 14 commits into from
Feb 16, 2024

Commits on Feb 16, 2024

  1. chore: update the vendored BEP protos and pb.go files (#4551)

    Updates the proto files used for the BEP, and adds a
    `write_source_files` style rule to keep the checked in `.pb.go` files up
    to date so the IDE is happier.
    
    Part of #4438
    
    ---
    
    ### Type of change
    
    - Refactor (a code change that neither fixes a bug or adds a new
    feature)
    
    ### Test plan
    
    - Covered by existing test cases
    - Manual testing; please provide instructions so we can reproduce:
    
    CI
    
    GitOrigin-RevId: ba6fb33cf65eef01eb86b841562c1514ec7dda3a
    mattem authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    0002308 View commit details
    Browse the repository at this point in the history
  2. chore: update rules_lint (#4554)

    ### Type of change
    
    - Chore (any other change that doesn't affect source or test files, such
    as configuration)
    
    ### Test plan
    
    - Manual testing; please provide instructions so we can reproduce:
    `bazel run format`
    
    GitOrigin-RevId: dcedf5dbfacdcb307dba319ba4161dbd88a12e1e
    alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    a4dff8f View commit details
    Browse the repository at this point in the history
  3. chore: bump rules_go to 0.45.1 (#4556)

    Bumps rules_go to 0.45.1
    
    GitOrigin-RevId: 3bf9916d81550f141db3bf9280594ff1c5018c0f
    mattem authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    cd4b646 View commit details
    Browse the repository at this point in the history
  4. fix: ensure struct fields are named (#4565)

    It can be buggy to not name fields with this type of assignment, as
    adding or removing fields on the struct will cause the meaning of this
    code to change.
    
    ---
    
    ### Type of change
    
    - Bug fix (change which fixes an issue)
    
    GitOrigin-RevId: e6099feceac7b6c83726bd6f69ae70abb374bf56
    mattem authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    7524ebe View commit details
    Browse the repository at this point in the history
  5. chore: disable query tests on CI (#4566)

    The improper use of `Skip` caused the remaining tests to be skipped.
    Fixing the use of `Skip` shows that all these tests are failing
    currently, so mark the target as manual until resolved.
    
    `interface{}` is a terrible type.
    
    GitOrigin-RevId: 10aa62b4995bdee615da68bcec16b367f234a22a
    mattem authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    e98113c View commit details
    Browse the repository at this point in the history
  6. fix: ensure a copy of BESProxy is used in go-routine (#4568)

    Ensure that the go-routine closes over a copy of the loop variable to
    avoid it changing during the loop.
    
    ---
    
    ### Type of change
    
    - Bug fix (change which fixes an issue)
    
    GitOrigin-RevId: 57e4a4427029434001f16a0f9eb39b6dcf4bed02
    mattem authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    efe8b3a View commit details
    Browse the repository at this point in the history
  7. fix: ensure resolver error is logged (#4563)

    Ensure the resolver error is logged. There are two issues here, `Warnf`
    had no formatting string, and the `nil` check is never `true`, as `err`
    from the conditional is no longer in scope.
    
    ---
    
    ### Type of change
    
    - Bug fix (change which fixes an issue)
    
    ---------
    
    Co-authored-by: Jason Bedard <jason@aspect.dev>
    GitOrigin-RevId: b7ff188e2d1401ef3b3c62e90acbdfb1caa3f876
    2 people authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    456a6b0 View commit details
    Browse the repository at this point in the history
  8. feat(cli/lint): support a SARIF machine-readable output (#4540)

    This will be useful when Marvin wants to wire up this data to the GitHub
    Checks API.
    
    ---
    
    ### Type of change
    
    - New feature or functionality (change which adds functionality)
    
    ### Test plan
    
    - Manual testing; please provide instructions so we can reproduce:
    
    GitOrigin-RevId: 8317ebeb3291b7f5dc7b23a3d8d907bfb70f5e87
    alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    84c4a70 View commit details
    Browse the repository at this point in the history
  9. fix: support pnpm dependencies on local packages not in pnpm-workspac…

    …e (#4467)
    
    This seems to be valid... a reference to a directory as a package. Where
    normally such a reference is to a pnpm-workspace project and not just a
    directory.
    
    Note that no `npm_package` is generated because the directory is not in
    `pnpm-workspace.yaml`, which I think is correct. We can't really create
    a `npm_package` if it is not listed in the lockfile as a package etc.
    
    I guess this is more like tsconfig `paths` where we reference something
    by an artificial name and have no idea how it will actually work at
    runtime.
    
    Fix aspect-build/silo#4320
    
    ---
    
    ### Type of change
    
    - Bug fix (change which fixes an issue)
    
    ### Test plan
    
    - Covered by existing test cases
    - New test cases added
    
    GitOrigin-RevId: 99c529e077d317e3e1fbb27e4fc86f31a038035b
    jbedard authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    1e216b1 View commit details
    Browse the repository at this point in the history
  10. refactor(gazelle): move file exclusion logic to common (#4578)

    For use in new gazelle extensions.
    
    ---
    
    ### Type of change
    
    - Refactor (a code change that neither fixes a bug or adds a new
    feature)
    
    ### Test plan
    
    - Covered by existing test cases
    - New test cases added
    
    GitOrigin-RevId: 75130d8979843c87af34a1ae93fba63a9818df3c
    jbedard authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    d651886 View commit details
    Browse the repository at this point in the history
  11. test(gazelle): fix invalid syntax in kotlin test (#4579)

    Copy paste error when copying this test from js and adding a few test
    cases.
    
    ---
    
    ### Type of change
    
    - Refactor (a code change that neither fixes a bug or adds a new
    feature)
    
    ### Test plan
    
    - Covered by existing test cases
    
    GitOrigin-RevId: ec6b9f44d6b0686e69993c9251c1372490ee0af1
    jbedard authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    ff611f3 View commit details
    Browse the repository at this point in the history
  12. chore: add Vale message format parser (#4597)

    Supports machine-readable output for linting markdown prose
    
    Note, I filed aspect-build/silo#4595 as the
    output has the rule "code" jammed with the human-readable message.
    
    ---
    
    ### Type of change
    
    - Chore (any other change that doesn't affect source or test files, such
    as configuration)
    
    ### Test plan
    
    - Manual testing; please provide instructions so we can reproduce:
    
    ```
    $HOME/Projects/silo/bazel-bin/cli/core/cmd/aspect/aspect_/aspect lint src:md --output=sarif
    INFO: Analyzed target //src:md (0 packages loaded, 0 targets configured).
    INFO: Found 1 target...
    [1 / 1] checking cached actions
    {
      "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.4",
      "runs": [
        {
          "results": [
            {
              "locations": [
                {
                  "physicalLocation": {
                    "artifactLocation": {
                      "uri": "src/README.md",
                      "uriBaseId": "%SRCROOT%"
                    },
                    "region": {
                      "startColumn": 47,
                      "startLine": 3
                    }
                  }
                }
              ],
              "message": {
                "text": "Google.We:Try to avoid using first-person plural like 'We'."
              }
            },
            {
              "locations": [
                {
                  "physicalLocation": {
                    "artifactLocation": {
                      "uri": "src/README.md",
                      "uriBaseId": "%SRCROOT%"
                    },
                    "region": {
                      "startColumn": 54,
                      "startLine": 3
                    }
                  }
                }
              ],
              "message": {
                "text": "write-good.Weasel:'really' is a weasel word!"
              }
            },
            {
              "locations": [
                {
                  "physicalLocation": {
                    "artifactLocation": {
                      "uri": "src/README.md",
                      "uriBaseId": "%SRCROOT%"
                    },
                    "region": {
                      "startColumn": 82,
                      "startLine": 3
                    }
                  }
                }
              ],
              "message": {
                "text": "Vale.Spelling:Did you really mean 'speelling'?"
              }
            }
          ],
          "tool": {
            "driver": {
              "name": "Vale"
            }
          }
        }
      ],
      "version": "2.1.0"
    ```
    GitOrigin-RevId: ed7dbdb7255abce357edebd1118db3029a4976cf
    alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    eb6726a View commit details
    Browse the repository at this point in the history
  13. feat: add flag and label completion for bazel commands (#4584)

    Inspired by #373 with a
    re-write + simplication + improvement of the completion logic from the
    original.
    
    To enable bash completion:
    
    ```
    $ brew install bash-completion
    $ aspect completion bash > $(brew --prefix)/etc/bash_completion.d/aspect
    
    # add to your .bash_profile:
    
    if [[ -r "$HOMEBREW_PREFIX/etc/profile.d/bash_completion.sh" ]]; then
      . "$HOMEBREW_PREFIX/etc/profile.d/bash_completion.sh"
      echo "bash completion loaded"
    fi
    ```
    
    See https://tecadmin.net/enable-bash-completion-on-macos/ for more info.
    
    Demos:
    
    ```
    $ aspect <tab><tab>
    analyze-profile     (Analyze build profile data)                                         info                (Display runtime info about the bazel server)
    aquery              (Query the action graph)                                             init                (Create a new Bazel workspace)
    build               (Build the specified targets)                                        license             (Prints the license of this software.)
    canonicalize-flags  (Present a list of bazel options in a canonical form)                lint                (Run configured linters over the dependency graph.)
    clean               (Remove the output tree)                                             outputs             (Print paths to declared output files)
    completion          (Generate the autocompletion script for the specified shell)         print               (Print syntax elements from BUILD files)
    config              (Displays details of configurations.)                                query               (Query the dependency graph, ignoring configuration flags)
    configure           (Auto-configure Bazel by updating BUILD files)                       run                 (Build a single target and run it with the given arguments)
    coverage            (Same as 'test', but also generates a code coverage report.)         shutdown            (Stop the bazel server)
    cquery              (Query the dependency graph, honoring configuration flags)           support             (Interactive, human-escalated support for Bazel problems)
    docs                (Open documentation in the browser)                                  test                (Build the specified targets and run all test targets among them)
    fetch               (Fetch external repositories that are prerequisites to the targets)  version             (Print the versions of Aspect CLI and Bazel)
    help
    ```
    
    ```
    $ aspect test <tab><tab>
    :test        :test2       foo          foo/bar      foo/fum/bar
    ```
    
    ```
    $ aspect test foo<tab><tab>
    foo           foo/bar       foo/fum/bar   foo:foo       foo:fum/test  foo:test      foo:test2
    ```
    
    ```
    $ aspect test foo/<tab><tab>
    foo/bar      foo/fum/bar
    ```
    
    ```
    $ aspect test //foo<tab><tab>
    //foo           //foo/bar       //foo/fum/bar   //foo:foo       //foo:fum/test  //foo:test      //foo:test2
    ```
    
    ```
    $ aspect test //foo/<tab><tab>
    //foo/bar      //foo/fum/bar
    ```
    
    ```
    $ aspect test @//foo<tab><tab>
    @//foo           @//foo/bar       @//foo/fum/bar   @//foo:foo       @//foo:fum/test  @//foo:test      @//foo:test2
    ```
    
    ```
    $ aspect test @//foo/<tab><tab>
    @//foo/bar      @//foo/fum/bar
    ```
    
    ```
    $ aspect test @@//foo<tab><tab>
    @@//foo           @@//foo/bar       @@//foo/fum/bar   @@//foo:foo       @@//foo:fum/test  @@//foo:test      @@//foo:test2
    ```
    
    ```
    $ aspect test @@//foo/<tab><tab>
    @@//foo/bar      @@//foo/fum/bar
    ```
    
    ```
    $ cd foo
    $ aspect test <tab><tab>
    :foo       :fum/test  :test      :test2     bar        fum/bar
    ```
    
    GitOrigin-RevId: 4044b8d8bb34dfad160cb1d4728bf13d10cb3b9c
    gregmagolan authored and alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    31dec3a View commit details
    Browse the repository at this point in the history
  14. chore: tidy

    alexeagle committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    c9748a5 View commit details
    Browse the repository at this point in the history