Closed IAmVigneswaran closed 2 weeks ago
The new tooling only came out this week, I haven't had a chance to check MarkersExtractor. But most of these warnings are relating to the Marker Data codebase.
From the logs it looks like you're adding some conformances in Marker Data to types imported from MarkersExtractor. Things like Identifiable
could be refactored into MarkersExtractor instead. Those particular warnings are only showing because it's unrecommended practice to conform types you don't own to protocols you don't own.
I've done the appropriate refactors and released MarkersExtractor 0.3.10.
I have also pushed a PR with changes for Marker Data in response to the refactors: #107
I only touched Marker Data code that was affected by MarkersExtractor. I will leave the remaining build warnings for @milanvarady to resolve, as they all now exclusively deal with the Marker Data codebase.
@milanvarady
@latenitefilms Have shared some details for setting up Workflow Extensions in Xcode 16 https://fcp.cafe/#18th-september-2024
Thanks.
@milanvarady I just tried to build the app again. The warnings are somewhat lesser than before.
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Other/ExportDestinationPicker.swift:106:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ExtractView.swift:356:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ExtractView.swift:357:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ExtractView.swift:359:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var extractionModel = ExtractionModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/Label/OverlaySettingsView.swift:143:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/FileSettingsView.swift:116:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/FileSettingsView.swift:117:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/NotificationSettingsView.swift:55:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/NotificationSettingsView.swift:56:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:139:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:140:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:142:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var extractionModel = ExtractionModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:147:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var queueModel = QueueModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/QueueView.swift:184:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/QueueView.swift:185:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/QueueView.swift:187:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var queueModel = QueueModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/Image/SwatchSettingsView.swift:94:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Other/ExportDestinationPicker.swift:106:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ExtractView.swift:356:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ExtractView.swift:357:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ExtractView.swift:359:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var extractionModel = ExtractionModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/Label/OverlaySettingsView.swift:143:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/FileSettingsView.swift:116:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/FileSettingsView.swift:117:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/NotificationSettingsView.swift:55:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/General Settings/NotificationSettingsView.swift:56:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:139:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:140:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:142:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var extractionModel = ExtractionModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Main/ContentView.swift:147:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var queueModel = QueueModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/QueueView.swift:184:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/QueueView.swift:185:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var databaseManager = DatabaseManager(settings: settings)
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/QueueView.swift:187:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var queueModel = QueueModel(
^~~~~~~~~~~~
⚠️ /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Views/Detail Views/Image/SwatchSettingsView.swift:94:5: '@StateObject' used inline will not work unless tagged with '@Previewable'
@StateObject var settings = SettingsContainer()
^~~~~~~~~~~~
Based on this apple developer forum post, this is a known issue in Xcode 16.
I believe this '@StateObject' used inline will not work unless tagged with '@Previewable'
it would be fixed in future versions of Xcode.
Related - https://www.avanderlee.com/swiftui/previewable-macro-usage-in-previews/ https://stackoverflow.com/questions/60105438/swiftui-preview-provider-with-binding-variables/66175501#66175501 https://www.hackingwithswift.com/forums/swift/new-atpreviewable-and-previewer-issues-for-swiftdata/27357 https://www.reddit.com/r/SwiftUI/comments/18xdv0h/why_dont_we_need_stateobject_since_xcode_15/?rdt=55626
@milanvarady Thank you for making the tweaks for Xcode 16.0. While the build is successful, there are several warnings shown during the build process.
Are we able to fix and solve them?
@orchetect The warning mentions
MarkersExtractor
andDAWFileKit
? Should the libraries need to be updated for Xcode 16.0 compatibility?Thank you.