__eq__ and __hash__ in Compiler did not account for settings.
This is actually really important in ape-vyper right now, as it groups input selections based on optimization pragmas.
How I did it
first stringify settings dict in a sorted consistent way withoutoutputSelection in it. Now, only compiler settings like evmVersion or optimization settings affect the str.
then place that str in the hash
How to verify it
when using ape-vyper 's 0.7 PR you can compile a contract with opimization pragma and it gets own Compiler entry separate from the others using the same version..
See test updates on this PR for a simpler example lol.
Checklist
[ ] Passes all linting checks (pre-commit and CI jobs)
[ ] New test cases have been added and are passing
[ ] Documentation has been updated
[ ] PR title follows Conventional Commit standard (will be automatically included in the changelog)
What I did
__eq__
and__hash__
inCompiler
did not account for settings. This is actually really important inape-vyper
right now, as it groups input selections based on optimization pragmas.How I did it
first stringify settings dict in a sorted consistent way without
outputSelection
in it. Now, only compiler settings like evmVersion or optimization settings affect the str.then place that str in the hash
How to verify it
when using
ape-vyper
's 0.7 PR you can compile a contract with opimization pragma and it gets own Compiler entry separate from the others using the same version..See test updates on this PR for a simpler example lol.
Checklist