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

javadoc: Allow javadoc targets to reference other javadoc targets #958

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

fmeum
Copy link
Member

@fmeum fmeum commented Sep 11, 2023

By setting the doc_url attribute on a javadoc target, other targets can depend on it via doc_deps and have references resolved automatically via appropriate -linkoffline arguments passed to javadoc.

By setting the `doc_url` attribute on a `javadoc` target, other targets
can depend on it via `doc_deps` and have references resolved
automatically via appropriate `-linkoffline` arguments passed to
javadoc.
@fmeum
Copy link
Member Author

fmeum commented Sep 11, 2023

@shs96c Happy to bikeshed any of the new API bits. I briefly considered merging doc_deps into deps, but that felt too magical.

@shs96c
Copy link
Collaborator

shs96c commented Sep 11, 2023

I'm about to head to TPAC soon, so it's going to take a few days to get to do a proper review of this, but it seems fine from a quick scan. I do appreciate minimal magic in rulesets, so not merging doc_deps and deps is a good choice to have made.

Copy link
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me. Would have been nice to have a test, but we can add that in a later PR.

@@ -113,7 +121,10 @@ def maven_export(
tags = [],
testonly = False,
javadocopts = [],
classifier_artifacts = {}):
classifier_artifacts = {},
*,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I've not seen this syntax before. How interesting. Do we need this? The tests pass, so I guess it's fine, if a little odd.

Copy link
Member Author

Choose a reason for hiding this comment

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

This syntax enforces that all arguments that come after it are only passed as keyword arguments, not positional arguments. I usually use it for functions that have more than say two keyword parameters, just to guard against accidentally passing in unexpected arguments positionally.

@shs96c shs96c merged commit 643e558 into bazel-contrib:master Sep 29, 2023
1 check passed
@fmeum fmeum deleted the javadoc-linkoffline branch September 29, 2023 16:51
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

Successfully merging this pull request may close these issues.

2 participants