-
Notifications
You must be signed in to change notification settings - Fork 94
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
Update toml11-devel usage for 4.0.0 #1625
Conversation
I believe the failed |
Thanks. I will wait for this before releasing DNF 5.2.6.0.
Maybe the current format is better, but I think it's still better just to keep the formatter happy. |
Adds missing cmake check for toml11. It preserves the old API use with conditional compilation based on the found toml11-devel version. Uses `toml::ordered_value` to keep the order of values from files. https://toruniina.github.io/toml11/docs/features/configure_types/#preserving-order-of-values-in-tables (It now uses `toml::ordered_map` instead of `libdnf5::PreserveOrderMap` they do the same thing but the libdnf5 version is missing a constructor). It now preserves comments but they are not used and it shoudn't have an effect. The `source_location` API was changed. https://toruniina.github.io/toml11/docs/reference/source_location/ It simplifies formatting of `syntax_error`s.
Resolves compilation error with new `toml11-devel-4.0.0` version.
It adds conditional compilation based on the found toml11 version. Adds TC - `type_config` which is required for conversion. https://toruniina.github.io/toml11/docs/features/value/#converting-to-tomlvalue The `toml::format` was changed and no longer accepts template args: https://toruniina.github.io/toml11/docs/reference/serializer/ Use `ordered_value` to preserve order in toml otherwise the ordering is unstable which may cause failing tests. The default formatting was changed from: ``` version = "1.0" [[packages]] comment = "Added by 'versionlock add' command on 2024-08-15 08:41:28" name = "htop" conditions = [ {comparator="=",key="evr",value="3.3.0-3.fc40"}, ] ``` to ``` version = "1.0" [[packages]] comment = "Added by 'versionlock add' command on 2024-08-15 08:48:16" name = "htop" [[packages.conditions]] value = "3.3.0-4.fc41" comparator = "=" key = "evr" ``` This shouldn't have any effect on the users.
Adds TC - `type_config` which is required for conversion. https://toruniina.github.io/toml11/docs/features/value/#converting-to-tomlvalue The `toml::format` was changed and no longer accepts template args: https://toruniina.github.io/toml11/docs/reference/serializer/ Use `ordered_value` to preserve order, otherwise `std::unordered_map` is used internally which may result in different order on each run which may casue failing tests. It was necessary to specify the formating for some values because the tests rely on it. However even with the same formatting there still are changes (spacing is different), update the tests to pass for both toml11 versions.
To make the Since the builds on those versions are failing anyway I guess we don't need to block this PR on that. |
Thanks for taking care of it! |
1746eab
This should fix the rawhide build.