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 Issue #192 of dynamic context overriding default context #203

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

sovelten
Copy link
Collaborator

@sovelten sovelten commented May 16, 2017

This is an attempt to fix #192

The issue was that when a dynamic context is set, it overrides all of the default contexts, making it get nested contexts wrong if they are not themselves set dynamically.

What I did was swapping the order of evaluation of ctx/infer, making the contexts inferred from p/Contextual take precedence over the dynamic context. If you want to override this behaviour and set a dynamic context over the p/Contextual default, you need to use with-context-override instead. It needs to be noted however, that if one does this, all possible nested different context will have to be set with with-context-override as well.

I don't think this fix is ideal, but is better than the way it is right now. Suggestions are welcome.

@sovelten sovelten force-pushed the fix-infer-nested-contexts branch 2 times, most recently from 583b6c4 to 4a5853e Compare July 18, 2017 17:17
@niwinz niwinz merged commit 0f57782 into funcool:master Jul 20, 2017
@niwinz
Copy link
Member

niwinz commented Jul 20, 2017

Nice, thanks!

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.

Fmap Gets Context Wrong in Nested Contexts
2 participants