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

Refactor FragmentProtocols to remove HasFragments #2071

Merged
merged 3 commits into from
Dec 17, 2021

Conversation

AnthonyMDev
Copy link
Contributor

And other cleanup

@designatednerd
Copy link
Contributor

Why is HasFragments no longer needed? Is it worth updating the RFC, which IIRC mentions this?

Copy link
Member

@calvincestari calvincestari left a comment

Choose a reason for hiding this comment

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

Nicely done!

@@ -38,7 +38,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/stephencelis/SQLite.swift.git",
.upToNextMinor(from: "0.13.1"))
.upToNextMinor(from: "0.13.1")),
Copy link
Member

Choose a reason for hiding this comment

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

I was wondering how this was working but then realized that this is the 1.0 branch where main works fine without the , because there is no next package. This highlights the importance of making sure the package manager samples work with this branch prior to an alpha release.

@calvincestari
Copy link
Member

Thanks for cleaning up the CLI files. For anyone interested they were not deleted from the file system in my PR #2003 and mistakenly only removed from the project.

@AnthonyMDev
Copy link
Contributor Author

Why is HasFragments no longer needed? Is it worth updating the RFC, which IIRC mentions this?

@designatednerd, It was always an ugly solution and i figured out a better way of doing this. Rather than a HasFragments protocol, the SelectionSet now has an associated type for Fragments itself with a default type of a stubbed type called NoFragments, now you don't need to make them conform to HasFragments, if we generate a Fragments type into a SelectionSet, then you can access the fragments, if not, then the fragments property won't exist (because fragments is a property on a protocol extension on SelectionSet where Fragments: FragmentContainer).

@AnthonyMDev
Copy link
Contributor Author

As for the RFC, I plan on updating it at some point soon, I've been making a few changes and things are still in flux a little bit, so I'll make a batch update to it around the time we release Alpha 1

@AnthonyMDev AnthonyMDev merged commit e6b761d into release/1.0-alpha-incubating Dec 17, 2021
@AnthonyMDev AnthonyMDev deleted the 1.0/fix-package branch December 17, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants