bazelbuild / stardoc

Stardoc: Starlark Documentation Generator
Apache License 2.0
108 stars 45 forks source link

Merge user-defined tags with default tags in stardoc macro #247

Closed yashathwani closed 3 months ago

yashathwani commented 3 months ago

Description

This pull request introduces changes to the stardoc macro to enhance its functionality by including user-defined tags in auxiliary targets. Previously, auxiliary targets only included default tags, and there was no way to specify additional tags.

Changes Made

  1. Tag Handling:

    • Update: Modified the stardoc macro to merge user-defined tags with default tags for auxiliary targets.
    • Default Behavior: By default, auxiliary targets receive the ["manual"] tag.
    • User-defined Tags: If user-defined tags are provided, they are appended to the default tag list.
  2. Code Modifications:

    • File Updated: stardoc/stardoc.bzl
    • Details: Added logic to handle the merging of tags in the stardoc macro. Ensured that user-defined tags are correctly combined with default tags before being applied to auxiliary targets.

Fixes #245

yashathwani commented 3 months ago

@tetromino @evan-flynn-apexai I have made the requested changes please have a look !!

yashathwani commented 3 months ago

@tetromino Thank you for your feedback on the tag merging logic. I've implemented your suggestion to merge the tags from kwargs without duplicating "manual" and pushed the changes.Please let me know if there are any further adjustments needed.