Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,20 @@ jobs:
| jq -e --arg f "${{ matrix.expect_file }}" \
'any(.documents[]; .relative_path == $f)'

fingerprint-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
cache-dependency-path: go.sum
- run: ./internal/implementations/fingerprint/sync.sh
- run: git diff --exit-code internal/implementations/fingerprint/fingerprint.go

ci-test:
if: always()
needs: [build, docker, index]
needs: [build, docker, index, fingerprint-sync]
runs-on: ubuntu-latest
steps:
- if: >-
Expand Down
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
nativeCheckInputs = [ pkgs.git ];
};
default = self.packages.${system}.scip-go;

}
// pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
docker = pkgs.dockerTools.buildLayeredImage {
name = "scip-go";
tag = version;
Expand Down
24 changes: 24 additions & 0 deletions internal/implementations/fingerprint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# fingerprint

This package is a verbatim copy of
[`golang.org/x/tools/gopls/internal/util/fingerprint`], which is not importable
because it lives under an `internal/` path.

It is used by the implementation-indexing code to produce canonical
method-signature strings (fingerprints) for the 64-bit bitmask filter that
quickly rejects non-matching type/interface pairs before calling the expensive
`types.Implements`.

## Keeping in sync

The copy is pinned to the `golang.org/x/tools` version declared in `go.mod`
(currently **v0.43.0**). Run the sync script whenever you bump that dependency:

``` bash
./internal/implementations/fingerprint/sync.sh
```

The script fetches the file at the matching tag and overwrites the local copy.
Any diff will show up in `git status`.

[`golang.org/x/tools/gopls/internal/util/fingerprint`]: https://github.com/golang/tools/tree/master/gopls/internal/util/fingerprint
Loading
Loading