Closed lamby closed 6 years ago
I'm not entirely sure what happened in #146, but trying again here assuming good faith all round :)
@lamby fs.readdirSync uses readdir(3) underneath which has non-deterministic ordering according to the documentation:
The order in which filenames are read by successive calls to
readdir() depends on the filesystem implementation; it is unlikely
that the names will be sorted in any fashion.
I think this list needs to be sorted explicitly.
I think this list needs to be sorted explicitly.
Thanks, updated. (Curiously, when I was trying the ++idx
patch I was running under disorderfs and, as I wasn't seeing any variation, I thus assumed readdirSync was sorted.)
Hey folks, any update on this?
@lamby The ball is in your court. I've explained what I'd like to see in order to merge this:
Thanks @ForbesLindesay, I must have missed that comment. Updated patch pushed, rebased against master
. Thanks o/
Whilst working on the Reproducible Builds effort [0], we noticed that node-promise could not be built reproducibly as it uses random numbers as throwaway identifiers.
This patch uses a determinstic suffix for these identifiers based on the contents of the src/ directory.
This was filed in @Debian as https://bugs.debian.org/886277. There was also a previous aborted attempt in #146.
[0] https://reproducible-builds.org/ [1] https://github.com/then/promise/pull/146
Signed-off-by: Chris Lamb chris@chris-lamb.co.uk