From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WF9CAS/J1mas7gAAqHPOHw:P1 (envelope-from ) for ; Tue, 03 Sep 2024 08:30:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WF9CAS/J1mas7gAAqHPOHw (envelope-from ) for ; Tue, 03 Sep 2024 10:30:39 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=DMawUY9M; dkim=fail ("headers rsa verify failed") header.d=friendly-machines.com header.s=dreamhost header.b=eun4r0ik; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:mailchannels.net:reject}") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725352239; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lCltoXvB4KAY9kCK7wCbtPF/+ciURsOChndXGsyEsS8=; b=Ph4eVCXBV5YH4kSuDQj2ty3xE7i1q2Ak4BGiwK3fjkVe6DbjNJHvvjquIlsN3m078kMhJU /p1gZn4Y1IPxsnx+n11VC0LmWb7H0ZSOL8Cnwsp9qh7PUHLBxWNSzhPp/c3WH9nmMHoxPa mRfJUpN+Epj9gJ0v5eb+ot1D8wljdsFoTJkTmchTLQ1LvIV27kqWjsdYGu2DPUlBX2DsPC Gk0jZQkFCdyNAUyLv/4h1rNNSmxC3HZxD7/rtmlSU87snt4mkiyOj3rTXRiW/tumxjo3TL 8XRaQkkYnOEH/P/Qn9yMI+l7pJezabZHSOjSltxlMzxy0GAqUSlZlTrEFDVEHg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1725352239; a=rsa-sha256; cv=fail; b=ODnLNOKlqcdJQ2IVe82LFlyo8TMVWoe249rP81pKG3fBDnECKe3iwMzpilK3NFOcr/4UmM OanovMxEDwNE6ZeEBaCTnFjzYGNydHCk3RG7G1J8Gb0+RcAsD0/KaY2PTauKPRyEZtqkFi DAo4pyEn8ZsXA2F6VPtHt+0T0kNxNWYqEngV8fonGldLiW1FydW2qoOqzzfdlCm2Fbz+FN Vvk5F0bjw5pm6A49Aa4C9SOJOxSsF8FHpl+Vy+2+8xB5jEaJtaLLjNsMczLjRRiZUCNwjE yZZYGS52WeJSeyZhwwllOUdPlKeqy4ZvBxPsoxgQkC83tg+V2/PwUsScTOCc5w== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=DMawUY9M; dkim=fail ("headers rsa verify failed") header.d=friendly-machines.com header.s=dreamhost header.b=eun4r0ik; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:mailchannels.net:reject}") Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3B4D57AB2D for ; Tue, 3 Sep 2024 10:30:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slOvl-0001H2-KH; Tue, 03 Sep 2024 04:30:29 -0400 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 1slLDy-0002Fm-9p for guix-patches@gnu.org; Tue, 03 Sep 2024 00:33:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slLDy-0001Ny-0I for guix-patches@gnu.org; Tue, 03 Sep 2024 00:33:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=lCltoXvB4KAY9kCK7wCbtPF/+ciURsOChndXGsyEsS8=; b=DMawUY9MAUF9yDYODm6UoTP+Bx5+V8nXLMkcN9J/Tj0fsyNhJ1McSD7FpY4OJyZmY6nTgwxbtFW7i2iFAf6EDTOrcS+0sEL4nHoCBhKU2r4xZ0syqa/3vCgqxckReBlkUhz8emRXiJ1m1YrM31rbujdzz0MEMHkgGGCTdiuq/W//cygarOp2KyNCOENYlSSm/XqtBuMz4tHwf3kWoPQNa4U6cFsi5NTYT0FO9p1WsUm7gGCo+rGr5IS7MyS73cRKgMlbfVaawjN2geBZAwP6Yatd76qyjTHB0frEM1s+mybsiN559ojqB16nLie4PXoyt0d2vLV14oWuH+X5hr4gSQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slLEw-0003qk-Ct; Tue, 03 Sep 2024 00:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72994] [PATCH] gnu: emacs-julia-snail: Vendor julia libraries. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Tue, 03 Sep 2024 04:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72994 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72994@debbugs.gnu.org Cc: Danny Milosavljevic , Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler Received: via spool by submit@debbugs.gnu.org id=B.172533801014734 (code B ref -1); Tue, 03 Sep 2024 04:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Sep 2024 04:33:30 +0000 Received: from localhost ([127.0.0.1]:56212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slLEO-0003pX-NP for submit@debbugs.gnu.org; Tue, 03 Sep 2024 00:33:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:52110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slH1G-0003eJ-SF for submit@debbugs.gnu.org; Mon, 02 Sep 2024 20:03:40 -0400 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 1slH0H-0006PD-3u for guix-patches@gnu.org; Mon, 02 Sep 2024 20:02:37 -0400 Received: from butterfly.birch.relay.mailchannels.net ([23.83.209.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slH0E-0006Eh-ML for guix-patches@gnu.org; Mon, 02 Sep 2024 20:02:36 -0400 X-Sender-Id: dreamhost|x-authsender|dannym@friendly-machines.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7EABC105711; Tue, 3 Sep 2024 00:02:24 +0000 (UTC) Received: from pdx1-sub0-mail-a290.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2D4A1105429; Tue, 3 Sep 2024 00:02:24 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1725321744; a=rsa-sha256; cv=none; b=4/UksnxieAzeQUdKtPIywaat1ntWDyHHZq4PpaLALClgOwjVK8lK1kTxU7IykvS7p32ns3 eOOszDN3XimvDqWk/9sMdPnrDv9taP7xSYOHiIJgsrDiq+/b5gxmV7fxAyaWx9A+RMpQaV Pbbdalj8Y9s6dhmd+Dva7+jUYzZj53UNd+IRuHllboJ1lI/gIEfp2AnURdedM8dCq/mAu0 boq3/yizsEejSuQ/evHqo8fYhZuXi9dr/27zA20969a5yKrKPm4wQYpYR48tpWtqqxIWoW xlYhQ+G2Dy4LykpsNBeLNJtm6gulV4kxn66qRRU89LnEA9IuswmLbeTXB5sWIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1725321744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=lCltoXvB4KAY9kCK7wCbtPF/+ciURsOChndXGsyEsS8=; b=EKUaaeD8qj5CXacny8DehxvpYzQ2/dPIiHyzy64DHzsQtli/0fUkJbg6aWeW0MMtY1CgD4 Y8K5vOyWKbrCjkO5FOEW4T9s769ftO8eAVSwzhIzLCfPPLPTofBw2/o3fxqUwitTdQH22C 5qqPX7Jta36jokC+lO+KvayZe+55y5X1mwDulsG/0ZpRBGcitZUvkUI0dpVvwWvT9afKMk 2D4h4R17XXPX2tSkUSwRN1edECldn49/52+y0PquhKNe3oOmzKxC6QgN7QPIuaoAb2NKkl 0xGE53HuAr2ndRd2pDbvwjY7+MdEAkoDMV3+LgGkyZh+K43qSs7QJviXQOl8lQ== ARC-Authentication-Results: i=1; rspamd-6b9c67f469-nnlvl; auth=pass smtp.auth=dreamhost smtp.mailfrom=dannym@friendly-machines.com X-Sender-Id: dreamhost|x-authsender|dannym@friendly-machines.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dannym@friendly-machines.com X-MailChannels-Auth-Id: dreamhost X-Turn-Lyrical: 038e4a5f47b91cba_1725321744401_3168285155 X-MC-Loop-Signature: 1725321744400:3753273688 X-MC-Ingress-Time: 1725321744400 Received: from pdx1-sub0-mail-a290.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.99.242.198 (trex/7.0.2); Tue, 03 Sep 2024 00:02:24 +0000 Received: from localhost (84-115-227-100.cable.dynamic.surfer.at [84.115.227.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dannym@friendly-machines.com) by pdx1-sub0-mail-a290.dreamhost.com (Postfix) with ESMTPSA id 4WyQmH4nvWz4S; Mon, 2 Sep 2024 17:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=friendly-machines.com; s=dreamhost; t=1725321744; bh=lCltoXvB4KAY9kCK7wCbtPF/+ciURsOChndXGsyEsS8=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=eun4r0ikvCYOBuwpg3R3mxwTMbcWq6LnQJ9JRvjppsF7tz+Beb/zVavIGjHyk2Jqo qogqAV5CV8aW9ByTllaQD0RYxy0Maw1lLpbl6klHLKZyQBLqDYrIREbzHz38dDqS7l EBiMdYFuf7ORgz8iprJQ7G7np9T/x6FGXbt9zQI3Yrr73V0UytAiqZ7CzQ96hGcX89 4/0klfE2tfUWirCuiTp52Kz/K5lEHIEviu7YHShbCfT6uK2CuJSTBIrUIGYZ60JzR7 06mVZgJTrJryNiSmKo+AfTKOe/j5bd1fR8+amGxaYRKLZBJrQlzq55/kTrvHiw00SB S/wXDpAYd3eXQ== From: Danny Milosavljevic Date: Tue, 3 Sep 2024 02:02:18 +0200 Message-ID: <58ce361528f55e5ad76ed7da4123525a9e9375e5.1725319687.git.dannym@friendly-machines.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=23.83.209.27; envelope-from=dannym@friendly-machines.com; helo=butterfly.birch.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 03 Sep 2024 00:33:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 03 Sep 2024 04:30:25 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 3B4D57AB2D X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -5.22 X-Spam-Score: -5.22 X-TUID: NRogDJs1Rrax * gnu/packages/patches/emacs-julia-snail-1.3.1-vendor.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/emacs-xyz.scm (emacs-julia-snail)[arguments]<#:phases>[vendor]: New phase. [inputs]: Add julia-cstparser, julia-tokenize. [propagated-inputs]: Remove julia-cstparser, julia-tokenize. [source]: Add patch. Change-Id: I61c0a4493fcfd219809bcc35f8765be0928a7e81 --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 25 ++++++-- .../emacs-julia-snail-1.3.1-vendor.patch | 57 +++++++++++++++++++ 3 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/emacs-julia-snail-1.3.1-vendor.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0c4ab96bf3..8647956f2f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1179,6 +1179,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-git-email-missing-parens.patch \ %D%/packages/patches/emacs-helpful-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ + %D%/packages/patches/emacs-julia-snail-1.3.1-vendor.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-kv-fix-tests.patch \ %D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 370daaf50e..1837c759d2 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -14656,22 +14656,37 @@ (define-public emacs-julia-snail (file-name (git-file-name name version)) (sha256 (base32 - "0h5lwc2hsk4rc82idhf9qj9553v7x76wmy9x2z1h60pdd93ilcyr")))) + "0h5lwc2hsk4rc82idhf9qj9553v7x76wmy9x2z1h60pdd93ilcyr")) + (patches + (search-patches "emacs-julia-snail-1.3.1-vendor.patch")))) (build-system emacs-build-system) (arguments (list + #:phases + #~(modify-phases %standard-phases + (add-after 'validate-compiled-autoloads 'vendor + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (base (dirname (car (find-files out "JuliaSnail.jl")))) + (vendor (string-append base "/vendor"))) + (mkdir-p vendor) + (copy-recursively (string-append (assoc-ref inputs "julia-cstparser") + "/share/julia/loadpath/CSTParser") + (string-append vendor "/CSTParser")) + (copy-recursively (string-append (assoc-ref inputs "julia-tokenize") + "/share/julia/loadpath/Tokenize") + (string-append vendor "/Tokenize")))))) #:include #~(cons* "^JuliaSnail\\.jl" "extensions" %default-include))) (inputs - (list emacs-dash emacs-s emacs-spinner emacs-xref)) + (list emacs-dash emacs-s emacs-spinner emacs-xref julia-cstparser + julia-tokenize)) (propagated-inputs (list libvterm emacs-julia-mode ;required by parser emacs-parsec ;required by parser emacs-popup - emacs-vterm - julia-tokenize - julia-cstparser)) + emacs-vterm)) (home-page "https://github.com/gcv/julia-snail") (synopsis "Development environment and REPL interaction package for Julia") (description "This package provides a development environment and REPL diff --git a/gnu/packages/patches/emacs-julia-snail-1.3.1-vendor.patch b/gnu/packages/patches/emacs-julia-snail-1.3.1-vendor.patch new file mode 100644 index 0000000000..eaa38fb868 --- /dev/null +++ b/gnu/packages/patches/emacs-julia-snail-1.3.1-vendor.patch @@ -0,0 +1,57 @@ +Author: Danny Milosavljevic +Date: 2024-09-03 +License: GPL3+ + +Previously, we propagated julia-cstparser and julia-tokenize. This would only +work if the user had installed julia in their profile (because only then +JULIA_LOAD_PATH of julia-cstparser would be propagated). +That doesn't seem likely or desireable. + +It turns out that it's not difficult to make julia read vendored packages. +Let's do that (since there's a comment inside JuliaSnail.jl that warns about +CSTParser APIs being easily incompatible, vendoring is better anyway). + +diff -ru orig/4l8xr3ldffb30a44x157lj3asaj3ykls-emacs-julia-snail-1.3.1-checkout/JuliaSnail.jl 4l8xr3ldffb30a44x157lj3asaj3ykls-emacs-julia-snail-1.3.1-checkout/JuliaSnail.jl +--- orig/4l8xr3ldffb30a44x157lj3asaj3ykls-emacs-julia-snail-1.3.1-checkout/JuliaSnail.jl 2024-09-03 00:02:03.798373662 +0200 ++++ 4l8xr3ldffb30a44x157lj3asaj3ykls-emacs-julia-snail-1.3.1-checkout/JuliaSnail.jl 2024-09-03 01:05:26.310766009 +0200 +@@ -30,12 +30,12 @@ + catch err + if isa(err, ArgumentError) + if isfile(joinpath($dir, "Project.toml")) +- # force dependency installation +- Main.Pkg.activate($dir) +- Main.Pkg.instantiate() +- Main.Pkg.precompile() +- # activate what was the first entry before Snail was pushed to the head of LOAD_PATH +- Main.Pkg.activate(LOAD_PATH[2]) ++ # force dependency installation ++ if isa(err, ArgumentError) ++ error("Vendored dependencies not found. Please make sure the vendored packages are located in the 'vendor' directory.") ++ else ++ rethrow(err) ++ end + end + end + finally +@@ -51,11 +51,16 @@ + end + + @with_pkg_env (@__DIR__) begin +- # list all external dependency imports here (from the appropriate Project.toml, either Snail's or an extension's): +- import CSTParser +- # check for dependency API compatibility +- !isdefined(CSTParser, :iscall) && +- throw(ArgumentError("CSTParser API not compatible, must install Snail-specific version")) ++ @with_pkg_env (joinpath(@__DIR__, "vendor", "CSTParser")) begin ++ @with_pkg_env (joinpath(@__DIR__, "vendor", "Tokenize")) begin ++ println(LOAD_PATH) ++ # list all external dependency imports here (from the appropriate Project.toml, either Snail's or an extension's): ++ import CSTParser ++ # check for dependency API compatibility ++ !isdefined(CSTParser, :iscall) && ++ throw(ArgumentError("CSTParser API not compatible, must install Snail-specific version")) ++ end ++ end + end + + base-commit: b833aaaee7c95ec0339428a6b602f26831494798 -- 2.45.2