From 34a33b4eba8946623a5c8c06d92028906d4ff6f0 Mon Sep 17 00:00:00 2001 From: Nils Wireklint Date: Fri, 8 Mar 2024 17:28:51 +0100 Subject: [PATCH] Tidy up (#187) * Fix typos * Explicitly request query label output To work with users who prefer a different output in their personal rc file. Using '--nohome_rc' is not good either, if they want to change the output base this query would duplicate a lot of data. * Update 'aspect_rules_js' --------- Co-authored-by: Nils Wireklint --- .github/workflows/master.yaml | 2 +- .github/workflows/pull-requests.yaml | 2 +- WORKSPACE | 6 +++--- pkg/filesystem/local_directory_windows.go | 2 +- pkg/filesystem/path/component_walker.go | 2 +- pkg/util/non_empty_stack.go | 2 +- tools/github_workflows/workflows_template.libsonnet | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 88cdbafa..ac4d5c34 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -33,7 +33,7 @@ }, { "name": "Protobuf generation", - "run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n" + "run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n" }, { "name": "Embedded asset generation", diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 7ff18272..53699bb4 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -33,7 +33,7 @@ }, { "name": "Protobuf generation", - "run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n" + "run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n" }, { "name": "Embedded asset generation", diff --git a/WORKSPACE b/WORKSPACE index dee5df9f..df4f9891 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -163,9 +163,9 @@ http_archive( http_archive( name = "aspect_rules_js", - sha256 = "00e7b97b696af63812df0ca9e9dbd18579f3edd3ab9a56f227238b8405e4051c", - strip_prefix = "rules_js-1.23.0", - url = "https://github.com/aspect-build/rules_js/releases/download/v1.23.0/rules_js-v1.23.0.tar.gz", + sha256 = "edc7b0255114fafdbbd593ea5d5fdfd54b2a603f33b3a49518910ac618e1bf2b", + strip_prefix = "rules_js-1.38.0", + url = "https://github.com/aspect-build/rules_js/releases/download/v1.38.0/rules_js-v1.38.0.tar.gz", ) load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies") diff --git a/pkg/filesystem/local_directory_windows.go b/pkg/filesystem/local_directory_windows.go index aa01d36e..a066270c 100644 --- a/pkg/filesystem/local_directory_windows.go +++ b/pkg/filesystem/local_directory_windows.go @@ -873,7 +873,7 @@ func createNTFSHardlink(oldHandle windows.Handle, oldName string, newHandle wind func renameHelper(sourceHandle, newHandle windows.Handle, newName string) (areSame bool, err error) { // We want to know a few things before renaming: // 1. Are source and target hard links to the same file? If so, noop. - // 2. If target exists and wither source or target is a directory, don't overwrite and report error. + // 2. If target exists and whether source or target is a directory, don't overwrite and report error. // 3. If neither is the case, move and, if necessary, replace. var targetHandle windows.Handle err = ntCreateFile(&targetHandle, windows.FILE_READ_ATTRIBUTES, newHandle, newName, windows.FILE_OPEN, diff --git a/pkg/filesystem/path/component_walker.go b/pkg/filesystem/path/component_walker.go index c7b5651c..33ba623c 100644 --- a/pkg/filesystem/path/component_walker.go +++ b/pkg/filesystem/path/component_walker.go @@ -28,7 +28,7 @@ type GotSymlink struct { // GotDirectoryOrSymlink is a union type of GotDirectory and GotSymlink. // It is returned by ComponentWalker.OnDirectory(), as that function may -// return either a direcgory or symbolic link. +// return either a directory or symbolic link. type GotDirectoryOrSymlink interface { isGotDirectoryOrSymlink() } diff --git a/pkg/util/non_empty_stack.go b/pkg/util/non_empty_stack.go index ff1a8fbc..0cc7f115 100644 --- a/pkg/util/non_empty_stack.go +++ b/pkg/util/non_empty_stack.go @@ -34,7 +34,7 @@ func (cw *NonEmptyStack[T]) Push(d T) { // PopSingle removes the last pushed element from the stack. The return // value indicates whether an element was popped successfully. It is not -// possible to push the final element off the stack. +// possible to pop the final element off the stack. func (cw *NonEmptyStack[T]) PopSingle() (T, bool) { if len(cw.stack) == 1 { var zero T diff --git a/tools/github_workflows/workflows_template.libsonnet b/tools/github_workflows/workflows_template.libsonnet index c6fb83c7..ccad0e4b 100644 --- a/tools/github_workflows/workflows_template.libsonnet +++ b/tools/github_workflows/workflows_template.libsonnet @@ -91,7 +91,7 @@ name: 'Protobuf generation', run: ||| find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true - bazel build $(bazel query 'kind("go_proto_library", //...)') + bazel build $(bazel query --output=label 'kind("go_proto_library", //...)') find bazel-bin/pkg/proto -name '*.pb.go' | while read f; do cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|') done