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

Make type hashing :total #52427

Merged
merged 5 commits into from Dec 7, 2023
Merged

Conversation

Seelengrab
Copy link
Contributor

Since types can't really be deleted and the hash of a type is already being cached inside of the type object itself, it should be legal to mark the ccall retrieving that hash as :total, permitting hashing of types to be concretely evaluated.

I'm unsure if the test I've added is good as written, or whether this should be done differently.

@Tokazama
Copy link
Contributor

Tokazama commented Dec 6, 2023

I thought the hash of data types could change between runs

@vtjnash
Copy link
Sponsor Member

vtjnash commented Dec 7, 2023

That was fixed on master recently, so we should remove that documentation

test/hashing.jl Outdated Show resolved Hide resolved
@Seelengrab
Copy link
Contributor Author

I think "run to run" in that documentation refers to different invocations of julia/"sessions of the REPL", not different queries of hash, so that should already be consistent.

test/hashing.jl Outdated Show resolved Hide resolved
base/hashing.jl Outdated Show resolved Hide resolved
Seelengrab and others added 5 commits December 7, 2023 21:46
Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
@aviatesk aviatesk merged commit 710bf90 into JuliaLang:master Dec 7, 2023
5 of 7 checks passed
@Seelengrab Seelengrab deleted the type_hash_effects branch December 7, 2023 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants