From 6483649b87288bf87152bad071f4658e1c4faea5 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Mon, 8 Apr 2024 14:40:30 -0700 Subject: [PATCH] Avoid caching a PrivacyConfig instance in FeatureFlagger (#2561) Task/Issue URL: https://app.asana.com/0/414235014887631/1206053496104935/f Tech Design URL: CC: Description: This PR updates FeatureFlagger to no longer cache a PrivacyConfig. --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- DuckDuckGo/Application/AppDelegate.swift | 6 ++++-- LocalPackages/DataBrokerProtection/Package.swift | 2 +- LocalPackages/NetworkProtectionMac/Package.swift | 2 +- LocalPackages/SubscriptionUI/Package.swift | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 8391b71c55..f32dde62b9 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -14434,7 +14434,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 132.0.2; + version = 133.0.0; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ad6675f775..46c657c96d 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "revision" : "5199a6964e183c3d001b188286bbabeca93c8849", - "version" : "132.0.2" + "revision" : "c0b0cb55e7ac2f69d10452e1a5c06713155d798e", + "version" : "133.0.0" } }, { diff --git a/DuckDuckGo/Application/AppDelegate.swift b/DuckDuckGo/Application/AppDelegate.swift index c0307baaa8..22cc5ea79e 100644 --- a/DuckDuckGo/Application/AppDelegate.swift +++ b/DuckDuckGo/Application/AppDelegate.swift @@ -179,8 +179,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate { AppPrivacyFeatures.shared = AppPrivacyFeatures(contentBlocking: AppContentBlocking(internalUserDecider: internalUserDecider), database: Database.shared) #endif - featureFlagger = DefaultFeatureFlagger(internalUserDecider: internalUserDecider, - privacyConfig: AppPrivacyFeatures.shared.contentBlocking.privacyConfigurationManager.privacyConfig) + featureFlagger = DefaultFeatureFlagger( + internalUserDecider: internalUserDecider, + privacyConfigManager: AppPrivacyFeatures.shared.contentBlocking.privacyConfigurationManager + ) #if SUBSCRIPTION #if APPSTORE || !STRIPE diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index e4c234a04f..46c094664b 100644 --- a/LocalPackages/DataBrokerProtection/Package.swift +++ b/LocalPackages/DataBrokerProtection/Package.swift @@ -29,7 +29,7 @@ let package = Package( targets: ["DataBrokerProtection"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "132.0.2"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "133.0.0"), .package(path: "../PixelKit"), .package(path: "../SwiftUIExtensions"), .package(path: "../XPCHelper"), diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index ad0b87534e..d0ea0235c3 100644 --- a/LocalPackages/NetworkProtectionMac/Package.swift +++ b/LocalPackages/NetworkProtectionMac/Package.swift @@ -31,7 +31,7 @@ let package = Package( .library(name: "NetworkProtectionUI", targets: ["NetworkProtectionUI"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "132.0.2"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "133.0.0"), .package(path: "../XPCHelper"), .package(path: "../SwiftUIExtensions"), .package(path: "../LoginItems"), diff --git a/LocalPackages/SubscriptionUI/Package.swift b/LocalPackages/SubscriptionUI/Package.swift index e055893291..556d4f308e 100644 --- a/LocalPackages/SubscriptionUI/Package.swift +++ b/LocalPackages/SubscriptionUI/Package.swift @@ -12,7 +12,7 @@ let package = Package( targets: ["SubscriptionUI"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "132.0.2"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "133.0.0"), .package(path: "../SwiftUIExtensions") ], targets: [