aboutsummaryrefslogtreecommitdiff
From 56ae699a27eca52cc0bb14cbc9944b62136be52b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sun, 20 Sep 2020 21:07:29 +0200
Subject: [PATCH] Separate addPropertyAliases in two methods

The quantity of data used to generate addPropertyAliases creates a big
method, that is too big for java and results in "error: code too large".
This is most likely due to added data between the expected version of
icu and the actual version of icu in Guix.
---
 .../org/antlr/v4/tool/templates/unicodedata.st | 15 ++++++++++++---
 .../unicode/UnicodeDataTemplateController.java | 18 ++++++++++--------
 2 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/tool/resources/org/antlr/v4/tool/templates/unicodedata.st b/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
index f5052b7..125d15b 100644
--- a/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
+++ b/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
@@ -1,4 +1,4 @@
-unicodedata(propertyCodePointRanges, propertyAliases) ::= <<
+unicodedata(propertyCodePointRanges, propertyAliasesA, propertyAliasesB) ::= <<
 package org.antlr.v4.unicode;
 
 import java.util.Arrays;
@@ -17,7 +17,7 @@ public enum UnicodeData {
 	;
 
 	private static final Map\<String, IntervalSet\> propertyCodePointRanges = new HashMap\<String, IntervalSet\>(<length(propertyCodePointRanges)>);
-	private static final Map\<String, String\> propertyAliases = new HashMap\<String, String\>(<length(propertyAliases)>);
+	private static final Map\<String, String\> propertyAliases = new HashMap\<String, String\>(<length(propertyAliasesA)> + <length(propertyAliasesB)>);
 
 	// Work around Java 64k bytecode method limit by splitting up static
 	// initialization into one method per Unicode property
@@ -33,8 +33,17 @@ static private void addProperty<i>() {
 \}}; separator="\n\n">
 
 	// Property aliases
+	static private void addPropertyAliasesA() {
+		<propertyAliasesA.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliasesA.(k)>".toLowerCase(Locale.US)); }; separator="\n">
+	}
+
+	static private void addPropertyAliasesB() {
+		<propertyAliasesB.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliasesB.(k)>".toLowerCase(Locale.US)); }; separator="\n">
+	}
+
 	static private void addPropertyAliases() {
-		<propertyAliases.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliases.(k)>".toLowerCase(Locale.US)); }; separator="\n">
+        addPropertyAliasesA();
+        addPropertyAliasesB();
 	}
 
 	// Put it all together
diff --git a/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java b/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
index 570190c..692cee0 100644
--- a/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
+++ b/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
@@ -74,17 +74,19 @@ public abstract class UnicodeDataTemplateController {
 		addTR35ExtendedPictographicPropertyCodesToCodePointRanges(propertyCodePointRanges);
 		addEmojiPresentationPropertyCodesToCodePointRanges(propertyCodePointRanges);
 
-		Map<String, String> propertyAliases = new LinkedHashMap<String, String>();
-		addUnicodeCategoryCodesToNames(propertyAliases);
-		addUnicodeBinaryPropertyCodesToNames(propertyAliases);
-		addUnicodeScriptCodesToNames(propertyAliases);
-		addUnicodeBlocksToNames(propertyAliases);
-		addUnicodeIntPropertyCodesToNames(propertyAliases);
-		propertyAliases.put("EP", "Extended_Pictographic");
+		Map<String, String> propertyAliasesA = new LinkedHashMap<String, String>();
+		Map<String, String> propertyAliasesB = new LinkedHashMap<String, String>();
+		addUnicodeCategoryCodesToNames(propertyAliasesA);
+		addUnicodeBinaryPropertyCodesToNames(propertyAliasesA);
+		addUnicodeScriptCodesToNames(propertyAliasesA);
+		addUnicodeBlocksToNames(propertyAliasesB);
+		addUnicodeIntPropertyCodesToNames(propertyAliasesB);
+		propertyAliasesB.put("EP", "Extended_Pictographic");
 
 		Map<String, Object> properties = new LinkedHashMap<String, Object>();
 		properties.put("propertyCodePointRanges", propertyCodePointRanges);
-		properties.put("propertyAliases", propertyAliases);
+		properties.put("propertyAliasesA", propertyAliasesA);
+		properties.put("propertyAliasesB", propertyAliasesB);
 		return properties;
 	}
 
-- 
2.28.0

t upon shutdown....Fixes <https://issues.guix.gnu.org/56209>. Reported by angry rectangle <angryrectangle@cock.li>. * gnu/packages/admin.scm (shepherd-0.9)[modules, snippet]: New fields. * gnu/services/base.scm (%root-file-system-shepherd-service): In 'stop' method, remove 'call-with-blocked-asyncs'. When 'mount' throws to 'system-error, call (@ (fibers) sleep) and try again. * gnu/tests/base.scm (run-root-unmount-test): New procedure. (%test-root-unmount): New variable. Ludovic Courtès 2022-03-19tests: install: Adjust the timeouts on two failing tests....The 'login on tty1' and 'getlogin on tty1' tests were failing on a machine equipped with slower hard drives. * gnu/tests/base.scm (run-basic-test) ["login on tty1", "getlogin on tty1"]: Bump timeout from 10 to 30 s. Maxim Cournoyer 2021-11-11gnu: glibc: Look for the current timezone in /etc/localtime....Fixes <https://issues.guix.gnu.org/50830>. Reported by podiki on #guix. Previously, glibc 2.33 would look for /gnu/store/...-glibc-2.33/etc/localtime instead of /etc/localtime. * gnu/packages/base.scm (glibc)[arguments]: Remove #:make-flags. [phases]: In 'pre-configure', modify 'inet/Makefile' instead of 'sunrpc/Makefile' since this is where these bits are in 2.33. (glibc-2.31)[arguments]: Add 'set-etc-rpc-installation-directory' phase. (glibc-2.30): Inherit from GLIBC-2.31. * gnu/tests/base.scm (run-basic-test)["libc honors /etc/localtime"]: New test. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Ludovic Courtès 2021-09-27tests: base: Fix the screendump test....* gnu/tests/base.scm (run-basic-test): Look for the screendump capture where it has been saved, in the output directory. Mathieu Othacehe 2021-09-26tests: Reduce boilerplate for users of 'system-test-runner'....* gnu/tests/audio.scm, gnu/tests/base.scm, gnu/tests/ci.scm, gnu/tests/cups.scm, gnu/tests/databases.scm, gnu/tests/desktop.scm, gnu/tests/dict.scm, gnu/tests/docker.scm, gnu/tests/file-sharing.scm, gnu/tests/ganeti.scm, gnu/tests/guix.scm, gnu/tests/ldap.scm, gnu/tests/linux-modules.scm, gnu/tests/mail.scm, gnu/tests/messaging.scm, gnu/tests/monitoring.scm, gnu/tests/networking.scm, gnu/tests/nfs.scm, gnu/tests/package-management.scm, gnu/tests/reconfigure.scm, gnu/tests/rsync.scm, gnu/tests/security-token.scm, gnu/tests/singularity.scm, gnu/tests/ssh.scm, gnu/tests/telephony.scm, gnu/tests/version-control.scm, gnu/tests/virtualization.scm, gnu/tests/web.scm: Remove (mkdir #$output) (chdir #$output) and pass #$output as argument to 'system-test-runner'. Ludovic Courtès 2021-09-25tests: Adjust to SRFI-64 as found in Guile 3.0.7....In Guile 3.0.7, 'test-runner-current' is set to #f upon 'test-end'. Consequently, the previous strategy, where we'd call 'test-runner-current' after 'test-end', no longer works. Instead, set the test runner in each test right before 'test-begin'. * gnu/build/marionette.scm (system-test-runner): New procedure. * gnu/tests/audio.scm (run-mpd-test): Replace (exit (= ...)) idiom by (test-runner-current (system-test-runner)). * gnu/tests/base.scm (run-basic-test) (run-cleanup-test, run-mcron-test, run-nss-mdns-test): Likewise. * gnu/tests/ci.scm (run-laminar-test): Likewise. * gnu/tests/cups.scm (run-cups-test): Likewise. * gnu/tests/databases.scm (run-memcached-test) (run-postgresql-test, run-mysql-test): Likewise. * gnu/tests/desktop.scm (run-elogind-test): Likewise. * gnu/tests/dict.scm (run-dicod-test): Likewise. * gnu/tests/docker.scm (run-docker-test): Likewise. (run-docker-system-test): Likewise. * gnu/tests/file-sharing.scm (run-transmission-daemon-test): Likewise. * gnu/tests/ganeti.scm (run-ganeti-test): Likewise. * gnu/tests/guix.scm (run-guix-build-coordinator-test): Likewise. (run-guix-data-service-test): Likewise. * gnu/tests/ldap.scm (run-ldap-test): Likewise. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test-base): Likewise. * gnu/tests/mail.scm (run-opensmtpd-test) (run-exim-test, run-dovecot-test, run-getmail-test): Likewise. * gnu/tests/messaging.scm (run-xmpp-test) (run-bitlbee-test, run-quassel-test): Likewise. * gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test) (run-zabbix-server-test): Likewise. * gnu/tests/networking.scm (run-inetd-test, run-openvswitch-test) (run-dhcpd-test, run-tor-test, run-iptables-test, run-ipfs-test): Likewise. * gnu/tests/nfs.scm (run-nfs-test) (run-nfs-server-test, run-nfs-root-fs-test): Likewise. * gnu/tests/package-management.scm (run-nix-test): Likewise. * gnu/tests/reconfigure.scm (run-switch-to-system-test) (run-upgrade-services-test, run-install-bootloader-test): Likewise. * gnu/tests/rsync.scm (run-rsync-test): Likewise. * gnu/tests/security-token.scm (run-pcscd-test): Likewise. * gnu/tests/singularity.scm (run-singularity-test): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/telephony.scm (run-jami-test): Likewise. * gnu/tests/version-control.scm (run-cgit-test): Likewise. (run-git-http-test, run-gitolite-test, run-gitile-test): Likewise. * gnu/tests/virtualization.scm (run-libvirt-test, run-childhurd-test): Likewise. * gnu/tests/web.scm (run-webserver-test, run-php-fpm-test) (run-hpcguix-web-server-test, run-tailon-test, run-patchwork-test): Likewise. Ludovic Courtès 2021-04-13tests: halt: Fix it....This fixes: <https://issues.guix.gnu.org/47727>. The OCR prompt detection is failing, so remove it altogether. It looks like the test doesn't need the prompt detection delay to work properly. * gnu/tests/base.scm (run-halt-test): Remove failing OCR detection. Mathieu Othacehe 2020-10-26tests: Fix nss-mdns test....* gnu/tests/base.scm (run-nss-mdns-test): Use full "avahi-browse" path. Mathieu Othacehe 2020-09-10tests: install: Fix gui-installed-desktop-os-encrypted test....* gnu/tests/base.scm (run-basic-test): Add a 'desktop?' argument. Wait 30 seconds before trying to switch to TTY1 on desktop. * gnu/tests/install.scm (guided-installation-test): Use 512MiB of RAM and pass the desktop argument to "run-basic-test". Mathieu Othacehe