From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arsen =?utf-8?Q?Arsenovi=C4=87?= Newsgroups: gmane.emacs.devel Subject: Re: Android port Date: Sun, 19 Feb 2023 16:13:47 +0100 Message-ID: <865ybxr80g.fsf@aarsen.me> References: <87ttzkmrw1.fsf.ref@yahoo.com> <87ttzkmrw1.fsf@yahoo.com> <86wn4ga1pa.fsf@aarsen.me> <86wn4d3luy.fsf@aarsen.me> <87ilfxhmlv.fsf@yahoo.com> <875ybxhhae.fsf@yahoo.com> <86ilfx3eff.fsf@aarsen.me> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 19 16:27:27 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTlb5-0002sQ-JG for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Feb 2023 16:27:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTlaV-0006FB-G6; Sun, 19 Feb 2023 10:26:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTlaS-0006Ed-Ih for emacs-devel@gnu.org; Sun, 19 Feb 2023 10:26:48 -0500 Original-Received: from mout-p-101.mailbox.org ([80.241.56.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pTlaQ-0005BW-Ih for emacs-devel@gnu.org; Sun, 19 Feb 2023 10:26:48 -0500 Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PKTt96hnrz9sS1; Sun, 19 Feb 2023 16:26:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1676820401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bKDNTo3Mdy/49yxUeK6GxmGkGvqjdxOOXpcyBLKsuSk=; b=ALVar5QSVmYoZBGehIR4gD0LRVhCVjgRLBEWtHFyKDNA/Du+3doFK8hRw+EyiIx9DFYRVI z3N2azjj2C8/Ifihrh5JlCBzo9nddq3lYDSvOrIae7Z4Cogi7RoNC9JOkDI4PX0YNlzgi3 PUIbELTmgjZJ80FYs6goP0V4WwMWUBPC4zpgoHVoP+kgxXtfgxWFMfPv3+JNtYSzkHUY2K /kmWA7z8tx/AuUH2VGqlTTlZBzDfLFAusM85/336HJ6YjX00X1R9ZjFu9ozrE3iilZr8oe p5hwuB3x5BltnE3o5aiAegHBHp/OH5+d7Trj58zsHRFGK2ytzWCdkWVB1EBDiA== In-reply-to: <86ilfx3eff.fsf@aarsen.me> Received-SPF: pass client-ip=80.241.56.151; envelope-from=arsen@aarsen.me; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303576 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, I encountered another one: javac -classpath "/home/arsen/Android/Sdk/platforms/android-Tiramisu/andr= oid.jar:." -target 1.7 -source 1.7 -Xlint:d eprecation org/gnu/emacs/EmacsContextMenu.java warning: [options] bootstrap class path not set in conjunction with -sour= ce 7 warning: [options] source value 7 is obsolete and will be removed in a fu= ture release warning: [options] target value 7 is obsolete and will be removed in a fu= ture release warning: [options] To suppress warnings about obsolete options, use -Xlin= t:-options. org/gnu/emacs/EmacsContextMenu.java:265: error: cannot find symbol final Holder rc; ^ symbol: class Holder location: class EmacsContextMenu org/gnu/emacs/EmacsContextMenu.java:267: error: cannot find symbol rc =3D new Holder (); ^ symbol: class Holder location: class EmacsContextMenu 2 errors 4 warnings make[2]: *** [Makefile:261: org/gnu/emacs/EmacsContextMenu.class] Error 1= shuffle=3D2758590628 I tried replicating with that shuffle=3D value, but it seems that I did not get lucky twice. However, I believe I have the reason why: ~/gnu/emacs-android2 130 $ grep -r --include=3D'*.java' Holder java/org/gnu/emacs/EmacsService.java:class Holder java/org/gnu/emacs/EmacsService.java: final Holder view; java/org/gnu/emacs/EmacsService.java: view =3D new Holder (= ); java/org/gnu/emacs/EmacsService.java: final Holder m= anager; java/org/gnu/emacs/EmacsService.java: manager =3D new Holder (); java/org/gnu/emacs/EmacsDialog.java: final Holder rc; java/org/gnu/emacs/EmacsDialog.java: rc =3D new Holder (); java/org/gnu/emacs/EmacsContextMenu.java: final Holder rc; java/org/gnu/emacs/EmacsContextMenu.java: rc =3D new Holder (= ); There is no dependency between these Holder users and the .java that provides it: ~/gnu/emacs-android2/java$ rm org/gnu/emacs/EmacsDialog.class ~/gnu/emacs-android2/java$ make org/gnu/emacs/EmacsDialog.class JAVAC org/gnu/emacs/EmacsDialog.class warning: [options] bootstrap class path not set in conjunction with -sour= ce 7 warning: [options] source value 7 is obsolete and will be removed in a fu= ture release warning: [options] target value 7 is obsolete and will be removed in a fu= ture release warning: [options] To suppress warnings about obsolete options, use -Xlin= t:-options. org/gnu/emacs/EmacsDialog.java:302: error: cannot find symbol final Holder rc; ^ symbol: class Holder location: class EmacsDialog org/gnu/emacs/EmacsDialog.java:304: error: cannot find symbol rc =3D new Holder (); ^ symbol: class Holder location: class EmacsDialog 2 errors 4 warnings make: *** [Makefile:261: org/gnu/emacs/EmacsDialog.class] Error 1 ~/gnu/emacs-android2/java 2 $ rm org/gnu/emacs/EmacsService.class; make o= rg/gnu/emacs/EmacsService.class JAVAC org/gnu/emacs/EmacsService.class warning: [options] bootstrap class path not set in conjunction with -sour= ce 7 warning: [options] source value 7 is obsolete and will be removed in a fu= ture release warning: [options] target value 7 is obsolete and will be removed in a fu= ture release warning: [options] To suppress warnings about obsolete options, use -Xlin= t:-options. 4 warnings ~/gnu/emacs-android2/java$ make org/gnu/emacs/EmacsDialog.class JAVAC org/gnu/emacs/EmacsDialog.class warning: [options] bootstrap class path not set in conjunction with -sour= ce 7 warning: [options] source value 7 is obsolete and will be removed in a fu= ture release warning: [options] target value 7 is obsolete and will be removed in a fu= ture release warning: [options] To suppress warnings about obsolete options, use -Xlin= t:-options. 4 warnings ~/gnu/emacs-android2/java$=20 The simplest way to fix it is probably to break out Holder into Holder.java, as that won't require manually bookkeeping the dependencies. I attached a patch, which builds on x86_64-pc-linux-gnu. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-java-Resolve-possible-parallelism-error-across-Holde.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] java: Resolve possible parallelism error across Holder class From=20faf8fc54ad1d835d843e33833715eed2af83d517 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Arsen=3D20Arsenovi=3DC4=3D87?=3D Date: Sun, 19 Feb 2023 16:21:02 +0100 Subject: [PATCH] java: Resolve possible parallelism error across Holder cla= ss * java/org/gnu/emacs/EmacsService.java (Holder): Move from here to... * java/org/gnu/emacs/Holder.java: ... here. New file. =2D-- java/org/gnu/emacs/EmacsService.java | 5 ----- java/org/gnu/emacs/Holder.java | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 java/org/gnu/emacs/Holder.java diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/Emac= sService.java index ba6ec485d62..18cbb06eaa8 100644 =2D-- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java @@ -62,11 +62,6 @@ =20 import android.hardware.input.InputManager; =20 =2Dclass Holder =2D{ =2D T thing; =2D}; =2D /* EmacsService is the service that starts the thread running Emacs and handles requests by that Emacs instance. */ =20 diff --git a/java/org/gnu/emacs/Holder.java b/java/org/gnu/emacs/Holder.java new file mode 100644 index 00000000000..41866084ab9 =2D-- /dev/null +++ b/java/org/gnu/emacs/Holder.java @@ -0,0 +1,6 @@ +package org.gnu.emacs; + +class Holder +{ + T thing; +}; =2D-=20 2.39.2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I also tested the above by making EmacsDialog.class on a clean configure, triggering the edge case. Thanks in advance. =2D-=20 Arsen Arsenovi=C4=87 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCY/I/r18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTSxsBAL1S4cwo0NUIm+p9xIyy2kbezH6Hvh7y3OYg OHnS7qJUAP495D11sON+KGD2DmpB1IKBl6/ft+ZKqvHiIcUvN/LXCA== =kWST -----END PGP SIGNATURE----- --==-=-=--