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

Raise on override defined config #436

Merged
merged 5 commits into from
Mar 26, 2020

Conversation

jobertabma
Copy link
Contributor

@jobertabma jobertabma commented Mar 26, 2020

All PRs:

  • Has tests
  • Documentation updated

This PR changes the behavior of the override and named_append methods to raise an exception when it is called more than once with the same configuration name. This is to avoid unexpected behavior in case a configuration is used in some way in between two configuration declarations.

Fixes #435

@oreoshake
Copy link
Contributor

Open question: should the named_append method also check the existence of a configuration in the @overrides hash and vice versa?

🤔 it'd probably be confusing and I can't think of a reason why you'd want overrides and appends to have the same name, or at least I think you'd be OK with making the required change once your app stopped booting?

@jobertabma
Copy link
Contributor Author

@oreoshake I've updated the PR based on your comment, should be ready for review. Thanks!

Copy link
Contributor

@oreoshake oreoshake left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@oreoshake oreoshake merged commit 38a59ce into github:master Mar 26, 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.

Overriding the same override leads to ???
2 participants