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

Fix using sets with V2 `Struct` causing unhashable TypeError #7747

Merged
merged 1 commit into from May 17, 2019

Conversation

Projects
None yet
2 participants
@Eric-Arellano
Copy link
Contributor

commented May 17, 2019

Problem

When running our whole unit test suite with V2, we encounter a TypeError that sets are not hashable. This happens because one of the tests includes the value 'tags': {'platform_specific_behavior'}, which gets stored in its Struct.

Solution

Teach Struct how to safely hash set. We must first sort the set because sets have non-deterministic ordering.

@Eric-Arellano Eric-Arellano requested review from stuhood and cosmicexplorer May 17, 2019

@stuhood stuhood merged commit 7e5d82b into pantsbuild:master May 17, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Eric-Arellano Eric-Arellano deleted the Eric-Arellano:v2-struct-set-hotfix branch May 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.