Skip to content
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

temporary support: @FetchRequest #190

Merged
merged 1 commit into from
May 19, 2022
Merged

temporary support: @FetchRequest #190

merged 1 commit into from
May 19, 2022

Conversation

YusukeHosonuma
Copy link
Owner

@YusukeHosonuma YusukeHosonuma commented May 19, 2022

No useful value can be obtained from @FetchRequest at currently SwiftPrettyPrint strategy. (maybe)
But the output is disturbing currently, therefore temporary support in this PR.

As-is

ContentView(
    viewContext: @Environment(<NSManagedObjectContext: 0x600001960340>),
    _items: FetchRequest<Item>(
        managedObjectContext: @Environment(<NSManagedObjectContext: 0x600001960340>),
        controller: @StateObject(<_TtGC7SwiftUI15FetchControllerT_C15CoreDataSandbox4ItemGVS_14FetchedResultsS2___: 0x600000679080>),
        results: @State(nil),
        transaction: Transaction(plist: [Key<AnimationKey> = Optional(AnyAnimator(SwiftUI.BezierAnimation(duration: 0.35, curve: SwiftUI.(unknown context at $7fff5df354c0).BezierTimingCurve(ax: 0.52, bx: -0.78, cx: 1.26, ay: -2.0, by: 3.0, cy: 0.0))))]),
        deferredFetchRequest: DeferredFetchRequest<Item>(
            $__lazy_storage_$_result: Optional(<NSFetchRequest: 0x600000971650> (entity: Item; predicate: ((null)); sortDescriptors: ((
                "(timestamp, ascending, NO, compare:)"
            )); type: NSManagedObjectResultType; )),
            resolve: () -> NSFetchRequest(
            )
        )
    )
)

To be

prettyPrint

ContentView(
    viewContext: <NSManagedObjectContext: 0x6000026b0680>,
    items: <can not lookup>
)

prettyPrintDebug

ContentView(
    viewContext: @Environment(<NSManagedObjectContext: 0x6000026b0680>),
    items: @FetchRequest(<can not lookup>)
)

@codecov-commenter
Copy link

Codecov Report

Merging #190 (bf0f113) into main (334a7ff) will increase coverage by 0.54%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
+ Coverage   76.41%   76.96%   +0.54%     
==========================================
  Files          13       13              
  Lines         687      686       -1     
==========================================
+ Hits          525      528       +3     
+ Misses        162      158       -4     
Impacted Files Coverage Δ
Sources/Core/PrettyDescriber.swift 71.80% <90.00%> (+1.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 334a7ff...bf0f113. Read the comment docs.

Copy link
Collaborator

@sahara-ooga sahara-ooga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an appropriate interim measure to move forward.

@sahara-ooga sahara-ooga added this to the 1.4.0 - TBD milestone May 19, 2022
@YusukeHosonuma YusukeHosonuma merged commit 557e1d8 into main May 19, 2022
@YusukeHosonuma YusukeHosonuma deleted the fetch-request branch May 19, 2022 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants