-
Notifications
You must be signed in to change notification settings - Fork 0
No space left on disk alert #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,51 +3,92 @@ | |
|
|
||
| import PackageDescription | ||
|
|
||
| var products: [Product] = [] | ||
| var targets: [Target] = [ | ||
| .target( | ||
| name: "TimelineCore", | ||
| dependencies: [], | ||
| path: "TimelineCore/", | ||
| sources: [ | ||
| "Alerts.swift", | ||
| "Logic/FilteredAppsStorage.swift", | ||
| "Logic/PureAlignedTimer.swift", | ||
| "Logic/PureCounter.swift", | ||
| "Logic/Tracker.swift", | ||
| "Storage/Model.swift", | ||
| "Storage/Storage.swift" | ||
| ]), | ||
| .target( | ||
| name: "testing_utils", | ||
| dependencies: ["TimelineCore"], | ||
| path: "testing-utils/"), | ||
| .testTarget( | ||
| name: "TimelineCoreTests", | ||
| dependencies: ["TimelineCore", "testing_utils"], | ||
| path: "TimelineCoreTests/"), | ||
| ] | ||
|
|
||
| var dependencies: [Package.Dependency] = [ | ||
| .package(url: "https://github.com/stephencelis/CSQLite.git", from: "0.0.3"), | ||
| .package(url: "https://github.com/stephencelis/SQLite.swift.git", "0.13.3"..<"0.14.0"), | ||
| ] | ||
|
|
||
| targets.append( | ||
| .target( | ||
| name: "SQLiteStorage", | ||
| dependencies: [ | ||
| "TimelineCore", | ||
| .product(name: "SQLite", package: "SQLite.swift"), | ||
| .product(name: "CSQLite", package: "CSQLite"), | ||
| ], | ||
| path: "SQLiteStorage/") | ||
| ) | ||
|
|
||
| #if os(macOS) | ||
| products.append(.executable(name: "Timeline-macOS", targets: ["TimelineCocoa"])) | ||
| targets.append( | ||
| .executableTarget( | ||
|
Comment on lines
+47
to
+50
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why to conditionalize it script-like instead of declarative style? This has drawback that on each platform it's going to basically be a different package file, resulting in a different Package.resolved lockfile, causing endless git diff and potential conflicts |
||
| name: "TimelineCocoa", | ||
| dependencies: ["TimelineCore", "SQLiteStorage"], | ||
| path: "macOS/", | ||
| sources: [ | ||
| "AppDelegate.swift", | ||
| "CocoaApps.swift", | ||
| "CocoaTime.swift", | ||
| "Date+Extensions.swift", | ||
| "main.swift", | ||
| "StatisticsView.swift", | ||
| "CocoaAlerter.swift" | ||
| ], | ||
| resources: [ | ||
| .copy("macOS.entitlements"), | ||
| .copy("timeline--macOS--Info.plist"), | ||
| ]) | ||
| ) | ||
| #endif | ||
|
|
||
| #if os(Linux) | ||
| dependencies.append(.package(url: "https://github.com/aestesis/X11.git", branch: "master")) | ||
| products.append(.executable(name: "Timeline-linux", targets: ["TimelineLinux"])) | ||
| targets.append( | ||
| .executableTarget( | ||
| name: "TimelineLinux", | ||
| dependencies: ["TimelineCore", "SQLiteStorage", "X11"], | ||
| path: "linux/", | ||
| sources: [ | ||
| "main.swift", | ||
| "X11Apps.swift", | ||
| "LinuxAlerter.swift" | ||
| ]) | ||
| ) | ||
| #endif | ||
|
|
||
| let package = Package( | ||
| name: "timeline", | ||
| platforms: [ | ||
| .macOS(.v12) | ||
| ], | ||
| products: [ | ||
| .executable(name: "Timeline-macOS", targets: ["TimelineCocoa"]), | ||
| .executable(name: "Timeline-linux", targets: ["TimelineLinux"]), | ||
| ], | ||
| dependencies: [ | ||
| .package(url: "https://github.com/stephencelis/SQLite.swift.git", "0.13.3"..<"0.14.0"), | ||
| .package(url: "https://github.com/aestesis/X11.git", branch: "master"), | ||
| ], | ||
| targets: [ | ||
| .target( | ||
| name: "TimelineCore", | ||
| dependencies: [], | ||
| path: "TimelineCore/"), | ||
| .target( | ||
| name: "SQLiteStorage", | ||
| dependencies: [ | ||
| "TimelineCore", | ||
| .product(name: "SQLite", package: "SQLite.swift"), | ||
| ], | ||
| path: "SQLiteStorage/"), | ||
| .target( | ||
| name: "testing_utils", | ||
| dependencies: ["TimelineCore"], | ||
| path: "testing-utils/"), | ||
| .testTarget( | ||
| name: "TimelineCoreTests", | ||
| dependencies: ["TimelineCore", "testing_utils"], | ||
| path: "TimelineCoreTests/"), | ||
| .executableTarget( | ||
| name: "TimelineCocoa", | ||
| dependencies: ["TimelineCore", "SQLiteStorage"], | ||
| path: "macOS/", | ||
| resources: [ | ||
| .copy("macOS/macOS.entitlements"), | ||
| .copy("macOS/timeline--macOS--Info.plist"), | ||
| ]), | ||
| .executableTarget( | ||
| name: "TimelineLinux", | ||
| dependencies: ["TimelineCore", "SQLiteStorage", "X11"], | ||
| path: "linux/"), | ||
| ] | ||
| products: products, | ||
| dependencies: dependencies, | ||
| targets: targets | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import Foundation | ||
|
|
||
| public protocol Alerter { | ||
| func showAlert(title: String, message: String) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to not have every source file to be listed in the package file