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

Bug in io.pedestal.app.diff/model-diff-inform #18

Open
danielcompton opened this issue Feb 16, 2014 · 2 comments
Open

Bug in io.pedestal.app.diff/model-diff-inform #18

danielcompton opened this issue Feb 16, 2014 · 2 comments

Comments

@danielcompton
Copy link

I'm not sure if I'm not understanding it correctly but it seems like there is a bug in https://github.com/pedestal/pedestal-app/blob/master/app/src/io/pedestal/app/diff.clj#L42

I run

(model-diff-inform {:a 1} {:a 1 :b 2})
;;[[[:b] :added {:a 1} {:a 1, :b 2}]]
(model-diff-inform {:a 1 :b 2} {:a 1})
;;[]

I would expect that (model-diff-inform {:a 1 :b 2} {:a 1}) would return something like [[[:b] :removed {:a 1, :b 2} {:a 1}]]

Is this expected behaviour?

@avescodes
Copy link

That does seem odd. If you investigate the generative tests and things do indeed seem off then I would accept a bug fix.

@brentonashworth
Copy link

You expect correctly. If that is what is happening then it is a bug. I am
surprised that we don't currently have a test for this very basic case.

On Saturday, February 15, 2014, Daniel Compton [email protected]
wrote:

I'm not sure if I'm not understanding it correctly but it seems like there
is a bug in
https://github.com/pedestal/pedestal-app/blob/master/app/src/io/pedestal/app/diff.clj#L42

I run

(model-diff-inform {:a 1} {:a 1 :b 2})
;;[[[:b] :added {:a 1} {:a 1, :b 2}]](model-diff-inform {:a 1 :b 2} {:a 1})
;;[]

I would expect that (model-diff-inform {:a 1 :b 2} {:a 1}) would return
something like ;;[[[:b] :removed {:a 1, :b 2} {:a 1}]]

Is this expected behaviour?

Reply to this email directly or view it on GitHubhttps://github.com//issues/18
.

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

No branches or pull requests

3 participants