Skip to content

Add imports required to compile Keystone for testing #24537

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 5 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ steps:
context: "Reader Unit Tests"
- label: "🔬 Keystone Unit Tests"
command: |
set -o pipefail
.buildkite/commands/shared-set-up.sh
xcodebuild \
-scheme Keystone \
-destination 'platform=iOS Simulator,OS=18.2,name=iPhone 16' \
-destination 'platform=iOS Simulator,OS=18.4,name=iPhone 16' \
test \
| xcbeautify
plugins: [$CI_TOOLKIT_PLUGIN]
Expand All @@ -116,10 +117,11 @@ steps:
context: "Unit Tests Keystone"
- label: "🔬 WordPressData Unit Tests"
command: |
set -o pipefail
.buildkite/commands/shared-set-up.sh
xcodebuild \
-scheme WordPressData \
-destination 'platform=iOS Simulator,OS=18.2,name=iPhone 16' \
-destination 'platform=iOS Simulator,OS=18.4,name=iPhone 16' \
test \
| xcbeautify
plugins: [$CI_TOOLKIT_PLUGIN]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData
import WordPressUI

final class ReaderHomeViewController: ReaderStreamViewController {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData

final class ReaderRootViewPresenter: RootViewPresenter {
let rootViewController: UIViewController = ReaderTabViewController()
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Extensions/Comment+Interface.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

/// Allows comment objects to be sectioned by relative date.
///
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Extensions/Media/ExportableAsset.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

@objc public protocol ExportableAsset: NSObjectProtocol {

Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Extensions/Media/NSURL+Exporters.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Foundation
import UniformTypeIdentifiers
import WordPressAPI
import WordPressKit

extension NSURL: ExportableAsset {
public var assetMediaType: MediaType {
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Extensions/Media/UIImage+Exporters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation
import UIKit
import ImageIO
import MobileCoreServices
import WordPressData

extension UIImage: ExportableAsset {

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Extensions/Post+BloggingPrompts.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension Post {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData

struct MigrationDependencyContainer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData
import WordPressKit

final class MigrationEmailService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData

class MigrationDoneViewController: UIViewController {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData

class DashboardMigrationSuccessCell: UICollectionViewCell, Reusable {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData

final class MigrationWelcomeViewModel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation
import UIKit
import SwiftUI
import DesignSystem
import WordPressData

struct ApplicationPasswordReAuthenticationView: View {
let blog: Blog
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/#/#WithUrlView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import SwiftUI
import AuthenticationServices
import WordPressAPI
import WordPressAuthenticator
import WordPressData
import DesignSystem
import WordPressShared

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/#/SelfHostedSiteAuthenticator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import WordPressAPI
import AutomatticTracks
import SwiftUI
import AuthenticationServices
import WordPressData
import WordPressKit
import WordPressAuthenticator
import WordPressShared
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/Blog/Blog+Analytics.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension Blog {
enum AnalyticsType: String {
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/Blog/Blog+Files.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import MobileCoreServices
import UniformTypeIdentifiers
import WordPressData

// MARK: - Support for Files-based functionality

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/Blog/Blog+History.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension Blog {

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/Blog/Blog+Organization.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension Blog {
var isAutomatticP2: Bool {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

/// In this extension, we implement several nested Enums (and helper setters / getters) aimed at simplifying
/// the BlogSettings interface for handling writing date and time format properties.
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Models/JetpackSiteRef.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import WordPressData

/// A reference to a site that uses the Jetpack API.
///
/// This type contains the site ID and account username as the minimum way to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UIKit
import CoreData
import WordPressData
import WordPressUI
import FormattableContentKit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

/// The goal of this class is to encapsulate all of the User's Notification Settings in a generic way.
/// Settings are grouped into different Channels. A Channel is considered anything that might produce
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

struct CommentNotification: LikeableNotification {

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/Plugin.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressKit

struct Plugin: Equatable {
let state: PluginState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension PublicizeConnection {

Expand Down
4 changes: 4 additions & 0 deletions WordPress/Classes/Models/PublicizeService+Lookup.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import CoreData
import WordPressData
import WordPressKit

extension PublicizeService {
/// Finds a cached `PublicizeService` matching the specified service name.
///
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/ReaderListTopic+Creation.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData
import WordPressShared

extension ReaderListTopic {
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/ReaderPost+Swift.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData
import WordPressUI

extension ReaderPost {
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Models/ReaderTagTopic+Lookup.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension ReaderTagTopic {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData
import WordPressUI

extension DiffAbstractValue {
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Networking/MediaHost+Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension MediaHost {

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Networking/WordPressClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Combine
import WordPressAPI
import WordPressAPIInternal
import WordPressCore
import WordPressData
import WordPressShared

extension WordPressClient {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension AccountService {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AutomatticTracks
import Foundation
import WordPressData
import WordPressKit

class AtomicAuthenticationService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData
import WordPressKit

struct BlogJetpackSettingsService {
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/BlogService+Domains.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

/// This extension is necessary because DomainsService is unavailable in ObjC.
///
Expand Down
4 changes: 4 additions & 0 deletions WordPress/Classes/Services/CommentService+Likes.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import Foundation
import WordPressData
import WordPressKit

extension CommentService {

/**
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Services/CommentService+Swift.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Foundation

/// Encapsulates actions related to fetching reply comments.
///
extension CommentService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData
import WordPressKit

/// Provides service remote instances for CommentService
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/FollowCommentsService.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData
import WordPressKit

class FollowCommentsService: NSObject {
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/HomepageSettingsService.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData
import WordPressKit

/// Service allowing updating of homepage settings
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/JetpackBackupService.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

class JetpackBackupService {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import WordPressData
import WordPressKit

@objc public class JetpackCapabilitiesService: NSObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData

protocol JetpackNotificationMigrationServiceProtocol {
func shouldPresentNotifications() -> Bool
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/JetpackRestoreService.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

class JetpackRestoreService {

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/JetpackScanService.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

class JetpackScanService {

Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Services/JetpackService.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import WordPressKit

/// Local service for Jetpack
///
class JetpackService {
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Services/LikeUserHelpers.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Foundation
import CoreData
import WordPressData
import WordPressKit

/// Helper class for creating LikeUser objects.
/// Used by PostService and CommentService when fetching likes for posts/comments.
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Services/MediaHelper.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import UIKit
import AsyncImageKit
import WordPressData
import WordPressKit

public class MediaHelper: NSObject {

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/MediaService.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

// MARK: - Factory

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation
import FormattableContentKit
import WordPressData

/// This service encapsulates all of the Actions that can be performed with a NotificationBlock
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation
import BuildSettingsKit
import WordPressData
import WordPressKit
import WordPressShared

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import UIKit
import BuildSettingsKit
import CoreData
import Gutenberg
import WordPressData
import WordPressKit
import WordPressShared

Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/Services/PageCoordinator.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressData

class PageCoordinator {
typealias TemplateSelectionCompletion = (_ layout: PageTemplateLayout?) -> Void
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Services/PluginJetpackProxyService.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import WordPressData

/// Plugin management service through the Jetpack Proxy.
///
class PluginJetpackProxyService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import WordPressData

extension PostCoordinator {
enum NotificationKey {
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Services/PostService+Likes.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import WordPressData

extension PostService {

/**
Expand Down
Loading