This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Unicode has withdrawn some files in the UCD
authorKarl Williamson <khw@cpan.org>
Sun, 26 Jul 2015 04:35:36 +0000 (22:35 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 29 Jul 2015 04:15:57 +0000 (22:15 -0600)
This adds the capability to mktables to seamlessly handle the case where
Unicode has removed a file from the Unicode Character Database that
existed in prior versions.  The constructor for the object tells what
release no longer has it.  The file is looked for only when compiling a
Unicode version in the window that had it.

charclass_invlists.h
lib/unicore/mktables
regcharclass.h

index 107d327..d8dae29 100644 (file)
@@ -99521,7 +99521,7 @@ static const UV XPosixXDigit_invlist[] = { /* for EBCDIC POSIX-BC */
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * 4a10834235ba911687d3ca9e551ec3438ee1aebd4b15e88933033822d0ef698d lib/unicore/mktables
+ * 3e5d72e6b1f87e746fa1bc36c92cb1e29eaf458f1ff70a6cfdf840a0537cdaf1 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * 7b6f61662df48e0cbfb234a926e02e5cb9468af052f7f9feb84285996f30df09 regen/mk_invlists.pl
index 1e00925..a1c9f3c 100644 (file)
@@ -2282,6 +2282,11 @@ sub trace { return main::trace(@_); }
     main::set_access('required_even_in_debug_skip',
                      \%required_even_in_debug_skip, 'c');
 
+    my %withdrawn;
+    # Some files get removed from the Unicode DB.  This is a version object
+    # giving the first release without this file.
+    main::set_access('withdrawn', \%withdrawn, 'c');
+
     my %in_this_release;
     # Calculated value from %first_released and %withdrawn.  Are we compiling
     # a Unicode release which includes this file?
@@ -2360,6 +2365,13 @@ sub trace { return main::trace(@_); }
         $progress_message{$addr} = "Processing $progress"
                                             unless $progress_message{$addr};
 
+        # A file should be there if it is within the window of versions for
+        # which Unicode supplies it
+        if ($withdrawn{$addr} && $withdrawn{$addr} le $v_version) {
+            $in_this_release{$addr} = 0;
+            $skip{$addr} = "";
+        }
+        else {
             $in_this_release{$addr} = $first_released{$addr} le $v_version;
 
             # Check that the file for this object exists
@@ -2392,6 +2404,7 @@ sub trace { return main::trace(@_); }
                 # the skip reason.
                 $skip{$addr} = '$debug_skip is on'
             }
+        }
 
         if (   ! $debug_skip
             && $non_skip{$addr}
@@ -18363,6 +18376,7 @@ my @input_file_objects = (
                                             : undef),
                    ),
     Input_file->new('Unihan.txt', v2.0.0,
+                    Withdrawn => v5.2.0,
                     Pre_Handler => \&setup_unihan,
                     Optional => 1,
                     Each_Line_Handler => \&filter_unihan_line,
@@ -18532,6 +18546,7 @@ my @input_file_objects = (
     # them to work properly, which isn't worth it because of them being
     # provisional.
     Input_file->new('IndicMatraCategory.txt', v6.0.0,
+                    Withdrawn => v8.0.0,
                     Property => 'Indic_Matra_Category',
                     Has_Missings_Defaults => $NOT_IGNORED,
                     Skip => $Indic_Skip,
index 06beabf..3d09a03 100644 (file)
  * 1a0687fb9c6c4567e853913549df0944fe40821279a3e9cdaa6ab8679bc286fd lib/unicore/extracted/DLineBreak.txt
  * 40bcfed3ca727c19e1331f6c33806231d5f7eeeabd2e6a9e06a3740c85d0c250 lib/unicore/extracted/DNumType.txt
  * a18d502bad39d527ac5586d7bc93e29f565859e3bcc24ada627eff606d6f5fed lib/unicore/extracted/DNumValues.txt
- * 4a10834235ba911687d3ca9e551ec3438ee1aebd4b15e88933033822d0ef698d lib/unicore/mktables
+ * 3e5d72e6b1f87e746fa1bc36c92cb1e29eaf458f1ff70a6cfdf840a0537cdaf1 lib/unicore/mktables
  * 462c9aaa608fb2014cd9649af1c5c009485c60b9c8b15b89401fdc10cf6161c6 lib/unicore/version
  * c6884f4d629f04d1316f3476cb1050b6a1b98ca30c903262955d4eae337c6b1e regen/charset_translations.pl
  * d9c04ac46bdd81bb3e26519f2b8eb6242cb12337205add3f7cf092b0c58dccc4 regen/regcharclass.pl