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

Fixes failing collection tests #96

Closed

Conversation

thomasmulvaney
Copy link
Contributor

This fixes one of the problems from issue #89 which is tests from rules.collections failing.

Basically any rewrite in a vector is not being applied correctly, for example:

(assoc data foo (inc (foo bar))

We end up with:

(update-in data [?key] inc)

Instead of:

(update-in data [foo] inc)

By converting all vector literals into an s-expression of form (:kibit.rules/vector ...) we can apply the rewrites and then go back to the square-bracket notation.

There maybe a more trivial way, but this seems to work and all rule.collections tests pass now.

vector expressions are now correctly rewritten
@wjlroe
Copy link

wjlroe commented Aug 18, 2014

Any thoughts on getting this merged? It's not good having failing tests in master from a potential contributor's point of view - I don't know when I'm breaking things.

@danielcompton
Copy link
Member

Thanks for this, I'm just chewing it over a little bit before merging it.

@danielcompton danielcompton self-assigned this Nov 8, 2014
@jonase
Copy link
Collaborator

jonase commented Nov 8, 2014

I think this is a bug in core.logic. Maybe it's been fixed in the latest release?

@thomasmulvaney
Copy link
Contributor Author

Its perhaps not the most ideal solution, but i think its to do with the fact that '[ ]' has a meaning in core.logic. If its fixed in core.logic that would be great.

@danielcompton danielcompton modified the milestone: 0.1.0 release Nov 10, 2014
@danielcompton
Copy link
Member

Thanks for putting this together Thomas, I really appreciate it. I don't think we'll need this pull request though, as the bug was fixed in clojure/core.logic@dba7c69

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.

4 participants