From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CGSnN0tPs2Db9QAAgWs5BA (envelope-from ) for ; Sun, 30 May 2021 10:39:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AHoHM0tPs2A+cQAA1q6Kng (envelope-from ) for ; Sun, 30 May 2021 08:39:39 +0000 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 C906923993 for ; Sun, 30 May 2021 10:39:38 +0200 (CEST) Received: from localhost ([::1]:47118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnGyv-0007M3-NA for larch@yhetil.org; Sun, 30 May 2021 04:39:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnGyG-0007K4-7e for guix-devel@gnu.org; Sun, 30 May 2021 04:38:56 -0400 Received: from mail.thebird.nl ([94.142.245.5]:50110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnGyA-0006cc-4R for guix-devel@gnu.org; Sun, 30 May 2021 04:38:56 -0400 Received: by mail.thebird.nl (Postfix, from userid 1000) id B5DC0FF9; Sun, 30 May 2021 10:38:47 +0200 (CEST) Date: Sun, 30 May 2021 10:38:47 +0200 From: Pjotr Prins To: guix-devel Subject: Idea: a meta language for (language) build systems - npm, Racket, Rust cargo Message-ID: <20210530083847.o5ej63obqnzpwnbd@thebird.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Received-SPF: pass client-ip=94.142.245.5; envelope-from=pjotr2021@thebird.nl; helo=mail.thebird.nl X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622363979; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=MpXYYVk522/+n7S9NlEnZoQxltdOBonzMb5ax1EZVig=; b=TNeR7ossI3ieBN6w3kcDsZ6/8I9wzEx6YLPgtOALcSckjWHDG1KsoTN/5NHgGLsi644Cn7 6T1v4v6Idj2Ehn39I9In0QNhxxUQF51DXdztVR5Ng+LeTtD16lquGiQxE8Av6T5JjWE+vW 2HJlqmlRqxqC239ED+P5D/Xxx1cI3ZPVM4zsUfralbQk8OMB8wlG9wCywK2G/XdXsofzgR 94r/IBq51Ar9JRZZJK5VpdZUmjTHLQNRLVwIEUolbBGKbk/3BiUBKfjcz3YyWtQeyqPxUe IHDcSzHeaVZfpqzJ7ZloMs3Ah3wKUUpntwcjWEW3PRszmS/rK3FaCWUkFVKqdQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622363979; a=rsa-sha256; cv=none; b=EacMxvzU4LalKDlBESa/up/lIhTzEP/G7k7+i+zEbHNkAYAha+TYXYz0x/3WUeiVBlwAKL /Kj92pvTRc6bRUlGimGHGzz1ttYaUtO+rGIOvDHkEMnHajJb+x3wzSmHMMgE0YZGTTYK9j Dd8xeNQu6Of17pK3VxHSaEtBmYu3igt7UDb5zjP6V1yOhFgV9fbDzYcpYM1Rnz3i+F5t1+ Pjpksgw7n6KPQHev+8DaT3OKrqIQCfJ7lXrDzZLENhX6JIFIuRc8RU1dduTiSIiPmWJRTw 5ixb1YMqJ2i0A9rAAUIZMv9Cj80YU2KswLh1YMC7No4nHUfrotmjaq/92TOcJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -0.93 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: C906923993 X-Spam-Score: -0.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: kRtcB1o4A6A1 Maybe this is a crazy idea: It appears to me that every language out there today is creating their own build system. We know that creating build-system package support for GNU Guix is complicated by: 1. Live updates over the internet 2. Circular dependencies 3. Tests requiring internet access Now we never got to truely solving npm, for example. And despite heroic efforts: Go, Rust, Racket are often in stages of disarray. The irony is that, when we leverage GNU Guix infrastructure, the software packages themselves can be really simple. All we need is a source ball and a little metadata. From that GNU Guix can do the hard stuff and handle the builds and dependencies. This is why our C build system is so effective and simple packages translate well to GNU Guix. My idea is this: rather than generating 'imports' from native build packages for every target - which is kinda laborious in its way - we could translate an existing Rust/Node/Racket package into an intermediate simple package tar ball - call it a sexp-pack ;). This repackaged sexp-pack can only reference other sexp-packs which gets rid of (1). The sexp-pack generator can identify and help resolve circular dependencies which solves (2). At this intermediate stage we can also also patch sources which helps with (3). We would have a sexp-pack for cargo and another for npm. As sexp-packs are generated from source, the GNU Guix turn around and packaging time can potentially be sped up. And once a hosted sexp-pack exists it is stable. It may be silly to create another layer (of indirection). But I think that breaking up the packaging process this way will help us to actually fix npm and cargo support in a reasonable time frame. Also it works the other way, I would no longer need cargo or Racket packages ;) Pj.