From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Android port Date: Mon, 20 Feb 2023 10:37:44 +0800 Message-ID: <87wn4df4ef.fsf@yahoo.com> 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> <865ybxr80g.fsf@aarsen.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36753"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Arsen =?utf-8?Q?Arsenovi=C4=87?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 20 03:40:48 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 1pTw6h-0009NL-LW for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Feb 2023 03:40:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTw5x-0001az-KS; Sun, 19 Feb 2023 21:40:01 -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 1pTw5v-0001ao-8h for emacs-devel@gnu.org; Sun, 19 Feb 2023 21:39:59 -0500 Original-Received: from sonic317-2.consmr.mail.ne1.yahoo.com ([66.163.184.229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTw5s-0003ZQ-RN for emacs-devel@gnu.org; Sun, 19 Feb 2023 21:39:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676860793; bh=q0YqxEYbx++0Y3GtXe96of7SVKkIJiSmNnzhI/ZtpVQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=SPUpNA9YD/4gbfHLM0QfuyEw3PdAFB35Xct+YXJsDbHCeBWEc8FMzrqGH2iqQBQRdVO5TRf4Ocjj9ERsJdBbTEv2LKr9TwjBhixzzk4H1XDx8kl5jLa5LaEB5a5YB2KWz2qIGfTzutWLQ98UN+XWN3CaJG1NRryLijPXhjyaCOpK51vL3haAlPIdn/0YuEdL9m+x4jFNG4s31QvCCjpmJ04oaaJ2C+UtcmjIM99HEBMWdyNkNUYKKLYpsCFZVePpJ7hZ492pzTKt7UpirIAZ2bC+WHhePAjxmPTmR/z6uHFKtN8yaYEM3nYsTk+h06TYuGMXxl3ea2/aOpVCguVsog== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676860793; bh=u93OmiAqyltC871SajW4vADNdM8z9cCJlJK0v/vWTBW=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=A+hgUW06wXiuhXFkl72yA2xvqGwX0UxrNSiYPLsWZMBQBtUFiGoLeTPfa5nd4PYRdn2Olu5oNk/gRNiaOTHxmBYr8E2GS19BHPx7ocHxQln9vyRaTFUZEaAW01F+TdLZRTn+aJwErEljsDGmCaOlzjnOazQc1ZDhwHAf0ODKRHnv9tzoun9RHAGCcvtaX4eqrzBY3q0tVHsN/0xeEXft9g/FNDCTQB062rSuFPYuRfko8hxkMuOUV4idI4YxwxaxQA+FWTjwmTrvPx976U94taOCEYZPVo8Lu7YDCir0fOn1vpSJ85bHerl5ivEJsw8aD65kuGJoW32c6ZmFFbcFxw== X-YMail-OSG: oM5VUfAVM1n8wKWTGQopgrylWIsEuB_fDfZqMWoL2v1ZLmTgtxWW.Q81PXDgPFt O3zltB4oCuHodWVg9Ez_nG5FjY0V7tLQzL8s7rRiGBuAsmm7jBhOUDfsd4oErFlUTWM8P2pzOJdO NW5v6Kh9Y.gHoQlwcqNaEWiZdAFCEVkPge1F2wEOriZBt9_KR2b0PYWGEYKXJB8vpZSay0zRixHL Tg3QTuXa2mHdBt5JMh_J_lApTSGiDwJZnFz6BHxQ.9YkEu6TDRt0A8PE5Z3Vsz4ZTrRDpUI5kqNB W25FxFKA.oa_ZgZefq5faTvSehv0yNWabBXEl_WiVnANP8oaRXBDzapPC5HRlEwt7kS6SUtroqrl O72aMCdrpk4mmElkyfZrgEW85F3t4n3YOn.WBN8Bbw5x8hp8qQgyt9Wfb71PVHPE1UyQig0zQPgk BBbOVWbhbyKH92R8aNjHdLZzpv3SeV5IRPS.DO_Z0GtkkR.FPU732pT6paUEAQzPRyxZRl7UP3PT Z9Tq.8M3QBYWRCJemoKJblH9EjlXo_xUa0jS8jMyaKFUuUuqzBaOLBTfZDnPHzkFDlZe_4t5i.jI Ak1O3o1o2E5yzdCccu6bHJtOut1KUUtYawistR6swVJ1fYZH8pdxvS_aXx.2brB0gx62720xIq_1 4a38sExbgNQ9kvTjMvtlvUAFP1nm18GXLX.V7Gk0EWlBu7vf9T0NsK9sLscpR_S53UN9KMC0prSR bb4C9PMbc1O8UUGurTnriZEcSXpkRJqpf87X9TZpCT4wlBMfGZllYZRMJ4XQSpADUow11R8NINNF NOWz7hCqWwobS79aD2NI0iz8tpt4DwFhfhgKuP0Hro X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Mon, 20 Feb 2023 02:39:53 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-b8cx5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 54a87fa8bd6eea17a0cc6fcb55c7352c; Mon, 20 Feb 2023 02:37:49 +0000 (UTC) In-Reply-To: <865ybxr80g.fsf@aarsen.me> ("Arsen =?utf-8?Q?Arsenovi=C4=87?= =?utf-8?Q?=22's?= message of "Sun, 19 Feb 2023 16:13:47 +0100") X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.229; envelope-from=luangruo@yahoo.com; helo=sonic317-2.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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:303592 Archived-At: Arsen Arsenovi=C4=87 writes: > Hi, > > I encountered another one: > > javac -classpath "/home/arsen/Android/Sdk/platforms/android-Tiramisu/an= droid.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 -so= urce 7 > warning: [options] source value 7 is obsolete and will be removed in a = future release > warning: [options] target value 7 is obsolete and will be removed in a = future release > warning: [options] To suppress warnings about obsolete options, use -Xl= int:-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= manager; > 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 -so= urce 7 > warning: [options] source value 7 is obsolete and will be removed in a = future release > warning: [options] target value 7 is obsolete and will be removed in a = future release > warning: [options] To suppress warnings about obsolete options, use -Xl= int:-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= org/gnu/emacs/EmacsService.class > JAVAC org/gnu/emacs/EmacsService.class > warning: [options] bootstrap class path not set in conjunction with -so= urce 7 > warning: [options] source value 7 is obsolete and will be removed in a = future release > warning: [options] target value 7 is obsolete and will be removed in a = future release > warning: [options] To suppress warnings about obsolete options, use -Xl= int:-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 -so= urce 7 > warning: [options] source value 7 is obsolete and will be removed in a = future release > warning: [options] target value 7 is obsolete and will be removed in a = future release > warning: [options] To suppress warnings about obsolete options, use -Xl= int:-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. > > From faf8fc54ad1d835d843e33833715eed2af83d517 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 c= lass > > * java/org/gnu/emacs/EmacsService.java (Holder): Move from here > to... > * java/org/gnu/emacs/Holder.java: ... here. New file. > --- > 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/Em= acsService.java > index ba6ec485d62..18cbb06eaa8 100644 > --- a/java/org/gnu/emacs/EmacsService.java > +++ b/java/org/gnu/emacs/EmacsService.java > @@ -62,11 +62,6 @@ >=20=20 > import android.hardware.input.InputManager; >=20=20 > -class Holder > -{ > - T thing; > -}; > - > /* EmacsService is the service that starts the thread running Emacs > and handles requests by that Emacs instance. */ >=20=20 > diff --git a/java/org/gnu/emacs/Holder.java b/java/org/gnu/emacs/Holder.j= ava > new file mode 100644 > index 00000000000..41866084ab9 > --- /dev/null > +++ b/java/org/gnu/emacs/Holder.java > @@ -0,0 +1,6 @@ > +package org.gnu.emacs; > + > +class Holder > +{ > + T thing; > +}; > --=20 > 2.39.2 > > > I also tested the above by making EmacsDialog.class on a clean > configure, triggering the edge case. > > Thanks in advance. Thanks. The make depends thing is supposed to be done by javac internally, and it should scan through source files in org/gnu/emacs to find missing definitions. I will try to fix the group rule definition.