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 overwrite subsection #844

Merged
merged 13 commits into from
Mar 23, 2016
Merged

Conversation

okkez
Copy link
Contributor

@okkez okkez commented Mar 11, 2016

  • overwriting config_section options like required/multi/alias breaks
    behavior of super
    • so subclass must not overwrite these options
  • subsection definitions of subsections (Hash) is simply merged
    • it is bug, because same section definition like is overwritten by
      subclass
    • under this bug, subclass MUST repeat superclass's definition, and add
      original definition
    • but this is impossible in the real world
    • subsection definitions should be merged correctly

@okkez okkez force-pushed the fix-overwrite-subsection branch from 72e4465 to 109b348 Compare March 11, 2016 04:00
@okkez okkez changed the title [WIP] Fix overwrite subsection Fix overwrite subsection Mar 14, 2016
@okkez
Copy link
Contributor Author

okkez commented Mar 14, 2016

@tagomoris Review this PR, please.

@@ -63,21 +63,36 @@ def multi?
end

def final?
@final
@final == true
Copy link
Member

Choose a reason for hiding this comment

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

!!@final looks normal.

@tagomoris
Copy link
Member

Great fix!
I added some comments about some questions and some things nice to have.

@okkez
Copy link
Contributor Author

okkez commented Mar 16, 2016

I've fixed and pushed changes for all comments.

@tagomoris
Copy link
Member

OK, Tests are green (after retries).
@okkez Could you squash changes?

@okkez
Copy link
Contributor Author

okkez commented Mar 17, 2016

@tagomoris Ok, I will squash and force push later.

okkez added 13 commits March 18, 2016 11:11
* overwriting config_section options like required/multi/alias breaks behavior of `super`
  * so subclass must not overwrite these options
* subsection definitions of subsections (Hash) is simply merged
  * it is bug, because same section definition like <a> is overwritten by subclass
  * under this bug, subclass MUST repeat superclass's definition, and add original definition
  * but this is impossible in the real world
  * subsection definitions should be merged correctly
In previous version,

* A (not finalized)
* B < A (finalized)
* C < B (inherits finalized)

C displays default value of itself.
But expected values are B's default value.
@okkez okkez force-pushed the fix-overwrite-subsection branch from da3b5fc to 5e4b0f4 Compare March 18, 2016 03:15
@okkez
Copy link
Contributor Author

okkez commented Mar 18, 2016

Squashed.

@okkez
Copy link
Contributor Author

okkez commented Mar 23, 2016

Travis CI failed, but it is not related to my changes.

@tagomoris
Copy link
Member

I requested rebuild and now it's green.

@tagomoris tagomoris merged commit 33ab2c5 into fluent:master Mar 23, 2016
@tagomoris
Copy link
Member

Merged. Thank you!

@okkez okkez deleted the fix-overwrite-subsection branch April 16, 2016 08:34
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.

2 participants