JuliaServices / AutoHashEquals.jl

A Julia macro to add == and hash() to composite types.
Other
57 stars 12 forks source link

GitHub CI, match behavior of other containers, hash type parameters #21

Closed goretkin closed 1 year ago

goretkin commented 3 years ago

Add GitHub workflow CI, and fix some issues

Closes https://github.com/andrewcooke/AutoHashEquals.jl/issues/13 (@omus) https://github.com/andrewcooke/AutoHashEquals.jl/issues/18 (@colinxs) https://github.com/andrewcooke/AutoHashEquals.jl/issues/20

Maybe also https://github.com/andrewcooke/AutoHashEquals.jl/issues/16 (@NHDaly ) , though the test I added already passed, so I am not sure I am testing it correctly.

goretkin commented 3 years ago

The README needs to be updated

oschulz commented 2 years ago

Any news on this?

goretkin commented 2 years ago

I probably should have made a couple of smaller PRs. I won't return to this any time soon, unfortunately. Anyone is welcome to pick up from where I left off.

In the future, I'll prefer to use a solution based off something like this post from @ericphanson

@generated function  dump(obj::T) where {T}
    #NT = NamedTuple{fieldnames(obj), Tuple{fieldtypes(obj)...}}
    return :(
                #=$NT=#(
                    tuple(
                        $(
                            (
                                :(getfield(obj, $i)) for i in 1:fieldcount(obj)
                            )...
                        )
                    )
                )
            )
end
oschulz commented 2 years ago

@andrewcooke , AutoHashEquals is still being maintained, right?

gafter commented 1 year ago

This package was completely overhauled in #32. Please submit a new issue or PR if you think there is more work to do.