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

maintain config declaration order #1302

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Conversation

snoyer
Copy link
Contributor

@snoyer snoyer commented Mar 7, 2024

The config blocks are currently matched by regex in alphabetical order which is counter-intuitive.

Technically it makes sense because JSON specifies dictionaries as unordered collections and F3D uses std::map for storage, but this feels like unspecified behavior left to the implementation :(

This PR uses nlohmann::ordered_json and std::vector<std::pair<...>> to maintain the top-down declaration order form the config file.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.44%. Comparing base (7bc53ec) to head (cb9471a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1302   +/-   ##
=======================================
  Coverage   96.44%   96.44%           
=======================================
  Files         146      146           
  Lines        8715     8715           
=======================================
  Hits         8405     8405           
  Misses        310      310           

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

Copy link
Member

@Meakk Meakk left a comment

Choose a reason for hiding this comment

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

LGTM

@mwestphal mwestphal merged commit 680aff9 into f3d-app:master Mar 8, 2024
39 checks passed
@snoyer snoyer deleted the config-order branch March 8, 2024 09:14
Copy link
Contributor

Choose a reason for hiding this comment

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

wrong location for this file

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.

3 participants