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

cmd/build+compile: allow opt-out of dependents gathering #5038

Merged
merged 2 commits into from
Aug 23, 2022

Commits on Aug 23, 2022

  1. compile: allow opt-out of dependents gathering

    With `.WithPruneUnused(true)`, the compiler (of the compile package) no longer
    collects dependents of its entrypoints.
    
    The resulting bundle, if used with the wasm target, will no longer be
    semantically equivalent to the bundle built with the rego target.
    
    Since we're unable to have entrypoints for functions, this allows building
    modules that we couldn't build before. See open-policy-agent#5035.
    
    Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
    srenatus committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    a35ac17 View commit details
    Browse the repository at this point in the history
  2. cmd/build: expose new configurable via --prune-unused

    Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
    srenatus committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    af5de64 View commit details
    Browse the repository at this point in the history