pplu / aws-sdk-perl

A community AWS SDK for Perl Programmers
Other
171 stars 94 forks source link

Deterministic generation of synopsis #256

Open pplu opened 6 years ago

pplu commented 6 years ago

The new synopsis have lots of changes for each run of gen-classes. Diffs show that elements are just changing positions.

I'm working on fixing this for 0.38 in https://github.com/pplu/aws-sdk-perl/tree/feature/docu-deterministic-synopsis (trying to get this done quickly to get released with 0.38)

pplu commented 5 years ago

Found what could be a cause of the non-determinism:

diff --git a/builder-lib/Paws/API/Builder.pm b/builder-lib/Paws/API/Builder.pm
index 23e4794ee..732c0aeb4 100644
--- a/builder-lib/Paws/API/Builder.pm
+++ b/builder-lib/Paws/API/Builder.pm
@@ -767,7 +767,7 @@ package Paws::API::Builder {
     foreach my $ex (@{ $self->example_struct->{ $op_name } }) {
       $example_str .= "# $ex->{title}\n";
       if ($ex->{ description }) {
-        local $Text::Wrap::coloumns = 79;
+        local $Text::Wrap::columns = 79;
         local $Text::Wrap::separator = "\n# ";