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

[IJ Plugin] Inspection: missing directive import #5494

Merged
merged 18 commits into from Dec 22, 2023

Conversation

BoD
Copy link
Contributor

@BoD BoD commented Dec 20, 2023

Resolves #5413

Screen.Recording.2023-12-20.at.10.59.28.mov

Copy link

netlify bot commented Dec 20, 2023

Deploy Preview for apollo-android-docs canceled.

Name Link
🔨 Latest commit df43394
🔍 Latest deploy log https://app.netlify.com/sites/apollo-android-docs/deploys/6585734f353789000895d2fa

Comment on lines 29 to 30
const val CATCH = "catch"
const val CATCH_TO = "CatchTo"
Copy link
Contributor

Choose a reason for hiding this comment

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

For the record, we just discussed this and it would be better to not hardcode any definition names in AKIJP. Instead, AKIJP can read from the nullability and kotlin_labs definitions.

  • unresolved nullability imports are an error.
  • unresolved kotlin_labs imports are an error too (TBC). 4.0 is lenient and imports them automatically but we should enforce this so might just be easier to have the same handling there. Edit: we finally decided on warning with a different warning to keep the IJ plugin contract matching the compiler contract

Aliased imports ({ name: "@catch", to: "mycatch" }`) cannot have a quick fix, which is expected, same as in Kotlin.

Copy link
Contributor Author

@BoD BoD Dec 22, 2023

Choose a reason for hiding this comment

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

kotlin_labs warning in latest commit:

Screen.Recording.2023-12-22.at.11.15.07.mov

BoD and others added 3 commits December 22, 2023 11:43
…rties

Co-authored-by: Martin Bonnin <martin@mbonnin.net>
…loMissingGraphQLDefinitionImport.html

Co-authored-by: Martin Bonnin <martin@mbonnin.net>
Comment on lines 155 to 156
extraSchemaFile.add(GraphQLElementFactory.createWhiteSpace(project, "\n\n"))
extraSchemaFile.add(it)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be added at the top of the file instead, like other imports

Copy link
Contributor Author

@BoD BoD Dec 22, 2023

Choose a reason for hiding this comment

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

Good point 👍

with df43394:

Screen.Recording.2023-12-22.at.12.26.07.mov

Copy link
Contributor

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

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

🚀

@BoD BoD merged commit 93499a5 into main Dec 22, 2023
9 checks passed
@BoD BoD deleted the ij-plugin-missing-graphql-import-inspection branch December 22, 2023 13:12
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.

[IJ plugin] Automatically import certain directives
2 participants