Replies: 7 comments 10 replies
-
I've moved this to a discussion. If you've read the docs, SCons thus far hasn't required any other packages besides what's in the python distribution to run. Feel free to develop this in the scons-contrib repo if you'd like to see if you can get this working with SCons. |
Beta Was this translation helpful? Give feedback.
-
This might start with providing boilerplate code which users can integrate into their E.g. this should work (but doesn't):
https://scons.org/doc/latest/HTML/scons-api/SCons.Util#SCons.Util.hashes.set_hash_format |
Beta Was this translation helpful? Give feedback.
-
That story was kind of weird - we got some complaints that if you ran SCons in a FIPS-compliant environment (essentially, RHEL in a US-Govt setting), it failed because md5 was disabled in Python by policy. SCons doesn't use the hash for any cryptographic purpose, only for hashing. After adding other hash options than md5, a contributor figured out that Python as of 3.9 had added the option to declare that, with the new |
Beta Was this translation helpful? Give feedback.
-
Is there anything here we {could,should} improve? |
Beta Was this translation helpful? Give feedback.
-
Ok I'm back on my primary account 😂 Looking at the code, I do recommend you review #4047 : there's sections of the code that (assuming they're still the same) that you haven't patched to support the new hash algorithm. The good news is that most of the PR was spent fixing cases where the unit tests had accidental hardcoded dependencies on the .sconsign format... so most of those changes won't be needed in your PR. When I integrated SHA I added a The other thing is once you do that... it's a good idea to also integrate into the test cases modified by #4047 . Those testcases test for implicit fallback to SHA currently, but it's a similar mocking structure when you want to test for implicit fallback of xx hashing. When I implemented my first pass of #4047 ... I actually did the same thing: only integrated in the one point. When I started poking in the code I was surprised actually by how little I needed to change in the primary repo (38 files in a project as big as SCons... was a win LOL). Poke me if you need any additional tips! |
Beta Was this translation helpful? Give feedback.
-
Unrelated other than that looking at this again took me there:
would have been preferable to just leave at |
Beta Was this translation helpful? Give feedback.
-
So a few questions at the edges:
These may be too nitpicky to worry about a lot but wanted to get people thinking about it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, SCons only supports hash algorithms which are provided by the
hashlib
, but those are rather slow (in the ballpark of 1-2 GB/s).There are much faster alternatives available, e.g.
xxHash
which runs at the speed of RAM (an order of magnitude faster than MD5, up to ~30 times, according toxxHash
developers).xxHash
is readily available as a C and Python3 library via Debian repositories, so e.g. Ubuntu/Debian users can install it with ease. The hash is not cryptographic, but it's acceptable according to the comments I found in SCons code.Beta Was this translation helpful? Give feedback.
All reactions