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

add DslMarker for test builders #4089

Merged
merged 1 commit into from
May 11, 2022

Conversation

hrach
Copy link
Contributor

@hrach hrach commented May 10, 2022

Introduce a custom DslMarker for MapBuilder. This way nesting builders
won't see their parent implicit receiver and users cannot define
parent receiver's properties without an explicit receiver reference.

@apollo-cla
Copy link

@hrach: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@netlify
Copy link

netlify bot commented May 10, 2022

👷 Deploy request for apollo-android-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 35076e4

@martinbonnin
Copy link
Contributor

I love this! Looks really cool 👍!

To be on the exhaustive side might want to add a test but TBH this is going to be hard to test because we need to test that something does not compile. It's doable but I don't think it's worth the trouble. @BoD any thoughts.

@BoD
Copy link
Contributor

BoD commented May 10, 2022

Agreed 😊 I was not familiar with the annotation so an example of what was possible before / not possible after would be cool but we can just try on the branch, I agree a test is not necessary.

@martinbonnin
Copy link
Contributor

@hrach can you run ./gradlew apiDump and commit the changed API files? This is needed so that we can track the public API

@BoD
Copy link
Contributor

BoD commented May 10, 2022

Before

Screen Shot 2022-05-10 at 10 34 47

After

Screen Shot 2022-05-10 at 10 35 00

👍

@hrach
Copy link
Contributor Author

hrach commented May 10, 2022

Hi guys, thanks for guidance for the API dump. I'll do this.

Testing: I was thinking about doing something, but "not compiling" requirement seemed rather very difficult to do for some trivial code. Thank you for trying out. :)

Introduce a custom DslMarker for MapBuilder. This way nesting builders
won't see their parent implicit receiver and users cannot define
parent receiver's properties without an explicit receiver reference.
@hrach
Copy link
Contributor Author

hrach commented May 10, 2022

rebased

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.

Thanks!

Copy link
Contributor

@BoD BoD left a comment

Choose a reason for hiding this comment

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

👍

@martinbonnin martinbonnin merged commit cab6ec3 into apollographql:main May 11, 2022
@hrach hrach deleted the test-dsl-markers branch May 11, 2022 14:36
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

4 participants