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

process: sync commits from Aspect-internal silo #807

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion bazel/action_cache/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "bazel_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/analysis/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "bazel_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/buildeventstream/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "buildeventstream_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/command_line/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "command_line_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/failure_details/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "failure_details_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/flags/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "bazel_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/invocation_policy/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "invocation_policy_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/options/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "options_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/packages_metrics/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "devtools_build_lib_packages_metrics_proto",
Expand Down
2 changes: 1 addition & 1 deletion bazel/query/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")
load("//bazel/ts:defs.bzl", "ts_proto_library")
load("//bazel/go:write_go_generated_source_files.bzl", "write_go_generated_source_files")

proto_library(
name = "blaze_query_aspect_mirror_proto",
Expand Down
Empty file removed bazel/ts/BUILD.bazel
Empty file.
75 changes: 0 additions & 75 deletions bazel/ts/defs.bzl

This file was deleted.

2 changes: 1 addition & 1 deletion docs/bazelrc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ go_library(
"convenience.bazelrc",
"correctness.bazelrc",
"debug.bazelrc",
"java.bazelrc",
"javascript.bazelrc",
"performance.bazelrc",
"java.bazelrc",
],
importpath = "github.com/aspect-build/aspect-cli/docs/bazelrc",
visibility = ["//visibility:public"],
Expand Down
11 changes: 11 additions & 0 deletions docs/bazelrc/bazel6.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,14 @@ query --noexperimental_check_output_files
# NB: This flag is in bazel6.bazelrc because it became a no-op in Bazel 7 and has been removed
# in Bazel 8.
build --incompatible_remote_results_ignore_disk

# Propagate tags from a target declaration to the actions' execution requirements.
# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]`
# get propagated to actions created by the rule.
# Without this option, you rely on rules authors to manually check the tags you passed
# and apply relevant ones to the actions they create.
# See https://github.com/bazelbuild/bazel/issues/8830 for details.
# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
build --experimental_allow_tags_propagation
fetch --experimental_allow_tags_propagation
query --experimental_allow_tags_propagation
11 changes: 0 additions & 11 deletions docs/bazelrc/correctness.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ test --incompatible_exclusive_test_sandboxed
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env
build --incompatible_strict_action_env

# Propagate tags from a target declaration to the actions' execution requirements.
# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]`
# get propagated to actions created by the rule.
# Without this option, you rely on rules authors to manually check the tags you passed
# and apply relevant ones to the actions they create.
# See https://github.com/bazelbuild/bazel/issues/8830 for details.
# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
build --experimental_allow_tags_propagation
fetch --experimental_allow_tags_propagation
query --experimental_allow_tags_propagation

# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong
# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python
# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the
Expand Down
16 changes: 0 additions & 16 deletions gazelle/js/resolve.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright 2023 Aspect Build Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package gazelle

import (
Expand Down
16 changes: 0 additions & 16 deletions gazelle/kotlin/resolver.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Copyright 2023 Aspect Build Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package gazelle

import (
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/aspect/common.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ aspect() {
# but the configured path is only writable by specific users which we can't run as within the sandbox.
# these system wide flag affect the output path of the bazel-in-bazel that is run inside the tests leading to errors.
# NOTE: the output files left by bazel-in-bazel should be discarded as they are not part of the action.
"$TEST_SRCDIR/$TEST_WORKSPACE/cmd/aspect/aspect_/aspect" --aspect:nosystem_config --nosystem_rc --nohome_rc "$@"
"$TEST_SRCDIR/$TEST_WORKSPACE/cli/core/cmd/aspect/aspect_/aspect" --aspect:nosystem_config --nosystem_rc --nohome_rc "$@"
}

aspect_vanilla() {
# for use with --version, -v and --bazel-version
"$TEST_SRCDIR/$TEST_WORKSPACE/cmd/aspect/aspect_/aspect" "$@"
"$TEST_SRCDIR/$TEST_WORKSPACE/cli/core/cmd/aspect/aspect_/aspect" "$@"
}

setup_file() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/aspect/outputs/hash_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Aspect Build Systems, Inc.
* Copyright 2022 Aspect Build Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,8 +37,8 @@ func TestHash(t *testing.T) {
t.Run("hashMurmur3Sync and hashMurmur3Concurrent return the same hash for the same set of files", func(t *testing.T) {
g := NewGomegaWithT(t)

const testTarget1 = "//pkg/aspect/outputs:test_label"
const testTarget2 = "//pkg/aspect/outputs:test_label"
const testTarget1 = "//cli/core/pkg/aspect/outputs:test_label"
const testTarget2 = "//cli/core/pkg/aspect/outputs:test_label"

hashFiles := make(map[string][]string)
hashFiles["//:test_label_1"] = testFixtures(1)
Expand Down
2 changes: 2 additions & 0 deletions pkg/osutils/filesystem/windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package filesystem_test

import (
"io/fs"
"syscall"
"testing"
"time"
Expand All @@ -27,6 +28,7 @@ import (
. "github.com/onsi/gomega"

"github.com/aspect-build/aspect-cli/pkg/osutils/filesystem"
filesystem_mock "github.com/aspect-build/aspect-cli/pkg/osutils/filesystem/mock"
stdlib_mock "github.com/aspect-build/aspect-cli/pkg/stdlib/mock"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/system/besproxy/bes_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (bp *besProxy) Send(req *buildv1.PublishBuildToolEventStreamRequest) error
}

// If we want to mutate the BES events in the future before they are sent out to external consumers, this is the place
// to do it. See https://github.com/aspect-build/silo/blob/7f13ab16fa10ffcec71b09737f0370f22a508823/pkg/plugin/system/besproxy/bes_proxy.go#L103
// to do it. See https://github.com/aspect-build/silo/blob/7f13ab16fa10ffcec71b09737f0370f22a508823/cli/core/pkg/plugin/system/besproxy/bes_proxy.go#L103
// as an example.

return bp.stream.Send(req)
Expand Down
Loading