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

[Bug]: Documentation fails to mention any of the required bazel build targets. #1809

Closed
ywrt opened this issue Jan 19, 2025 · 1 comment
Closed

Comments

@ywrt
Copy link

ywrt commented Jan 19, 2025

Describe the issue

It's extremely unclear for the ABSL/bazel novice user as to how to actually get a working compile because the documentation never mentions what dependencies should be added to the BUILD file.

eg. I just wanted to add a flag, but it took more than an hour of stumbling my way through the various cryptic error messages to eventually discover that I needed to add "@abseil-cpp//absl/flags:parse" to the cc_binary deps. I note that this string is entirely absent from the https://abseil.io/docs/cpp/guides/flags page, and googling for "flags:parse" turns up nothing.

So I'm still unsure if I have the right build dependency, or if it just happens to 'work' by chance!

I'm unable to find a list of the recommended targets anywhere, nor does the https://github.com/abseil/abseil-cpp/blob/master/absl/flags/BUILD.bazel have any comments mentioning the recommended target (or indeed, documentation for any of the targets!).

Steps to reproduce the problem

Be a novice, try to write hello world with one flag.

What version of Abseil are you using?

20240722.0.bcr.2

What operating system and version are you using?

Ubuntu 24

What compiler and version are you using?

clang-18

What build system are you using?

bazel 8.0.1

Additional context

No response

@derekmauro
Copy link
Member

There is no such thing as a "recommended target".

If you want to call a function or use an object that is declared in foo.h, you need to #include "foo.h", then look at the build file and figure out which rule lists foo.h in hdrs, and list that as a direct dependency of the module in which it is used.

@derekmauro derekmauro closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants