On 9/2/20 12:53 PM, Petar Kirov [ZombineDev] wrote:
I understand your idea to make this configurable, but this will introduce more complexity than necessary because then $HOME/.dub/packages will have build artifacts based on both SHA1 and SHA256, and so dub will need to support mixed mode file integrity checking.
Yesterday I thought about it and now I believe that if you change sha1 to sha256 or vice versa then dub just rebuild all because sha1 and sha256 has different sizes so cached hashes will be different to calculated ones and collisions are impossible. No need to support mixed mode. The drawback is total rebuild on algorithm changing but I suppose it will be seldom operation. Another way is to having several hashes simultaneously and select one of them depending on option value. Implementation of this will be simple.
