[DRE-maint] Bug#849972: yard: please make the output reproducible

Chris Lamb lamby at debian.org
Mon Jan 2 19:11:55 UTC 2017


Source: yard
Version: 0.9.5-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: toolchain fileordering
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/lib/yard/parser/source_parser.rb b/lib/yard/parser/source_parser.rb
index b12d902..d6972ba 100755
--- a/lib/yard/parser/source_parser.rb
+++ b/lib/yard/parser/source_parser.rb
@@ -109,7 +109,7 @@ module YARD
             reject {|p| !File.file?(p) || excluded.any? {|re| p =~ re } }
 
           log.enter_level(level) do
-            parse_in_order(*files.uniq)
+            parse_in_order(*files.sort.uniq)
           end
         end
 


More information about the Pkg-ruby-extras-maintainers mailing list