Skip to content

feat: add import_names attribute for per target dependency name override#671

Merged
aherrmann merged 1 commit into
mainfrom
import-names-attribute
Jun 18, 2026
Merged

feat: add import_names attribute for per target dependency name override#671
aherrmann merged 1 commit into
mainfrom
import-names-attribute

Conversation

@aherrmann

Copy link
Copy Markdown
Member

By default, a zig_library dependency is exposed under its name or import_name attribute value.
A consumer can set import_names = {":dep-label": "new-name"} to selectively change the import names of its dependencies.

@aherrmann

Copy link
Copy Markdown
Member Author

Motivation: Third-party dependencies sometimes alias dependency modules, or use anonymous modules which make import side module name control necessary, see #669.

@aherrmann aherrmann requested a review from cerisier June 17, 2026 09:44

@cerisier cerisier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, I wanted this too !

@aherrmann aherrmann merged commit db590af into main Jun 18, 2026
18 checks passed
@aherrmann aherrmann deleted the import-names-attribute branch June 18, 2026 15:26
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