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

Added toString methods to api.Error and api.Error.Location #2905

Merged
merged 2 commits into from Jan 28, 2021
Merged

Added toString methods to api.Error and api.Error.Location #2905

merged 2 commits into from Jan 28, 2021

Conversation

AOrobator
Copy link
Contributor

@AOrobator AOrobator commented Jan 28, 2021

The aim of this PR is to see better error messages when printing Error classes to the log.

@AOrobator
Copy link
Contributor Author

AOrobator commented Jan 28, 2021

Looks like i have a compatibility issue, but I'm not sure how to solve it. Is there a workflow for adding new APIs?

/Users/runner/work/apollo-android/apollo-android/apollo-api/build/metalava/current.txt:148: error: Added method com.apollographql.apollo.api.Error.toString() [AddedMethod]
> Task :apollo-api:metalavaCheckCompatibility FAILED
/Users/runner/work/apollo-android/apollo-android/apollo-api/build/metalava/current.txt:159: error: Added method com.apollographql.apollo.api.Error.Location.toString() [AddedMethod]
Aborting: Found compatibility problems checking the public API (/Users/runner/work/apollo-android/apollo-android/apollo-api/build/metalava/current.txt) against the API in /Users/runner/work/apollo-android/apollo-android/apollo-api/api.txt

Edit: Looks like I have to update the metalava data. i took inspiration from this commit

@martinbonnin
Copy link
Contributor

Is there a workflow for adding new APIs?

Yep, we use metalava to enforce API compatibility. Looks like you found how to fix it 👍 . We should probably add this to the contributing guide or PR template.

Thanks a lot for the contribution in all cases!

@martinbonnin martinbonnin merged commit ed318f5 into apollographql:main Jan 28, 2021
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

2 participants