Brings in:
- The `RulesEngine` → `RulesEngineInternal` module rename from #6787.
- The `no_leaking_rules_engine_internal_import` SwiftLint rule update from #6788.
- Plus the `main`-merge cascade carried by #6788.
Conflicts resolved:
- `RulesEngineInternal/RulesEngineInternal.swift`: kept this branch's
`Rules.logger` / `LoggerStorage` storage, dropped the
`@_spi(Internal)` marker on `public enum Rules` (since #6787 dropped
those markers; the new SwiftLint rule replaces that gate).
- `RevenueCat.xcodeproj/project.pbxproj`: kept this branch's full file
list (Evaluator, Logger, Value, RuleError, Operators/*, plus the new
test files and helpers), then applied the producer-side rename to
every `RulesEngine\b` / `RulesEngineTests\b` token (target name,
group name, path, productName, bundle IDs `com.revenuecat.RulesEngineInternal[Tests]`,
framework / xctest output names, and the `RulesEngine.swift` → `RulesEngineInternal.swift`
file ref).
Other rename follow-ups in this branch's added files:
- `Tests/RulesEngineInternalTests/*.swift` (8 files) — every
`[@_spi(Internal) ]@testable import RulesEngine` updated to
`@testable import RulesEngineInternal`. The `@_spi(Internal)`
attribute is no longer needed because the producer no longer uses
SPI markers.
- `Projects/RulesEngineInternal/`, `RulesEngineInternal/`, and
`Tests/RulesEngineInternalTests/` directories were moved
automatically by git's directory-rename detection (15 file renames).
Left intentionally unchanged:
- `RulesEngineInternal/Logger.swift` — the development-only
`PrintLogger` keeps its `[RulesEngine]` log prefix because that
string identifies the subsystem (the rules engine) for log readers,
not the producer-side module name. The injected production logger
replaces this struct entirely once the engine is wired into the SDK,
so the prefix is throwaway.
- `RulesEngineLogger` protocol name — internal type name within the
module, not part of the import-site signal that motivated the
module rename.
- The `Rules` namespace name — separate identifier from the module
name, kept stable so call sites still write `Rules.something`.
Verified locally:
- `swift build --target RulesEngineInternal` ✔
- `swift test --filter RulesEngineInternalTests` ✔ — 75 tests passed
- `xcodebuild -scheme RulesEngineInternal -destination 'generic/platform=iOS' build` ✔
- `swiftlint --no-cache` ✔ — 0 violations across 1332 files
- `git ls-files | xargs perl -ne 'if (/\bRulesEngine\b/ && !/RulesEngineInternal/) { ... }'` returns only the `[RulesEngine]` log prefix mentioned above.
Co-authored-by: Cursor <cursoragent@cursor.com>