Skip to content

Commit

Permalink
Fix ConfidentialKit inconsistently imported as implementation-only
Browse files Browse the repository at this point in the history
  • Loading branch information
mgutski committed Sep 2, 2023
1 parent 0b3ff22 commit 137e5eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ private extension ImportDeclParser {
.compactMap { namespace -> String? in
guard
case let .extend(_, moduleName) = namespace,
let moduleName = moduleName
let moduleName = moduleName,
moduleName != C.Code.Generation.confidentialKitModuleName
else {
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ final class ImportDeclParserTests: XCTestCase {
func test_givenImplementationOnlyImportDisabled_whenParse_thenReturnsExpectedImportDeclStatementsAndInputLeftIntact() throws {
// given
let secrets: SourceSpecification.Secrets = [
.extend(identifier: "Obfuscation.Secret", moduleName: C.Code.Generation.confidentialKitModuleName): [
.StubFactory.makeInternalSecret()
],
.extend(identifier: "Pinning", moduleName: customModuleNameStub): [
.StubFactory.makePublicSecret(named: "secret1"),
.StubFactory.makePublicSecret(named: "secret2")
Expand Down Expand Up @@ -46,6 +49,9 @@ final class ImportDeclParserTests: XCTestCase {
func test_givenImplementationOnlyImportEnabled_whenParse_thenReturnsExpectedImportDeclStatementsAndInputLeftIntact() throws {
// given
let secrets: SourceSpecification.Secrets = [
.extend(identifier: "Obfuscation.Secret", moduleName: C.Code.Generation.confidentialKitModuleName): [
.StubFactory.makeInternalSecret()
],
.extend(identifier: "Pinning", moduleName: customModuleNameStub): [
.StubFactory.makeInternalSecret()
]
Expand Down

0 comments on commit 137e5eb

Please sign in to comment.