From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) Date: Fri, 2 Dec 2022 17:08:47 +0200 Message-ID: <0094a6f2-796e-bc8d-bee0-13ecb069d7e6@yandex.ru> References: <87zgcq68zp.fsf@ericabrahamsen.net> <877czqtyfy.fsf@dfreeman.email> <87zgcml7g7.fsf@gmail.com> <2ba04533-097a-a1da-ff3f-2c9506fd488e@yandex.ru> <875yf9bbzb.fsf@gmail.com> <87wn7oa0aw.fsf@gmail.com> <7a5b76fd-fb15-8c1e-ea29-bf11f7e0d2ae@yandex.ru> <87bkoya815.fsf@gmail.com> <0024a67d-b8e5-b35c-1b22-82541a170eb3@yandex.ru> <871qptai4d.fsf_-_@gmail.com> <83o7swyipe.fsf@gnu.org> <83sfi7v6dj.fsf@gnu.org> <45549e6b-942f-ee99-9123-8176545a159e@yandex.ru> <83zgceu8ch.fsf@gnu.org> <7c34024e-c2b6-033f-ff37-a0fdfc9f0cdb@yandex.ru> <83v8n2tbur.fsf@gnu.org> <83cz91gaaw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21108"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: monnier@iro.umontreal.ca, danny@dfreeman.email, eric@ericabrahamsen.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 02 16:09:33 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p17fQ-0005AL-RL for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Dec 2022 16:09:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p17eq-0000ix-Jr; Fri, 02 Dec 2022 10:08:56 -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 1p17eo-0000iS-C2 for emacs-devel@gnu.org; Fri, 02 Dec 2022 10:08:54 -0500 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p17em-0005yc-Ez; Fri, 02 Dec 2022 10:08:54 -0500 Original-Received: by mail-wm1-x32b.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so4494439wmi.3; Fri, 02 Dec 2022 07:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=PDCpSjyJBQndefvR95NPcWlOHDm2DRbMpW8eK2UUbgk=; b=qAUncqiZFDBkxJXVzXfMtbWVhmhItbujl2kFamXsADJtFpSLOtI4nv4lmnz+HVdc3V qt6SfG0T3fu98wr0t2hvMKqUhYAL8vUc2y/rg/BxYY3jnVGOpVI7Fu+P7lfSYN2xQpv+ 4x9J8Y1dGYmWxTCxOjAOX9/je6zrPvqaGhE/kYjXBNq394IWowq1hKS/zzU6WxV7Pi/x u2ePcPooYLAXDfwytRc1IRIG8Gz0DduEVshR75a422ULZ9u8a3oeTBPOpipLlq3cHOgJ D8DUXrttbtAa2zPXgskK2+NaYsG0Bz17cPWJFUSx2cgtLy1sou8a5l6p+VmUCQ1T85Ur qlqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PDCpSjyJBQndefvR95NPcWlOHDm2DRbMpW8eK2UUbgk=; b=HwQThHsYoLYTpIMAfyG6zjvs7OJpzM8QLFRahEiYQLjHqRJszsPUdga5Ahz1tBMQXI st02U/x62vRRHN+MiRQY3JmVflTRb6+W4laoP0h8QRyx/M/MP4DQZP9SF0edGIgtAZiM 9OGGmoFAhBpS/fZJ1nQolRS/Q/u2U20waXD+PRc+gSl4qI8WyuNRkTk8GAtLAYgp3nEc PClk8qT3j3ezLxmJXWBXp37EOHnZC1fwfTozkDon4ONr9DmtwseSYyQSzr1RzeSwQoCh Ed3aD1fgrif9QAiMS5Cze8VSel/1jgs0KGIvhxvwbBZ2MuLeasxlH8oTxE/nmpfTmKz2 qQkw== X-Gm-Message-State: ANoB5pkiVzxHsnP2I88ZZh1epiJMXV0v/JIDBBhQfVNe4pIGcwLkQeAD ZMeYBkn7b/3WoeeO7zwk4L1ptVs7a98= X-Google-Smtp-Source: AA0mqf4pjHeg6hTVPHoVpHzGhGV8p4M7d2rwr6BF9N0eGtQJOuADE7ysz1hdjaiXDTvNYKJ/A8nJxQ== X-Received: by 2002:a1c:f617:0:b0:3cf:5584:7730 with SMTP id w23-20020a1cf617000000b003cf55847730mr56875878wmc.187.1669993730034; Fri, 02 Dec 2022 07:08:50 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g8-20020a5d46c8000000b0023662d97130sm7245358wrs.20.2022.12.02.07.08.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Dec 2022 07:08:49 -0800 (PST) Content-Language: en-US In-Reply-To: <83cz91gaaw.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.258, 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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300835 Archived-At: On 02/12/2022 16:16, Eli Zaretskii wrote: >> Date: Fri, 2 Dec 2022 03:32:42 +0200 >> Cc: monnier@iro.umontreal.ca, danny@dfreeman.email, eric@ericabrahamsen.net, >> emacs-devel@gnu.org >> From: Dmitry Gutov >> >> Still, if you do want to inherit from 'VC-aware', we can make a public >> constructor for it. Probably after Emacs 29 is released, and we can see >> that the structure is settled (it's looking this way now). >> >> As for 'transient', well, the constructor can be added as well. The >> structure is stable and least likely to change; unless we just make an >> executive decision to turn them all into structs or whatever. I just >> didn't want to encourage people using it -- even Joao's usage is odd >> because he not only calls the 'project-root' function, but also >> 'project-files', and it's just luck that its behavior suits his current >> goals. > > I'm just surprised that a simple request to be able to create a project type > that is not one of the 2 built-in types is not answered by a simple "use > this and that APIs". project.el strives very hard to be generic, but what > is the use in doing that if extending it by 3rd-party code is so > complicated, and on top of that is not already available? But that's what defines a project type: its implementations of the generic functions. > So yes, I think we do have public constructors and whatever else could be > reasonably needed if one wants to subclass either of the two built-in > project types. For this purpose, I don't think it matters how rich the > built-in type is -- that is something for the sub-classing application to > worry about. We just need to give them enough rope, and leave the rest up > to them, IMO. FWIW, the built-in types's structures have been fairly stable for a while. So for most practical purposes people should be able to "extend" them already, definitely if it's for personal use. But for public use as well, if the package author is willing to provide prompt updates in the case of potential (rare) breakage. I just rather hear about actual cases or intended scenarios, to decide how to support them better. E.g. providing constructors will "stabilize" some stuff, but won't make things much easier, coding-wise.