{"id":18047133,"url":"https://github.com/jw3126/whynotequal.jl","last_synced_at":"2025-04-10T05:02:25.525Z","repository":{"id":81965102,"uuid":"573929302","full_name":"jw3126/WhyNotEqual.jl","owner":"jw3126","description":"Find out why complex structs are not equal","archived":false,"fork":false,"pushed_at":"2024-07-23T07:39:54.000Z","size":128,"stargazers_count":24,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-22T11:06:13.028Z","etag":null,"topics":["debug","julia"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jw3126.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-03T21:56:08.000Z","updated_at":"2024-12-21T13:34:08.000Z","dependencies_parsed_at":"2024-07-23T08:41:56.549Z","dependency_job_id":"1df4c137-01c6-4459-86b6-c90dd3c7704a","html_url":"https://github.com/jw3126/WhyNotEqual.jl","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"145c39ec1607cd1fd2ec346f5714ff709c1e03b6"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jw3126%2FWhyNotEqual.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jw3126%2FWhyNotEqual.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jw3126%2FWhyNotEqual.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jw3126%2FWhyNotEqual.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jw3126","download_url":"https://codeload.github.com/jw3126/WhyNotEqual.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161274,"owners_count":21057554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debug","julia"],"created_at":"2024-10-30T19:10:26.271Z","updated_at":"2025-04-10T05:02:25.438Z","avatar_url":"https://github.com/jw3126.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhyNotEqual\n\n[![Build Status](https://github.com/jw3126/WhyNotEqual.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/jw3126/WhyNotEqual.jl/actions/workflows/CI.yml?query=branch%3Amain)\n[![Coverage](https://codecov.io/gh/jw3126/WhyNotEqual.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/jw3126/WhyNotEqual.jl)\n\nQuickly find out why two complicated objects are not equal.\n# Usage\n\nEver encountered a situation like this:\n\n```julia\n@test expected == result\nTest Failed at /home/jan/.julia/dev/WhyNotEqual/doit.jl:21\n  Expression: expected == result\n   Evaluated: (v = (hello = :world, language = :julia), w = 42, x = [1, 2, 3, 4, 5], y = AB(1, 2), \nz = Dict{AB, Any}(AB(2, 3) =\u003e AB(3, ()), AB(1, 2) =\u003e 3), zz = (foo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n  …  91, 92, 93, 94, 95, 96, 97, 98, 99, 100], bar = :bar)) == (v = (hello = :world, language = :ju\nlia), w = 42, x = [1, 2, 3, 4, 5], y = AB(1, 2), z = Dict{AB, Any}(AB(2, 3) =\u003e AB(4, ()), AB(1, 2) \n=\u003e 3), zz = (foo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10  …  91, 92, 93, 94, 95, 96, 97, 98, 99, 100], bar\n = :bar))\nERROR: LoadError: There was an error during testing\n```\nCan you spot the difference? This package can do it for you:\n\n```julia\nusing WhyNotEqual\nwhynot(==, expected, result)\n```\n```\nDifferentAndNoChildren: When applying `lens` to both objects, we get `obj1` and `obj2`.\nobj1 and obj2 are different, but they don't have any children.\nlens: (@optic _.z[AB(2, 3)].a)\nobj1: 3\nobj2: 4\n```\nOf course you also have programmatic access to this data\n```julia\nlens = whynot(==, expected, result).lens\n@show lens\n@show lens(expected)\n@show lens(result)\n```\n\n```\nlens = (@optic _.z[AB(2, 3)].a)\nlens(expected) = 3\nlens(result) = 4\n4\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjw3126%2Fwhynotequal.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjw3126%2Fwhynotequal.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjw3126%2Fwhynotequal.jl/lists"}