Skip to content

Commit

Permalink
pw_async_basic: Remove includes attribute
Browse files Browse the repository at this point in the history
Also fix layering check issues while we're at it.

Bug: 378564135
Change-Id: Idb47e4d22a13fdb92ae2db3590a664fabe6fbace
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/261792
Pigweed-Auto-Submit: Ted Pudlik <[email protected]>
Lint: Lint 🤖 <[email protected]>
Docs-Not-Needed: Ted Pudlik <[email protected]>
Reviewed-by: Dave Roth <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
tpudlik authored and CQ Bot Account committed Jan 22, 2025
1 parent 903fc53 commit 57c1c31
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 13 deletions.
45 changes: 34 additions & 11 deletions pw_async_basic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test")

package(
default_visibility = ["//visibility:public"],
features = ["-layering_check"],
)

licenses(["notice"])
Expand All @@ -27,15 +26,24 @@ licenses(["notice"])
cc_library(
name = "task",
hdrs = [
"public/pw_async_basic/task.h",
"public_overrides/pw_async_backend/task.h",
],
includes = [
"public",
"public_overrides",
strip_include_prefix = "public_overrides",
deps = [
":task_private",
],
)

cc_library(
name = "task_private",
hdrs = [
"public/pw_async_basic/task.h",
],
strip_include_prefix = "public",
visibility = ["//visibility:private"],
deps = [
"//pw_async:task.facade",
"//pw_async:types",
"//pw_chrono:system_clock",
"//pw_containers:intrusive_list",
],
)
Expand All @@ -46,20 +54,30 @@ cc_library(
testonly = True,
srcs = ["fake_dispatcher.cc"],
hdrs = [
"public/pw_async_basic/fake_dispatcher.h",
"public_overrides/pw_async_backend/fake_dispatcher.h",
],
includes = [
"public",
"public_override",
],
strip_include_prefix = "public_overrides",
deps = [
":fake_dispatcher_private",
"//pw_async:fake_dispatcher.facade",
"//pw_async:task",
"//pw_log",
],
)

cc_library(
name = "fake_dispatcher_private",
testonly = True,
hdrs = [
"public/pw_async_basic/fake_dispatcher.h",
],
strip_include_prefix = "public",
visibility = ["//visibility:private"],
deps = [
"//pw_async:fake_dispatcher.facade",
],
)

pw_cc_test(
name = "fake_dispatcher_fixture_test",
srcs = ["fake_dispatcher_fixture_test.cc"],
Expand All @@ -74,8 +92,10 @@ cc_library(
deps = [
"//pw_async:dispatcher",
"//pw_async:task",
"//pw_chrono:system_clock",
"//pw_containers:intrusive_list",
"//pw_sync:interrupt_spin_lock",
"//pw_sync:lock_annotations",
"//pw_sync:timed_thread_notification",
"//pw_thread:thread_core",
],
Expand All @@ -88,9 +108,12 @@ pw_cc_test(
target_compatible_with = incompatible_with_mcu(),
deps = [
":dispatcher",
"//pw_chrono:system_clock",
"//pw_log",
"//pw_span",
"//pw_sync:thread_notification",
"//pw_thread:thread",
"//pw_thread_stl:thread",
],
)

Expand Down
2 changes: 0 additions & 2 deletions pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,8 +1501,6 @@ def owners_lint_checks(ctx: PresubmitContext):
INCLUDE_CHECK_EXCEPTIONS = (
# keep-sorted: start
"//pw_assert_log:check_and_assert_backend",
"//pw_async_basic:fake_dispatcher",
"//pw_async_basic:task",
"//pw_async_fuchsia:dispatcher",
"//pw_async_fuchsia:fake_dispatcher",
"//pw_async_fuchsia:task",
Expand Down

0 comments on commit 57c1c31

Please sign in to comment.