SamuraiAku / SPDX.jl

Provides for the creation, reading and writing of SPDX files in multiple file formats. Written in pure Julia.
MIT License
5 stars 1 forks source link

Enable Set and Dict operations with SPDX data types #38

Closed SamuraiAku closed 8 months ago

SamuraiAku commented 10 months ago

Set and Dict functions, such as issetequal use the hash function to determine equality and not isequal. The fallback implementation of hash doesn't work properly for SPDX datatypes because they are nearly all mutable structs and the hash of a generic mutable struct returns a different value for each instantiation, unlike an immutable struct.

Implement a custom hash function and it should solve this issue. Remember to write tests to verify this.