Skip to content

Extra stuff for partial properties #471

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

Merged
merged 5 commits into from
May 11, 2025
Merged

Conversation

jamescourtney
Copy link
Owner

No description provided.

@jamescourtney jamescourtney requested a review from Copilot May 10, 2025 07:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR standardizes the naming for the partial property attribute and integrates support for partial properties across multiple test files and compiler metadata.

  • Updated the attribute naming from "fs_partial_property" to "fs_partialProperty" in schema and metadata.
  • Added new tests and adjusted project file configurations to reflect compatibility constraints for partial properties.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Tests/FlatSharpEndToEndTests/Required/Required.fbs Renamed the attribute in table definitions for consistency.
src/Tests/FlatSharpEndToEndTests/PartialProperties/PartialPropertiesTests.fbs Introduced partial properties usage in new schema definitions.
src/Tests/FlatSharpEndToEndTests/PartialProperties/PartialPropertiesTests.cs Added new test files for partial property support through partial classes.
src/Tests/FlatSharpCompilerTests/MetadataHelpers.cs Included the new MetadataKeys.PartialProperty in the helper list.
src/Tests/FlatSharpCompilerTests/InvalidAttributeTests.cs Added tests to verify that partial property attributes are disallowed on value structures.
src/Tests/CompileTests/CSharp8/CSharp8.csproj Updated the project file to remove files not supported in the C# 8 configuration.
src/FlatSharp.Compiler/MetadataKeys.cs Changed the constant value to match the updated attribute naming.

@jamescourtney jamescourtney requested a review from Copilot May 10, 2025 07:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the naming of the partial property attribute from "fs_partial_property" to "fs_partialProperty" for consistency across FlatSharp tests, metadata, and compiler keys. The changes include renaming the attribute in schema files and metadata constants, adding a new test to validate misuse on value struct fields, and updating the C#8 test project to reflect the new compatibility requirements.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Tests/FlatSharpEndToEndTests/Required/Required.fbs Renamed attribute usage for partial properties
src/Tests/FlatSharpEndToEndTests/PartialProperties/PartialPropertiesTests.fbs Introduced partial properties in a new test schema
src/Tests/FlatSharpEndToEndTests/PartialProperties/PartialPropertiesTests.cs Added corresponding C# partial classes for testing
src/Tests/FlatSharpCompilerTests/MetadataHelpers.cs Added new metadata key for partial properties
src/Tests/FlatSharpCompilerTests/InvalidAttributeTests.cs Added test to enforce that partial properties cannot be applied to value struct fields
src/Tests/CompileTests/CSharp8/CSharp8.csproj Updated comments and removed tests incompatible with C# 8
src/FlatSharp.Compiler/MetadataKeys.cs Updated constant value for partial property key

Copy link

codecov bot commented May 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.04%. Comparing base (3741b15) to head (3671e5e).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #471   +/-   ##
=======================================
  Coverage   96.04%   96.04%           
=======================================
  Files         124      124           
  Lines        8920     8923    +3     
  Branches      747      748    +1     
=======================================
+ Hits         8567     8570    +3     
  Misses        261      261           
  Partials       92       92           
Files with missing lines Coverage Δ
src/FlatSharp.Compiler/MetadataKeys.cs 100.00% <ø> (ø)
...mpiler/SchemaModel/BaseReferenceTypeSchemaModel.cs 95.16% <100.00%> (ø)
...atSharp.Compiler/SchemaModel/PropertyFieldModel.cs 97.63% <100.00%> (+<0.01%) ⬆️
...Compiler/SchemaModel/ReferenceStructSchemaModel.cs 92.68% <100.00%> (+0.18%) ⬆️
...FlatSharp.Compiler/SchemaModel/TableSchemaModel.cs 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3741b15...3671e5e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescourtney jamescourtney merged commit 53db630 into main May 11, 2025
12 of 17 checks passed
@jamescourtney jamescourtney deleted the revise_partial_properties branch May 11, 2025 05:32
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.

1 participant