-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
resolve items relative to namespace #47
resolve items relative to namespace #47
Conversation
This looks good to me. What do you think, @AMHOL? What I'd actually love is for this to go one step further and for |
Seems fair to me, the only thing to consider is the possibility of use-cases where people are resolving from higher-level namespaces already, which will no longer be possible without a local variable or something. RE: returning a scoped container, sounds like a cool idea to me, with the current implementation we wouldn't actually be able to reduce the items in the container that is passed around, as they are stored as a flat hash, but we could restrict the namespace pre-resolution. |
@AMHOL I don't think resolving higher-level namespace items is a problem, since resolving items via |
Ahh yes, I missed that, thanks for clearing it up. 😄 |
Please triple-check, because a) dry-system may rely on original behavior b) people may rely on original behavior. If this breaks dry-system and/or dry-web apps, we need |
I will check dry-system (and our apps) with this next week.
… On 14 Jun 2018, at 9:02 pm, Piotr Solnica ***@***.***> wrote:
So the worst thing is, that people using the undocumented namespace#resolve have to remove the namespace prefix from that method's arguments.
Please triple-check, because a) dry-system may rely on original behavior b) people may rely on original behavior. If this breaks dry-system and/or dry-web apps, we need 0.x bump and clear info in changelogs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
PR dry-rb#47 introduced feature to resolve relative to the namespace but there wasn't an option to resolve keys from other namespaces or the root. This changes gives people the option to disable the relative namespacing
With this pull request you can design your container namespaces without knowing anything about the parent namespace (like names, etc.)