Make the output reproducible. #1048

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@lamby
lamby commented Jan 2, 2017

Whilst working on the Reproducible Builds effort [0], we noticed
that yardoc generates output that is not reproducible due to the
use of a fallback glob that relies on (non-deterministic)
filesystem ordering.

[0] https://reproducible-builds.org/

Signed-off-by: Chris Lamb chris@chris-lamb.co.uk

Description

Describe your pull request and problem statement here.

Completed Tasks

  • I have read the Contributing Guide.
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).
@lamby lamby Make the output reproducible.
Whilst working on the Reproducible Builds effort [0], we noticed
that yardoc generates output that is not reproducible due to the
use of a fallback glob that relies on (non-deterministic)
filesystem ordering.

 [0] https://reproducible-builds.org/

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
1c4476d
@lsegal
Owner
lsegal commented Jan 2, 2017

You would have to sort the globs, not the entire list. One of YARD's features is allowing manual ordering of the source list.

@lamby
lamby commented Jan 2, 2017

(This is also filed in Debian as https://bugs.debian.org/849972)

@coveralls
coveralls commented Jan 2, 2017 edited

Coverage Status

Coverage remained the same at 93.483% when pulling 1c4476d on lamby:reproducible-output into e8fb64a on lsegal:master.

@lamby
lamby commented Jan 2, 2017

sort the globs

Well, surely expand the default glob and sort only that, not sort the glob itself? ;)

@lsegal
Owner
lsegal commented Jan 2, 2017

Well, surely expand the default glob and sort only that, not sort the glob itself? ;)

Yes, I meant that. Also note that it is already being sorted, but by length-- that has to stick around too.

@lamby
lamby commented Jan 2, 2017

Ah, interesting. My Ruby isn't that great alas - would a patch be easy for you to prepare? Happy to test it.

@lsegal
Owner
lsegal commented Jan 2, 2017

Sure. If you close this and open an issue for the bug we can track it there.

@lamby
lamby commented Jan 2, 2017

Closing as requested in favour of #1049

@lamby lamby closed this Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment