Build Information
Successful build of agy-usage-stats, reference v1.1.91 (87af28), with Swift 6.2 for macOS (SPM) on 5 Nov 2026 18:53:46 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-26.3.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/sameerbajaj/agy-usage-stats.git
Reference: v1.1.91
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sameerbajaj/agy-usage-stats
* tag v1.1.91 -> FETCH_HEAD
HEAD is now at 87af28d test: decouple historical GCP attribution test from fixed calendar date
Cloned https://github.com/sameerbajaj/agy-usage-stats.git
Revision (git rev-parse @):
87af28d7362dce2b59705eb7d13c547bd36b0f28
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/sameerbajaj/agy-usage-stats.git at v1.1.91
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.2
Building package at path: $PWD
https://github.com/sameerbajaj/agy-usage-stats.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.3.0.app xcrun swift build --arch arm64
Building for debugging...
[0/7] Write sources
[0/7] Write agy-usage-stats-entitlement.plist
[2/7] Copying Assets.xcassets
[3/7] Write swift-version--3CB7CFEC50E0D141.txt
[5/26] Compiling agy_usage_stats SettingsTabView.swift
[6/26] Compiling agy_usage_stats StatsTabView.swift
[7/26] Compiling agy_usage_stats Styles.swift
[8/26] Compiling agy_usage_stats WorkspacesTabView.swift
[9/26] Compiling agy_usage_stats MenuBarPopover.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/OverviewTabView.swift:747:28: warning: value 'pinned' was defined but never used; consider replacing with boolean test [#no-usage]
745 | Spacer()
746 |
747 | if let pinned = pinnedBucket {
| `- warning: value 'pinned' was defined but never used; consider replacing with boolean test [#no-usage]
748 | Button {
749 | withAnimation(.spring(response: 0.2, dampingFraction: 0.8)) {
[10/26] Compiling agy_usage_stats OverviewTabView.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/OverviewTabView.swift:747:28: warning: value 'pinned' was defined but never used; consider replacing with boolean test [#no-usage]
745 | Spacer()
746 |
747 | if let pinned = pinnedBucket {
| `- warning: value 'pinned' was defined but never used; consider replacing with boolean test [#no-usage]
748 | Button {
749 | withAnimation(.spring(response: 0.2, dampingFraction: 0.8)) {
[11/28] Compiling agy_usage_stats agy_usage_statsApp.swift
[12/28] Compiling agy_usage_stats resource_bundle_accessor.swift
[13/28] Compiling agy_usage_stats ActivityTabView.swift
[14/28] Compiling agy_usage_stats AppTheme.swift
[15/28] Compiling agy_usage_stats AgyStatsService.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:352:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
350 |
351 | // Fast cache check: if history.jsonl, conversations dir, GCP dual-box files, and settings haven't changed today, return immediately
352 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
353 | if let cached = statsCache,
354 | cached.cliDir == expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:367:32: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
365 | cached.gcpConversationsSig == gcpConvSig {
366 | var cachedStats = cached.stats
367 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
368 |
369 | // Fetch fresh quota without blocking UI if already cached
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:377:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
375 | return (cachedStats, settings)
376 | }
377 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
378 |
379 | let tStart = ContinuousClock.now
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:733:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
731 | print("TIME: quotaInfo await = \(tQuota.duration(to: .now))")
732 |
733 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
734 | let previousCachedQuota = statsCache?.stats.quotaInfo
735 | statsCacheLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:735:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
733 | statsCacheLock.lock()
734 | let previousCachedQuota = statsCache?.stats.quotaInfo
735 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
736 | let quotaInfo = fetchedQuota ?? existingQuota ?? previousCachedQuota
737 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1247:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1245 | )
1246 |
1247 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1248 | statsCache = StatsCacheEntry(
1249 | cliDir: expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1263:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1261 | stats: stats
1262 | )
1263 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1264 |
1265 | let dAuth = tStart.duration(to: tHist)
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1723:85: warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1721 | for file in logFiles {
1722 | let fullPath = (logDir as NSString).appendingPathComponent(file)
1723 | guard let text = try? String(contentsOfFile: fullPath, encoding: .utf8) ?? String(contentsOfFile: fullPath, encoding: .ascii) else { continue }
| `- warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1724 |
1725 | let isConsumer = text.contains("authMethod=consumer") || text.contains("daily-cloudcode-pa.googleapis.com")
[16/28] Compiling agy_usage_stats SelfUpdater.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:352:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
350 |
351 | // Fast cache check: if history.jsonl, conversations dir, GCP dual-box files, and settings haven't changed today, return immediately
352 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
353 | if let cached = statsCache,
354 | cached.cliDir == expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:367:32: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
365 | cached.gcpConversationsSig == gcpConvSig {
366 | var cachedStats = cached.stats
367 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
368 |
369 | // Fetch fresh quota without blocking UI if already cached
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:377:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
375 | return (cachedStats, settings)
376 | }
377 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
378 |
379 | let tStart = ContinuousClock.now
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:733:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
731 | print("TIME: quotaInfo await = \(tQuota.duration(to: .now))")
732 |
733 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
734 | let previousCachedQuota = statsCache?.stats.quotaInfo
735 | statsCacheLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:735:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
733 | statsCacheLock.lock()
734 | let previousCachedQuota = statsCache?.stats.quotaInfo
735 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
736 | let quotaInfo = fetchedQuota ?? existingQuota ?? previousCachedQuota
737 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1247:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1245 | )
1246 |
1247 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1248 | statsCache = StatsCacheEntry(
1249 | cliDir: expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1263:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1261 | stats: stats
1262 | )
1263 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1264 |
1265 | let dAuth = tStart.duration(to: tHist)
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1723:85: warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1721 | for file in logFiles {
1722 | let fullPath = (logDir as NSString).appendingPathComponent(file)
1723 | guard let text = try? String(contentsOfFile: fullPath, encoding: .utf8) ?? String(contentsOfFile: fullPath, encoding: .ascii) else { continue }
| `- warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1724 |
1725 | let isConsumer = text.contains("authMethod=consumer") || text.contains("daily-cloudcode-pa.googleapis.com")
[17/28] Compiling agy_usage_stats UpdateChecker.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/UpdateChecker.swift:29:9: warning: code after 'return' will never be executed
27 | #endif
28 |
29 | if Bundle.main.bundlePath.contains("DerivedData") {
| `- warning: code after 'return' will never be executed
30 | return nil
31 | }
[18/28] Compiling agy_usage_stats AgyStatsViewModel.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/UpdateChecker.swift:29:9: warning: code after 'return' will never be executed
27 | #endif
28 |
29 | if Bundle.main.bundlePath.contains("DerivedData") {
| `- warning: code after 'return' will never be executed
30 | return nil
31 | }
[19/28] Compiling agy_usage_stats AgyFileWatcher.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:213:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
211 | public static func fetchQuota(forceRefresh: Bool = false) async -> AgyQuotaInfo? {
212 | if !forceRefresh {
213 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
214 | if let cached = cachedQuota {
215 | let ttl = cached.info != nil ? cacheTTL : nilCacheTTL
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:218:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
216 | if Date().timeIntervalSince(cached.timestamp) < ttl {
217 | let info = cached.info?.normalizedForCurrentTime()
218 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
219 | return info
220 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:222:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
220 | }
221 | }
222 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
223 | }
224 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:227:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
225 | return await Task.detached(priority: .userInitiated) {
226 | // Try last active port first if available
227 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
228 | let knownPort = lastActivePort
229 | quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:229:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
227 | quotaLock.lock()
228 | let knownPort = lastActivePort
229 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
230 |
231 | if let port = knownPort {
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:234:31: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
232 | if let info = await fetchFromPort(port), !info.groups.isEmpty {
233 | savePersistedQuota(info)
234 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
235 | cachedQuota = CachedQuota(info: info, timestamp: Date())
236 | quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:236:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
234 | quotaLock.lock()
235 | cachedQuota = CachedQuota(info: info, timestamp: Date())
236 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
237 | return info
238 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:244:27: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
242 | let portsToProbe = detectedPorts.filter { $0 != knownPort }
243 | guard !portsToProbe.isEmpty else {
244 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
245 | lastActivePort = nil
246 | let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:248:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
246 | let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
247 | cachedQuota = CachedQuota(info: fallback, timestamp: Date())
248 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
249 | return fallback
250 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:257:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
255 | }
256 |
257 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
258 | if let (port, info) = found {
259 | lastActivePort = port
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:261:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
259 | lastActivePort = port
260 | cachedQuota = CachedQuota(info: info, timestamp: Date())
261 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
262 | savePersistedQuota(info)
263 | return info
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:268:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
266 | let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
267 | cachedQuota = CachedQuota(info: fallback, timestamp: Date())
268 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
269 | return fallback
270 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:489:70: warning: reference to captured var 'summaryRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
487 |
488 | do {
489 | async let summaryTask = sharedLocalhostSession.data(for: summaryRequest)
| `- warning: reference to captured var 'summaryRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
490 | async let statusTask = sharedLocalhostSession.data(for: statusRequest)
491 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:490:69: warning: reference to captured var 'statusRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
488 | do {
489 | async let summaryTask = sharedLocalhostSession.data(for: summaryRequest)
490 | async let statusTask = sharedLocalhostSession.data(for: statusRequest)
| `- warning: reference to captured var 'statusRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
491 |
492 | let (summaryData, _) = try await summaryTask
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[20/28] Compiling agy_usage_stats AgyQuotaService.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:213:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
211 | public static func fetchQuota(forceRefresh: Bool = false) async -> AgyQuotaInfo? {
212 | if !forceRefresh {
213 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
214 | if let cached = cachedQuota {
215 | let ttl = cached.info != nil ? cacheTTL : nilCacheTTL
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:218:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
216 | if Date().timeIntervalSince(cached.timestamp) < ttl {
217 | let info = cached.info?.normalizedForCurrentTime()
218 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
219 | return info
220 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:222:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
220 | }
221 | }
222 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
223 | }
224 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:227:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
225 | return await Task.detached(priority: .userInitiated) {
226 | // Try last active port first if available
227 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
228 | let knownPort = lastActivePort
229 | quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:229:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
227 | quotaLock.lock()
228 | let knownPort = lastActivePort
229 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
230 |
231 | if let port = knownPort {
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:234:31: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
232 | if let info = await fetchFromPort(port), !info.groups.isEmpty {
233 | savePersistedQuota(info)
234 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
235 | cachedQuota = CachedQuota(info: info, timestamp: Date())
236 | quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:236:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
234 | quotaLock.lock()
235 | cachedQuota = CachedQuota(info: info, timestamp: Date())
236 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
237 | return info
238 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:244:27: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
242 | let portsToProbe = detectedPorts.filter { $0 != knownPort }
243 | guard !portsToProbe.isEmpty else {
244 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
245 | lastActivePort = nil
246 | let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:248:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
246 | let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
247 | cachedQuota = CachedQuota(info: fallback, timestamp: Date())
248 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
249 | return fallback
250 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:257:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
255 | }
256 |
257 | quotaLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
258 | if let (port, info) = found {
259 | lastActivePort = port
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:261:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
259 | lastActivePort = port
260 | cachedQuota = CachedQuota(info: info, timestamp: Date())
261 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
262 | savePersistedQuota(info)
263 | return info
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:268:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
266 | let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
267 | cachedQuota = CachedQuota(info: fallback, timestamp: Date())
268 | quotaLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
269 | return fallback
270 | }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:489:70: warning: reference to captured var 'summaryRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
487 |
488 | do {
489 | async let summaryTask = sharedLocalhostSession.data(for: summaryRequest)
| `- warning: reference to captured var 'summaryRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
490 | async let statusTask = sharedLocalhostSession.data(for: statusRequest)
491 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:490:69: warning: reference to captured var 'statusRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
488 | do {
489 | async let summaryTask = sharedLocalhostSession.data(for: summaryRequest)
490 | async let statusTask = sharedLocalhostSession.data(for: statusRequest)
| `- warning: reference to captured var 'statusRequest' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
491 |
492 | let (summaryData, _) = try await summaryTask
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[21/28] Compiling agy_usage_stats ContentView.swift
[22/28] Compiling agy_usage_stats AgyModels.swift
[23/28] Emitting module agy_usage_stats
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:352:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
350 |
351 | // Fast cache check: if history.jsonl, conversations dir, GCP dual-box files, and settings haven't changed today, return immediately
352 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
353 | if let cached = statsCache,
354 | cached.cliDir == expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:367:32: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
365 | cached.gcpConversationsSig == gcpConvSig {
366 | var cachedStats = cached.stats
367 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
368 |
369 | // Fetch fresh quota without blocking UI if already cached
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:377:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
375 | return (cachedStats, settings)
376 | }
377 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
378 |
379 | let tStart = ContinuousClock.now
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:733:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
731 | print("TIME: quotaInfo await = \(tQuota.duration(to: .now))")
732 |
733 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
734 | let previousCachedQuota = statsCache?.stats.quotaInfo
735 | statsCacheLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:735:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
733 | statsCacheLock.lock()
734 | let previousCachedQuota = statsCache?.stats.quotaInfo
735 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
736 | let quotaInfo = fetchedQuota ?? existingQuota ?? previousCachedQuota
737 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1247:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1245 | )
1246 |
1247 | statsCacheLock.lock()
| `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1248 | statsCache = StatsCacheEntry(
1249 | cliDir: expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
| `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1263:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1261 | stats: stats
1262 | )
1263 | statsCacheLock.unlock()
| `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1264 |
1265 | let dAuth = tStart.duration(to: tHist)
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
| `- note: 'unlock()' declared here
3 |
[24/28] Compiling agy_usage_stats CostTabView.swift
[25/28] Compiling agy_usage_stats HistoryTabView.swift
[25/28] Write Objects.LinkFileList
[26/28] Linking agy-usage-stats
[27/28] Applying agy-usage-stats
Build complete! (15.94s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "agy-usage-stats",
"name" : "agy-usage-stats",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "15.0"
}
],
"products" : [
{
"name" : "agy-usage-stats",
"targets" : [
"agy-usage-stats"
],
"type" : {
"executable" : null
}
}
],
"targets" : [
{
"c99name" : "agy_usage_statsTests",
"module_type" : "SwiftTarget",
"name" : "agy-usage-statsTests",
"path" : "agy-usage-statsTests",
"sources" : [
"AgyStatsServiceTests.swift",
"OverviewTabViewTests.swift",
"agy_usage_statsTests.swift"
],
"target_dependencies" : [
"agy-usage-stats"
],
"type" : "test"
},
{
"c99name" : "agy_usage_stats",
"module_type" : "SwiftTarget",
"name" : "agy-usage-stats",
"path" : "agy-usage-stats",
"product_memberships" : [
"agy-usage-stats"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Assets.xcassets",
"rule" : {
"process" : {
}
}
}
],
"sources" : [
"ContentView.swift",
"Models/AgyModels.swift",
"Services/AgyFileWatcher.swift",
"Services/AgyQuotaService.swift",
"Services/AgyStatsService.swift",
"Services/SelfUpdater.swift",
"Services/UpdateChecker.swift",
"ViewModels/AgyStatsViewModel.swift",
"Views/ActivityTabView.swift",
"Views/AppTheme.swift",
"Views/CostTabView.swift",
"Views/HistoryTabView.swift",
"Views/MenuBarPopover.swift",
"Views/OverviewTabView.swift",
"Views/SettingsTabView.swift",
"Views/StatsTabView.swift",
"Views/Styles.swift",
"Views/WorkspacesTabView.swift",
"agy_usage_statsApp.swift"
],
"type" : "executable"
}
],
"tools_version" : "5.9"
}
Done.