pw_span: Temporary workaround for pw::span migration
Provide both pw::span and std::span from //pw_span to simplify the
migration.
Change-Id: I2734a2789270fe075242cfcf4e3f32d52edc8466
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/99544
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
diff --git a/pw_span/BUILD.bazel b/pw_span/BUILD.bazel
index be16639..a138c28 100644
--- a/pw_span/BUILD.bazel
+++ b/pw_span/BUILD.bazel
@@ -44,6 +44,9 @@
"public_overrides",
],
deps = [
+ # Temporarily provide pw::span in this target to support the migration
+ # from std::span to pw::span.
+ ":pigweed_span",
"//pw_polyfill",
"//pw_polyfill:standard_library",
],
diff --git a/pw_span/BUILD.gn b/pw_span/BUILD.gn
index 0bc22cc..09eb637 100644
--- a/pw_span/BUILD.gn
+++ b/pw_span/BUILD.gn
@@ -31,6 +31,7 @@
}
pw_source_set("pw_span") {
+ remove_public_deps = [ "*" ]
public = [ "public/pw_span/span.h" ]
public_configs = [ ":public_config" ]
public_deps = [ dir_pw_polyfill ]
@@ -52,7 +53,12 @@
":public_config",
":overrides_config",
]
- public_deps = [ dir_pw_polyfill ]
+ public_deps = [
+ # Temporarily provide pw::span in this target to support the migration
+ # from std::span to pw::span.
+ ":pw_span",
+ dir_pw_polyfill,
+ ]
# Polyfill <cstddef> (std::byte) and <iterator> (std::size(), std::data) if
# C++17 is not supported.