Skip to content

MINIFICPP-1288 - Refactor YamlConfiguration::parsePropertiesNodeYaml#901

Closed
hunyadi-dev wants to merge 6 commits intoapache:mainfrom
hunyadi-dev:MINIFICPP-1288_parsePropertiesNodeYaml_cleanup
Closed

MINIFICPP-1288 - Refactor YamlConfiguration::parsePropertiesNodeYaml#901
hunyadi-dev wants to merge 6 commits intoapache:mainfrom
hunyadi-dev:MINIFICPP-1288_parsePropertiesNodeYaml_cleanup

Conversation

@hunyadi-dev
Copy link
Contributor

Splitting up YamlConfiguration::parsePropertiesNodeYaml and simplifying each of the parsing steps.

Copy link
Contributor

@fgerlits fgerlits left a comment

Choose a reason for hiding this comment

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

I like this; this function was insanely long and complex.

try {
PropertyValue coercedValue = defaultValue;
if (defaultType == typeid(int64_t)) {
coercedValue = propertyValueNode.as<int64_t>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm... this has changed quite a bit. For example, why don't we need the case for uint64_t any longer?

Also, do we have enough unit tests to make sure the new code works in the same way as the old code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, I do not quite remember why we do not need uint64_t anymore :S

It probably has something to do with the uint64 nodes being parsed as string even though their value type matches here:

class DataSizeValue : public TransformableValue, public state::response::UInt64Value {

There has been a discussion about it where @szaszm replied that he agreed on the removal, but gah this is old. This should be though thoroughly tested as there are many integration tests that directly rely on yamlparsing and even some yamlconfiguration tests as well.

Copy link
Member

Choose a reason for hiding this comment

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

I don't remember the discussion, so some pointers to context would be appreciated. 🙂

@hunyadi-dev hunyadi-dev force-pushed the MINIFICPP-1288_parsePropertiesNodeYaml_cleanup branch from 8946cb2 to 1ce1fb0 Compare December 10, 2020 13:25
@hunyadi-dev hunyadi-dev force-pushed the MINIFICPP-1288_parsePropertiesNodeYaml_cleanup branch from 20645f8 to 39c38e3 Compare December 14, 2020 08:41
@szaszm szaszm closed this in 0a1e39e Dec 16, 2020
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