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

Codegen Vaildation - Handle Non Fatal Errors #202

Merged

Conversation

AnthonyMDev
Copy link
Contributor

This PR is based on top of #152. It should not be merged until after that PR is merged.

Adds NonFatalErrors error type and NonFatalError struct to collect and report non fatal errors that occur during the code generation.

Instead of being thrown when encountered, these errors are returned from the TemplateRenderer and FileGenerator objects to allow code generation execution to continue. After codegen is finished, any errors returned here are thrown from ApolloCodegen.build() before exiting.

This also includes changes to SelectionSetTemplate to implement the checking for type conflict errors incrementally as ComputedSelectionSets are built, rather than requiring all ComputedSelectionSets to be pre-built and retained for the entirety of execution.

AnthonyMDev and others added 30 commits December 8, 2023 13:10
… version

git-subtree-dir: apollo-ios
git-subtree-mainline: 0ff85b2
git-subtree-split: 0c0a990
0c0a990 chore(deps): Update CircleCI secops orb version (#197)

git-subtree-dir: apollo-ios
git-subtree-split: 0c0a990
…cops orb version

git-subtree-dir: apollo-ios-codegen
git-subtree-mainline: e64dae8
git-subtree-split: 44b718a9a30d97681b9d550eb1ceedc2cc5d7c30
44b718a9 chore(deps): Update CircleCI secops orb version (#197)

git-subtree-dir: apollo-ios-codegen
git-subtree-split: 44b718a9a30d97681b9d550eb1ceedc2cc5d7c30
70a6b37a chore(deps): Update CircleCI secops orb version (#197)

git-subtree-dir: apollo-ios-pagination
git-subtree-split: 70a6b37a86f420a863d345163dfaf2c4db257ff1
… secops orb version

git-subtree-dir: apollo-ios-pagination
git-subtree-mainline: cbc6140
git-subtree-split: 70a6b37a86f420a863d345163dfaf2c4db257ff1
…ts should fail on warnings

git-subtree-dir: apollo-ios
git-subtree-mainline: 143d149
git-subtree-split: 5cebbac
5cebbac tests: TestCodegenConfigurations projects should fail on warnings (#198)

git-subtree-dir: apollo-ios
git-subtree-split: 5cebbac
d8ac9b9e chore(deps): Update to graphql-js 17.0.0-alpha.3 (#194)

git-subtree-dir: apollo-ios-codegen
git-subtree-split: d8ac9b9eeeefb756417ac62856cf24bcbd74b0b8
…js 17.0.0-alpha.3

git-subtree-dir: apollo-ios-codegen
git-subtree-mainline: a7870b3
git-subtree-split: d8ac9b9eeeefb756417ac62856cf24bcbd74b0b8
git-subtree-dir: apollo-ios
git-subtree-mainline: 8856b97
git-subtree-split: f584fe6
f584fe6 2023-12-14 Roadmap update

git-subtree-dir: apollo-ios
git-subtree-split: f584fe6
@AnthonyMDev AnthonyMDev requested a review from a team as a code owner December 16, 2023 00:21
@AnthonyMDev AnthonyMDev marked this pull request as draft December 16, 2023 00:22
AnthonyMDev and others added 10 commits December 15, 2023 16:29
a683632 chore(deps): update actions/add-to-project action to v0.5.0 (#205)

git-subtree-dir: apollo-ios
git-subtree-split: a683632
…ect action to v0.5.0

git-subtree-dir: apollo-ios
git-subtree-mainline: 2915ccd
git-subtree-split: a683632
3e550fda chore(deps): Combined dependency updates (#209)

git-subtree-dir: apollo-ios-codegen
git-subtree-split: 3e550fdaa2b431f79466d8b7947df0a6afb874ca
…y updates

git-subtree-dir: apollo-ios-codegen
git-subtree-mainline: b990d26
git-subtree-split: 3e550fdaa2b431f79466d8b7947df0a6afb874ca
@AnthonyMDev AnthonyMDev marked this pull request as ready for review December 18, 2023 19:45
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.

This was a long one; lots of changes from merges to filter through. The gist of this looks good though. 👍🏻

}

}

// MARK: - Helper Extensions

fileprivate extension IR.ComputedSelectionSet {
extension IR.ComputedSelectionSet {
Copy link
Member

Choose a reason for hiding this comment

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

This is a style question but why not leave the visibility annotation on the extension vs. having to repeat it for each property and function?

AnthonyMDev and others added 4 commits December 19, 2023 11:39
…rs.swift

Co-authored-by: Calvin Cestari <calvincestari@users.noreply.github.com>
…rs.swift

Co-authored-by: Calvin Cestari <calvincestari@users.noreply.github.com>
…Renderer.swift

Co-authored-by: Calvin Cestari <calvincestari@users.noreply.github.com>
@AnthonyMDev AnthonyMDev merged commit e2d5c96 into entity-selection-tree-merge-fragment-ref Dec 20, 2023
@AnthonyMDev AnthonyMDev deleted the codegen-vaildation-refactor branch December 20, 2023 21:31
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.

None yet

5 participants