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

fix: proto explicit init #562

Merged
merged 4 commits into from
Jan 26, 2024
Merged

fix: proto explicit init #562

merged 4 commits into from
Jan 26, 2024

Conversation

arbimo
Copy link
Member

@arbimo arbimo commented Jan 25, 2024

Until now, all initial values (including implicit ones) written in the initial state when converting to protobuf.
This is problematic as it means the problem reconstructed after export and importing to protobuf was not strictly equivalent: some implicit values were made explicit in process.

A bad consequence is that it made protobuf conversions much more expensive that it had too (even after the optimization of #559, 90% of the time spend remains in the initial state generation in at least some non trivial problems).

This PR only save to protobuf the explicitly set initial values. The defaults values of the fluent were already there.

@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b56baea) 85.12% compared to head (51950ae) 85.13%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #562   +/-   ##
=======================================
  Coverage   85.12%   85.13%           
=======================================
  Files         201      201           
  Lines       26965    26982   +17     
=======================================
+ Hits        22954    22971   +17     
  Misses       4011     4011           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@alvalentini alvalentini left a comment

Choose a reason for hiding this comment

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

LGTM! Just a note: the problem reconstructed is not exactly the same since it doesn't contain the "general" defaults. But I don't think it is a problem. You can proceed with the merge.

@arbimo
Copy link
Member Author

arbimo commented Jan 26, 2024

Thanks for the review! I'll merge it as it is then.

the problem reconstructed is not exactly the same since it doesn't contain the "general" defaults. But I don't think it is a problem. You can proceed with the merge.

You are right, but this will be reflected on the fluent's default (even though the problem will not be exactly similar if you were to add new fluents). I think I added this step of promoting a global default to a fluent default precisely because I was not very at ease with adding global default in the protobuf encoding ^^

@arbimo arbimo merged commit b7bdd2d into master Jan 26, 2024
8 checks passed
@arbimo arbimo deleted the fix-proto-explicit-init branch January 26, 2024 15:14
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

3 participants