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

[bazel.build] Problem with /reference/be/c-cpp #20504

Closed
tcm0116 opened this issue Dec 12, 2023 · 1 comment
Closed

[bazel.build] Problem with /reference/be/c-cpp #20504

tcm0116 opened this issue Dec 12, 2023 · 1 comment
Labels
team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Rules-CPP Issues for C++ rules type: documentation (cleanup) untriaged

Comments

@tcm0116
Copy link

tcm0116 commented Dec 12, 2023

Page link:

https://bazel.build/reference/be/c-cpp

Problem description (include actual vs expected text, if applicable):

The documentation is relevant for only the latest version of Bazel. However, many users of Bazel are not using the most recent version for various reasons. As such, it is impossible to know from the documentation what features are supported by the version of Bazel being used. For example, the additional_linker_inputs attribute was added to cc_library in version 6.4.0 (via this PR), but a user with an older version of Bazel can only determine this by attempting to use the attribute and the receiving an error indicating that no such attribute 'additional_linker_inputs' in 'cc_library' rule.

It would be great if the various features could indicate the minimum required Bazel version. As an example, the description for the additional_linker_inputs attribute could be modified to be:

List of labels; default is []

Pass these files to the C++ linker command.
For example, compiled Windows .res files can be provided here to be embedded in the binary target.

Requires Bazel 6.4.0 or later.

Where do you see this issue? (include link to specific section of the page, if applicable)

For the additional_linker_inputs example given, the issue is in the Attributes table within the Arguments section.

Any other information you'd like to share?

If implemented, this suggestion should be applied to all Bazel documentation.

@tcm0116 tcm0116 added team-Documentation Documentation improvements that cannot be directly linked to other team labels type: documentation (cleanup) untriaged labels Dec 12, 2023
@sgowroji sgowroji added the team-Rules-CPP Issues for C++ rules label Dec 12, 2023
@fmeum
Copy link
Collaborator

fmeum commented Dec 12, 2023

While hard to find, the docs are actually versioned (look for a Version drop-down in the top-level navigation bar). The default is the current state of the main branch, which isn't ideal but likely subject to change soon.

@Wyverald Wyverald closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Rules-CPP Issues for C++ rules type: documentation (cleanup) untriaged
Projects
None yet
Development

No branches or pull requests

6 participants