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

feat(dynamite)!: add Built interface to the generated interfaces #2000

Merged

Conversation

Leptopoda
Copy link
Member

Allows calling toBuilder and rebuild on the interface making it a drop in replacement to the built class itself.
related to #1995

As this is not needed yet I'd like to wait until other breaking changes accumulate.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

2000 🎉

Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.92%. Comparing base (cdb2d4a) to head (a168391).
Report is 1 commits behind head on main.

Current head a168391 differs from pull request most recent head a83cd27

Please upload reports for the commit a83cd27 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2000      +/-   ##
==========================================
- Coverage   30.66%   28.92%   -1.74%     
==========================================
  Files         259      250       -9     
  Lines       84891    84371     -520     
==========================================
- Hits        26032    24408    -1624     
- Misses      58859    59963    +1104     
Flag Coverage Δ *Carryforward flag
cookie_store ?
dynamite 30.82% <ø> (-0.27%) ⬇️
dynamite_end_to_end_test 61.47% <ø> (+0.11%) ⬆️
dynamite_runtime 85.40% <ø> (ø) Carriedforward from 20e59e8
neon_dashboard 92.56% <ø> (-3.49%) ⬇️
neon_framework 38.36% <ø> (-4.84%) ⬇️
neon_notifications ?
neon_talk 96.31% <ø> (-2.60%) ⬇️
nextcloud 25.68% <ø> (-1.40%) ⬇️
sort_box 90.90% <ø> (ø) Carriedforward from 20e59e8

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
...e/dynamite_end_to_end_test/lib/all_of.openapi.dart 88.31% <ø> (ø)
...e/dynamite_end_to_end_test/lib/any_of.openapi.dart 70.43% <ø> (ø)
...ite/dynamite_end_to_end_test/lib/enum.openapi.dart 85.00% <ø> (ø)
...namite_end_to_end_test/lib/interfaces.openapi.dart 70.00% <ø> (ø)
...namite_end_to_end_test/lib/nested_ofs.openapi.dart 68.96% <ø> (ø)
...e/dynamite_end_to_end_test/lib/one_of.openapi.dart 62.36% <ø> (ø)
...ite_end_to_end_test/lib/pattern_check.openapi.dart 88.13% <ø> (ø)
.../dynamite_end_to_end_test/lib/some_of.openapi.dart 36.36% <ø> (ø)
...ynamite_end_to_end_test/lib/type_defs.openapi.dart 17.02% <ø> (ø)
...te/dynamite_end_to_end_test/lib/types.openapi.dart 98.36% <ø> (ø)
... and 11 more

... and 84 files with indirect coverage changes

@provokateurin
Copy link
Member

@Leptopoda I think this commit shouldn't be marked as breaking and we can merge it right away because you only add new methods and don't remove or change existing ones.

@Leptopoda
Copy link
Member Author

it shouldn't be breaking but what if a consumer was implementing our interface?
They'd now need to also implement these methods.
Very unlikely but possible.

Maybe we should mark them as final.

@provokateurin
Copy link
Member

Yep, nobody should implement these interfaces...

@Leptopoda
Copy link
Member Author

We can only make our built class final. Doing the same to our interfaces would break our mocks.

@provokateurin
Copy link
Member

After #2190 this is no longer a breaking change as really nobody else can implement the interface now.

@Leptopoda Leptopoda force-pushed the feat/dynamite/add_built_interface_to_interface_classes branch from a168391 to a83cd27 Compare June 21, 2024 09:34
@Leptopoda Leptopoda enabled auto-merge June 21, 2024 09:36
@Leptopoda Leptopoda merged commit 4504ef9 into main Jun 21, 2024
8 checks passed
@Leptopoda Leptopoda deleted the feat/dynamite/add_built_interface_to_interface_classes branch June 21, 2024 10:03
@provokateurin provokateurin removed this from the Dynamite 0.6.0 release milestone Aug 13, 2024
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.

2 participants