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

Fix "emebed" to "embed" #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions cc_embed_data/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cc_flags_supplier(
)

cc_binary(
name = "make_emebed_data",
srcs = ["make_emebed_data.cc"],
name = "make_embed_data",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a deprecated alias to in place of the old rule.
https://docs.bazel.build/versions/main/be/general.html#alias

Include in the deprecation message a short explanation of this change. ... That is assuming that the deprecation message gets printed before Bazel errors out due to something depending on the renamed files. If it usually fails that way, just say so here and no need to bother.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity: from where did you find this library?

srcs = ["make_embed_data.cc"],
visibility = ["//visibility:public"],
deps = [
"@com_google_absl//absl/flags:flag",
Expand All @@ -47,6 +47,6 @@ cc_binary(
)

build_test(
name = "make_emebed_data_test",
targets = [":make_emebed_data"],
)
name = "make_embed_data_test",
targets = [":make_embed_data"],
)
2 changes: 1 addition & 1 deletion cc_embed_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main() {
for (const auto& i : my_namespace::EmbedIndex()) {
Use(i.first, i.second);
}

return 0;
}

Expand Down
12 changes: 6 additions & 6 deletions cc_embed_data/cc_embed_data.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ def cc_embed_data(name = None, srcs = None, namespace = None):
if not name:
fail("name must be provided")

cc = name + "_emebed_data.cc"
h = name + "_emebed_data.h"
o = name + "_emebed_data.o"
cc = name + "_embed_data.cc"
h = name + "_embed_data.h"
o = name + "_embed_data.o"

PREFIX = "$$(dirname $(rootpath %s) | sed 's|[^0-9A-Za-z]|_|g')_%s" % (cc, name)

native.genrule(
name = name + "_make_emebed_src",
name = name + "_make_embed_src",
outs = [cc, h],
srcs = srcs,
tools = ["@bazel_rules//cc_embed_data:make_emebed_data"],
tools = ["@bazel_rules//cc_embed_data:make_embed_data"],
cmd = " ".join([
"$(location @bazel_rules//cc_embed_data:make_emebed_data)",
"$(location @bazel_rules//cc_embed_data:make_embed_data)",
"--h=$(location %s)" % (h),
"--cc=$(location %s)" % (cc),
"--gendir=$(GENDIR)",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/cc_embed_data_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "tests/cc_embed_data_example_emebed_data.h"
#include "tests/cc_embed_data_example_embed_data.h"

namespace {

Expand Down