From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id bKz/FkQA+WN/wwAAbAwnHQ (envelope-from ) for ; Fri, 24 Feb 2023 19:21:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GPJNFkQA+WOJ6gAA9RJhRA (envelope-from ) for ; Fri, 24 Feb 2023 19:21:56 +0100 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 CFDC585F5 for ; Fri, 24 Feb 2023 19:21:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVch0-0006jq-B2; Fri, 24 Feb 2023 13:21:14 -0500 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 1pVcgy-0006j4-Fm for guix-devel@gnu.org; Fri, 24 Feb 2023 13:21:12 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcgw-0002S0-I5; Fri, 24 Feb 2023 13:21:12 -0500 Received: by mail-wm1-x32c.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so2814420wms.2; Fri, 24 Feb 2023 10:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677262867; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ieAQV4aSdk+j9R/qwk+EMr5yQFE87RE0KnDCumTEd70=; b=MMJNhTtvFz0UTcUM2AmJ2GRfGQpgTMzFsm+mVzzQwRnNYwT8WnJNuNM6Wkdz4vy+A8 uHf832pNpsyXQ/OBaL8+KLLnBouVwKl6fyZTzdbUKEnEqBjYhja8qOceP3K+DFHwzjjK qR1a2fdDXg2L0SZ3oT/dP4WkAquC3302Xsp999YWQ+/QOHK7smmn4YjQkgVugTaNdLz/ kkADG74bc5kdv30zx4LnVXLZK86fqeoJUqv1IRhvSIObJ69Eyerqibz7co6y91Vgbld7 wc4nlP87dpKUxRZpZ7K2wznuPz+MbedEx5Wg0yc6Rb4pNnOf6caBeSXeBRcoWvl2mdx5 um9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677262867; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ieAQV4aSdk+j9R/qwk+EMr5yQFE87RE0KnDCumTEd70=; b=qIhPVCGMKSD8XJH3BV1c/A+zI2F0jR7YpcW0YBUiKyPep/5s3PLpFV+illuLMV2jk2 e1VkNiGmowNAM1gZS/mMjppmmcufOtWMiwbSzcIbWOSp1LkjnIkfFAGKHIA65HCAsEGs twLE7d4tL5OsI9F207IbYmOk3QpGolKkoIwX1WB3dbS1sVAYFgEXYunuPu26N297u1z7 HF1DAPGf0MXIqyuyhGXnPw101BR4uJeIMW1Nr5T20qc9R+OJD5EHvN7u/6WZgcPX7c9y M4awEZaOFUm5ROQwH36zKXcw2KZezuJU2LCgEOytUh5TakUDjQmzCKhMu9Ghh74m/ar9 PYMg== X-Gm-Message-State: AO0yUKVfaP3MvSqFeHFPM4lLc7FN2SEqaf3rCMs85ucjz4sCdYu2udlC vCp6ozEf4XVsmo+LhMKOBC/3c6RqKmY= X-Google-Smtp-Source: AK7set9zdPud9fW5B95LjAOlgvyo2vik3eLzj7yWt4VWGNGBghhIqvBHZ4vRBO3AdQYMkoCQxsj7ig== X-Received: by 2002:a05:600c:4f4e:b0:3d2:231a:cb30 with SMTP id m14-20020a05600c4f4e00b003d2231acb30mr15617079wmq.3.1677262866715; Fri, 24 Feb 2023 10:21:06 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id l10-20020a7bc44a000000b003dc521f336esm3535719wmi.14.2023.02.24.10.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:21:06 -0800 (PST) From: Simon Tournier To: Nicolas Graves , guix-devel@gnu.org Cc: Jean-Baptiste Volatier , =?utf-8?Q?Nicol=C3=B2?= Balzarotti , Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Follow-up on julia import script In-Reply-To: <87a61358ej.fsf@ngraves.fr> References: <87a61358ej.fsf@ngraves.fr> Date: Fri, 24 Feb 2023 19:21:03 +0100 Message-ID: <87o7pilyb4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32c.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677262916; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ieAQV4aSdk+j9R/qwk+EMr5yQFE87RE0KnDCumTEd70=; b=AHuRlwnn3MSh7m3pcqtvUA9rswLICWQ/PPAfLUfhmuGHploPnimqm2wPqH3bxg+WAOrTwm oj8vBOwQth/DCAUQHq/B7lNBvSaBCv2DlS7a/NAgZhog84GYiI3Wyg/eccOz+T3TIL4g1T ajaP2dsQOWm+gFTaUIxmrJ8Eswxuis6UhwmhUmw3xmvtKyVwgvLvKa/LJEL9aygVTdvEbh 5YQlvCV9d21UoI2vCpKg0nUvFckzOuc5jwJRBlhBCn/noV1Eg+M3FWI3wdAELsGfkQkmSN GAm2GOMSr0JyTuGE7Bo0hddk3Aw4T8G55cGCpMXy1D8p+Maha5zsp2nzeTqCNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MMJNhTtv; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677262916; a=rsa-sha256; cv=none; b=CNZn6QN9Xz83ACokgZp8Kxrhz3BTfqKXhz2dHcA4j+bcnHhTis1Z/jkfV5ilBV42z57/HI GEJ3VBEL+3u7rkIf9NCOuMGKSmzyU8NAlT9v3sot7g31ltIabobyA1Bantg2ZjQJrQB1qh LQkuLMo8VkG9QBF6aD+VR/N8yvlQsyW7s6rIuC8ejAnViQNLsDSiRyelx/6ao0uLsvWbo0 nCgahL68CpFqXvBbhWAH1w5lpbN4ZpYBvmiKNSGqBdDAnad+MREWbldurWgbhnob5obi/w 59bNWTu6TyGw4xdYlx63mYpI3yoLpto4oKNoTi64U+m4QEd0Y80z2nHzXq6ydQ== X-Spam-Score: -4.90 X-Migadu-Queue-Id: CFDC585F5 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MMJNhTtv; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.90 X-TUID: KrnZtfJunOEl Hi, Thanks for this fresh input! :-) On ven., 24 f=C3=A9vr. 2023 at 17:35, Nicolas Graves via "Development of GN= U Guix and the GNU System distribution." wrote: > - Apparently Nicolo also has a similer code. I guess, it is that: https://yhetil.org/guix/8735yi9o9x.fsf@guixSD.i-did-not-set--mail-host-addr= ess--so-tickle-me > - My approach was a bit different but indeed didn't have the ambition to > resolve compatibilities between packages (I need to check that but the > check or the build phase should fail it packages are incompatible, > thus when trying to build the imported package, we should now which > packages should be updated if necessary). If we only restrain imports > to the general package repository, then the task becomes much more > simple : > - from the package name, you can generate the uri of the following > files > - parse Project.toml to get source information > - parse Versions.toml to get source hash information > - parse Deps.toml to get information about dependencies Based on the General registry, it does not appears to me straightforward too get all the dependencies; without speaking about some synopsis and/or description and/or license. Well, I have tried to implement this: as example consider the Julia package named Zygote, https://github.com/JuliaRegistries/General/tree/master/Z/Zygote Assuming some toml parser available in Guile (it is not too hard using PEG or a very naive approach, but still :-)), from the file Package.toml, you get the repository address, https://github.com/FluxML/Zygote.jl that you clone. Then from this, you use the file Project.toml to consider what is inputs and what is propagated-inputs. Using README, it is possible to pre-fill the synopsis and description although it is never accurate. You also can try to guess license. Then, you need to go back to Registry. And so on. Here we are dropping the Compat part and the resolver part. But as you said, maybe it would be enough. Well, we are poorly reimplementing what is builtin with Julia but why not. (From my point of view, such effort is not worth. It appears to me a better strategy to rely on Julia itself. Note that =E2=80=9Cguix import texlive=E2=80=9D requires subversion in the path; so I do not see the point= to reimplement some part of Pkg.jl in Guile instead of reusing it, Julia, not Guile ;-)) Since this last parenthetical statement is probably not consensual ;-), we discussed with Nicol=C3=B3 to use Guix extensions and wrap the importer above relying on Pkg.jl (or the one by Jean-Baptiste; I was not aware :-)). That=E2=80=99s said, another approach is to parse the JSON: https://docs.juliahub.com/Zygote/4kbLI/0.6.55/pkg.json and rely on the service JuliaHub. This could provide some meta data such as synopsis, description (based on README) and license. Well, I stopped in the middle of the first approach but it would not be that hard to resume. :-) Or feel free to expand you short first attempt. Cheers, simon