From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GPrmHxQkrGUjYAAAe85BDQ:P1 (envelope-from ) for ; Sat, 20 Jan 2024 20:50:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id GPrmHxQkrGUjYAAAe85BDQ (envelope-from ) for ; Sat, 20 Jan 2024 20:50:44 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705780244; 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; bh=lw+BTOfO+ER/rN0zi+VawRjgWjXXXBTwKS0TOwMmjlw=; b=magG2lMuocJdQiqCRrhkXtQKnbniyCz/B0sqBwynGvzt+7cuJt4Af2ijvCA2aYacJzxppq 3DF8sp6DXKKLgzxNih2udRDePjOa4D/qaC43T4dH5iO+ywC6i8fiZBMzvoDstjrhBgnkUM rCjtrKOkYTRxlM36LrI1CWHZP+00m8sghP4W48n8o1IUb7GmloCpl/9m8UR0c3t0ttED6s 8HLfMKHcjyCxF1LuolvH/R+jwH4qK1Vfcd4URF4G4Itr5jlBh+iZRkrh/38ZNdq8FOfQbh Ij0EOG2bf0HCfL52e2HIP8rSOzUBW/QDAwOaTmkZM+nKMaLJuV5v1WPKDChL+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705780244; a=rsa-sha256; cv=none; b=nIoMI6vjexJ501paqoOy6L3kHfdNvrwzTncUTneJE7+spMlsm6kCebCKGhfcEMyCO7kol+ UcsAjoM9mV9k4fMGQbEKq26cOfnmOgLT5kjtC5LV5HbI56xm8kBmb0PM5p4+4sA/dAiour 0s9Y85SiZtZDWufNCRI3SaBqFddzlk2LVSlclro4+wa+woIvLqPPOB7GVULXITzfHjb2Kz IgN2AeUjA+z2ztpjNG8vdH5rcaLD1jTn9u2JNgZ8YYtFXiu2brC5yBfsZQpcjoMKUDYDWK 48MUm8ClKRSrhpTEB766gX4xZzx1lLN6Av3D1vhP24X8YHR5yQtd5Ux5FXbmnw== 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 546053C5E2 for ; Sat, 20 Jan 2024 20:50:44 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRHLv-0002B3-7g; Sat, 20 Jan 2024 14:50:04 -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 1rRHLr-0002AO-CF for guix-devel@gnu.org; Sat, 20 Jan 2024 14:49:59 -0500 Received: from vmi993448.contaboserver.net ([194.163.141.236] helo=mutix.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRHLp-0005jM-Gk for guix-devel@gnu.org; Sat, 20 Jan 2024 14:49:59 -0500 Received: from [192.168.1.170] (host86-132-246-87.range86-132.btcentralplus.com [86.132.246.87]) (Authenticated sender: cdo) by mutix.org (Postfix) with ESMTPSA id AF434A63517; Sat, 20 Jan 2024 20:49:53 +0100 (CET) Message-ID: Date: Sat, 20 Jan 2024 19:49:53 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: Golang mudules to follow common grouping Content-Language: en-US To: Sharlatan Hellseher References: <87h6mrinnu.fsf@wmeyer.eu> <5d4663d5-8f33-0f2c-0a37-4d9946b04c27@mutix.org> From: Christina O'Donnell Cc: guix-devel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=194.163.141.236; envelope-from=cdo@mutix.org; helo=mutix.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.883, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.67 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -6.67 X-Migadu-Queue-Id: 546053C5E2 X-TUID: IoaVQG+pxI+v Hi Oleg, > I've added comments in commentary section in the top of the file asking to > keep packages alphabetically sorted seen in julia-xyz.scm as well. > python-*.scm ordered semi random grouped closer to package purpose which > require more thinking where to put a new one :-) Ah, I suppose it isn't that important given you can grep for the right package. > Good point her, I did manual split, with Emacs keyboard macros, magit history > scan for copyright lines and manual check where package was used to include > new module name. > > The split into golang-crypto is in review now and there would be 2 more common > grouping: golang-compression and golang-build (or golang-extension). Rest > packages which are hard to determine a group wound go to generic golang-xyz > sorted alphabetically. Hmm, there seems to be a limit in the degree of parallelizability in this process unfortunately. But if there's anything you can think of that could help (manually) in this effort, then I'd be happy to help! > Let me know your tooling which you familiar with I might think > about some sort of automation. I've had a grep around the web and I can't see any tools or libraries that have been created already to perform functions like this. I know everyone has their own scripts (I've got one written in shell but it won't be of much use here. I would suggest writing it in Scheme so it could be easier to add more complex features and it's familiar to Guix developers.  1. Put a magic comment above each package that you would like to move.  2. Run a simple script that makes a note of all of these into a to-move-list.  3. Then stash the change with the comments you made (in case you need to change     things)  4. Run another script that takes the package list and performs the move in     one's repository.  5. Sort out the use-package declarations manually and run tests.  6. When satisfied, stash the change and keep just the use-package changes.  7. Run a final script that loops through all the packages and commits each one     in turn.  8. Rebase to suit. That's 3 scripts:  - xyz-source-transform-read-packages scm-filename package-list (for step 2)  - xyz-source-transform-move-packages package-list from-filename to-filename    (for step 4)  - xyz-source-transform-stage-package-commit package-list from-filename    to-filename (for step 7) (Where 'xyz' is either 'guix' or something else depending on where the code ends up part of Guix or not. That's not important for now.) Some caveats:  - I'm not a scheme programmer, but I did use Haskell at university so I'm    familiar with thinking in a functional style.  - For this to work, you'd have to update most package files that reference (gnu    package golang) to also reference the new package, so there will be some    use-module redundancy (which could be resolved in a final clean-up commit). I'm also imagining some the possibility of having a script that can remove redundant #:use-module's in the future, though I don't know if we care about a few unneeded modules being included. I'd love to hear what you think before I fire up another emacs instance. Does it sound like a realistic workflow? All comments welcome! Kind regards,  - Christina