Skip to content

Commit 2bf8b3f

Browse files
committed
refactor to reduce public api surface and more tightly scope names
This is a large-ish refactor to reduce the public API surface. Types that are only needed within package scope were changed to reflect that. Public names that might cause conflicts in the importing side have been grouped into a new `OPA` namespace enum. This change also begins documentation efforts using DocC. Other changes are included to make the API more idiomatic. * with/and * store: read(from:) and write(to:) * withCtx -> withContext * init(fromJson:) -> init(jsonData:) * defaultBuiltinRegistry -> static property * BuiltinContext -> internal * RegoValue type helpers -> package scope * BuiltinsCache -> internal * EvaluationContext -> internal * unify error types under RegoError * qualify Swift.Error * Error -> Swift.Error * StoreError -> RegoError * rework BuiltinError in terms of RegoError, leaving adapters * package visibility for ValueError * remove EncodingError and incomplete encode methods * prettyPrint(out:) -> prettyPrint(to:) * prepareForEval->prepareForEvaluation * RegoValue patch/merge, RegoEncodingError -> package visibility * integrate functiondecl code from capabilities branch * rename swift-rego -> swift-opa * remove benchmarks - will return when further built out * rename Bundle -> OPABundle to avoid name collisions * remove unused Runtime module * public -> internal CodingKeys * update README.md * remove unused StatementError * OPABundle -> OPA.Bundle * Manifest -> OPA.Manifest * add documentation tags for some top-level types * Engine -> OPA.Engine * InMemStore -> OPA.InMemStore * group tracing types under OPA.Trace * BuiltinError -> enum Signed-off-by: Oren Shomron <[email protected]>
1 parent 947b7e5 commit 2bf8b3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1309
-2264
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.DS_Store
2-
/.build
2+
.build
33
/Packages
44
xcuserdata/
55
DerivedData/

Benchmarks/RegoBenchmarks/RegoBenchmarks.swift

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)