From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?S=C3=A9bastien_Gendre?= Newsgroups: gmane.emacs.help Subject: Re: Dev workflow in Emacs with containers Date: Sat, 30 Nov 2024 19:21:29 +0100 Message-ID: <874j3oa8gm.fsf@k-7.ch> References: <87h67qnmae.fsf@k-7.ch> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12839"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.1; emacs 29.4 Cc: Users list for the GNU Emacs text editor To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 19:22:09 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1tHS6b-0003Ei-CS for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 19:22:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHS67-00024x-4x; Sat, 30 Nov 2024 13:21:39 -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 1tHS62-00024V-Lz for help-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:21:34 -0500 Original-Received: from 96-100-31-185.ftth.cust.kwaoo.net ([185.31.100.96] helo=k-7.ch) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHS61-00072u-48 for help-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:21:34 -0500 Original-Received: from van (_gateway [192.168.1.1]) (Authenticated sender: seb) by k-7.ch (Postfix) with ESMTPSA id A6D1EE8122; Sat, 30 Nov 2024 19:21:29 +0100 (CET) In-Reply-To: (Yuri Khan's message of "Sat, 30 Nov 2024 00:32:49 +0700") Received-SPF: pass client-ip=185.31.100.96; envelope-from=seb@k-7.ch; helo=k-7.ch X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148466 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank you for your reply. I added questions/remarks bellow. Yuri Khan writes: > 1. I have a Dockerfile or several that describes the build > environment. If necessary, a different one that describes the > runtime/debugging environment. > > 2. I have a docker-compose.yml which utilizes the image(s) built from > Dockerfile(s) of step 1, and mounts the source tree, the build > directory, etc into service containers. The compose file also arranges > for the services to run as my user ID so that I don=E2=80=99t get root-ow= ned > files in my build tree. > > The purpose of the compose file is to remember all the docker run > options for me so that I don=E2=80=99t have to specify them every time. I > could alternatively use shell scripts. > > 3. I also have a Makefile that encapsulates the build logic. In some > targets, it arranges for itself to execute in a service container > (with a different target). The purpose of the Makefile is that I could > run it either from Emacs or from local shell if I so desire. > > 4. .dir-locals.el to tell Emacs to use =E2=80=98docker-compose run --rm > runtime gdb=E2=80=99 as my debugger and =E2=80=98docker-compose run --rm = builder > clangd=E2=80=99 as my language server, and =E2=80=98make build test=E2=80= =99 as my compile > command. Seems a good way to do it. I haven't think about the language server. How do you configure the container=C2=A0? > Where practical, I prefer to mount my volumes at the same paths in the > container as locally, this simplifies the mapping a lot. But in some > cases I hook =E2=80=98compilation-filter=E2=80=99 to a function that repl= aces > prefixes. I'm very curious about your compilation filter. Can you share it=C2=A0? Best regards =2D------ Gendre S=C3=A9bastien --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI/BAEBCAApFiEEaA9vw9ypVj1kP0tAtYb3x3I54p4FAmdLV6kLHHNlYkBrLTcu Y2gACgkQtYb3x3I54p7ZFw/9GB1YhIbnFpoQsAoiwudFfxrSf2rLIJhw2O/CTYEo PBq3NMo9rLKn1AraF8Z1b/Ey9Z+sjEjQjUB4FbbmdlwtMffcwinT9L87tKqbVPSX SRgzUWPa7HzlOPCNWWl99Wiku2f7ZviOiJkDkKbGg7wcAPRaLSatvFLCSLTja04R XtNVSjdPjeO/HrS+a7OxEbNSJdF417gZNuxBL5jJ53Iav2vfK5A2QNIapIJslHR2 Blind94as3ezp2Iyyot4TsMHBtq60CMQGC7gNh2BIzZRpkREEpQYpCz9WBVPJeWr tJIMg6eYYFHRJzoWBgJOESF1aw3OGxcsaEJmqmFj8dcIpHwmJMvPgP4s8uoj9bdD CZxRugds0jEkOUEiEpiptfUOPsun/Xj13Im8LddKx8AAtwLadwGmvsh71KOWb62M 17qq75pDVdrP13BKE/u4JHotdz7zh0RcVK+am2I/5ZKRlQ7Qdh9UoSy9IPAo0z2M tuzeLHyl0HpidGRKlUNiSVk3DMEfjF5+QGl4Q2axFxomsoDpKWXDaXux3BWMdnz7 8cMbMatocVr8BJyK2SAMzh1SYaQ0pmsS9uUidb+9uCm7rKqPW0txpqq5LjOl8P4V MM8/ddt58w4dDnzbPkGz8edpb8SE+Jz2md029jzGd8bXZvKUBEl/pZaOHS+2q97I FkY= =XW+f -----END PGP SIGNATURE----- --=-=-=--