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

RDART-914: Use PartBuilder instead of SharedPartBuilder #1310

Merged
merged 14 commits into from
Feb 19, 2024
Merged

Conversation

nielsenko
Copy link
Contributor

@nielsenko nielsenko commented Jun 7, 2023

This will allow other builders to consume output of the realm generator.
Generated files are now suffixed with .realm.dart instead of .g.dart.

Due to the behaviour of PartBuilder source files needs to have a part declaration (SharedPartBuilder is more lenient for some reason). This means that the trick we used in the tests of not specifying the part no longer works. Instead a lot mock files has been added, of the form <x>.realm.dart containing:

// MOCK FILE!
part of '<x>.dart';

mostly to avoid a lot of red squiggles in the project due to parse errors.

test_utils.dart has been reworked quite a bit in the process, and now contains a testCompile method for easy testing of the builder.

Related to: #1254

@cla-bot cla-bot bot added the cla: yes label Jun 7, 2023
@nielsenko nielsenko force-pushed the kn/part-builder branch 15 times, most recently from 7d07c7a to 4d2e29e Compare June 8, 2023 09:32
@coveralls
Copy link

coveralls commented Jun 8, 2023

Pull Request Test Coverage Report for Build 7958047585

Details

  • -1 of 3 (66.67%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on kn/part-builder at 87.348%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/realm_generator/lib/src/pseudo_type.dart 0 1 0.0%
Totals Coverage Status
Change from base Build 7845583916: 87.3%
Covered Lines: 3666
Relevant Lines: 4197

💛 - Coveralls

@nielsenko nielsenko force-pushed the kn/part-builder branch 2 times, most recently from e60647f to 0495de8 Compare June 12, 2023 12:42
@nielsenko nielsenko marked this pull request as ready for review June 12, 2023 12:44
CHANGELOG.md Outdated Show resolved Hide resolved
@nielsenko nielsenko linked an issue Jun 13, 2023 that may be closed by this pull request
@nielsenko nielsenko force-pushed the kn/part-builder branch 2 times, most recently from 04e767a to d0bcb72 Compare July 31, 2023 15:11
@nielsenko nielsenko force-pushed the kn/part-builder branch 3 times, most recently from 6ac22ab to 7408c20 Compare February 7, 2024 17:10
@nielsenko nielsenko requested review from nirinchev and removed request for nirinchev February 7, 2024 21:27
Copy link
Member

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

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

Looks good - just small nits on my part.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
packages/realm_generator/test/common.realm.dart Outdated Show resolved Hide resolved
@nirinchev
Copy link
Member

Also, this is a breaking change, so we should have probably targeted ni/core-vnext instead of main.

This will allow other builders to consume output of the realm generator.
Generated files are now suffixed with `.realm.dart` instead of `.g.dart`.
Instead of reading it from the console. Github windows actions are weird
in this respect. The logs will alway be rendered with unicode anyway.
@nielsenko nielsenko merged commit ca669a2 into main Feb 19, 2024
55 checks passed
@nielsenko nielsenko deleted the kn/part-builder branch February 19, 2024 10:53
nirinchev added a commit that referenced this pull request Feb 23, 2024
* main:
  Use PartBuilder instead of SharedPartBuilder (#1310)
nirinchev added a commit that referenced this pull request Feb 23, 2024
* next-major:
  Regenerate ffi bindings
  Fix paths
  Update Core
  Move cmake presets back in realm_dart
  Use PartBuilder instead of SharedPartBuilder (#1310)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2024
@nielsenko nielsenko changed the title Use PartBuilder instead of SharedPartBuilder RDART-914: Use PartBuilder instead of SharedPartBuilder Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ejson de/serialisation
4 participants