Implement no_linkage DSL to cover dependencies without linkage
#20807
+83
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementation of
no_linkageDSLImplements the
no_linkagedependency tag to identify runtime dependencies without linkage. The agreed-upon syntax isdepends_on "cryptography" => :no_linkage.Changes Implemented:
:no_linkageto the RESERVED_TAGS independable.rbno_linkage?method toDependablemoduleLinkageChecker#check_formula_depsto filter out:no_linkagedependenciesLinkageChecker#display_normal_outputto show no_linkage dependencies separatelyBehavior:
:no_linkageare treated as runtime dependencies:no_linkagedependency, it is reported as "Unexpected linkage for no_linkage dependencies" and fails in strict modeExample Usage:
Output Example:
This feature helps maintainers ensure that all dependencies are used correctly, closing the loop on dependency auditing by explicitly marking runtime dependencies that don't require linkage.
Fixes #19697
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.