Skip to content

deps+CLI: Begin using traits + make CLI optional. - #194

Open
philipaconrad wants to merge 1 commit into
open-policy-agent:mainfrom
philipaconrad:philip/optional-dependencies-via-traits
Open

deps+CLI: Begin using traits + make CLI optional.#194
philipaconrad wants to merge 1 commit into
open-policy-agent:mainfrom
philipaconrad:philip/optional-dependencies-via-traits

Conversation

@philipaconrad

Copy link
Copy Markdown
Member

What code changed, and why?

This commit begins our usage of package traits for the library, and opens the door for future addition of external library use while still supporting a nearly dependency-free core profile for VM-only users.

In this commit, we introduce a CLI trait, which we use to enable building the CLI target/product for Swift OPA. It also gates the swift-argument-parser library dependency, allowing VM only users to drop that dependency from their builds through traits.

Resolves: #190

How to test

  • New CI target ensures we never break the "no traits" minimal build.

Related Resources

This commit begins our usage of package traits for the library, and opens
the door for future addition of external library use while still supporting
a nearly dependency-free core profile for VM-only users.

In this commit, we introduce a `CLI` trait, which we use to enable building
the CLI target/product for Swift OPA. It also gates the
swift-argument-parser library dependency, allowing VM only users to drop
that dependency from their builds through traits.

Signed-off-by: Philip Conrad <philip_conrad@apple.com>
@philipaconrad philipaconrad self-assigned this Aug 13, 2026
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.

Trait-ification of the library

1 participant