[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subprojects in project.el

From: Dmitry Gutov
Subject: Re: Subprojects in project.el
Date: Wed, 30 Nov 2022 02:39:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 30/11/2022 00:21, João Távora wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:

On 29/11/2022 11:56, João Távora wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:

But I'd be happy to find out that 98% of our users' cases can be
handled with markers.
I think you'll begin to lose that bet right here in the Emacs repo.
Take the doc/ directory where Emacs's manuals live.  It's pretty
reasonable to consider a non-programmer (or non-Elisp) contributor
working on that directory almost exclusively, perhaps as a proof-reader.

Setting aside the artificial nature of this example, they could add
"lispintro" or "lispref" to project-vc-extra-root-markers and have
that nested project recognized.

Talk about artificial.  I don't want to say that "lispintro" or
"lispref" anywhere in my filesystem marks the doc/ subproject.  I might
have identically named elsewhere.  And these are much more likely to
change than doc/ won't.  In other words, it's not correct to describe a
subproject in terms of its interior structure.

You don't want to. Okay.

But updating the config to use a different marker is also not a long task. It's not like someone's going to go on renaming "lispinto" to some other name and back over and over during the project lifetime.

And there's also the obvious drawback, that you yourself raised, that
looking for marker files is needlessly taxing in terms of file system
operations.  Especially, as you highlighted, under TRAMP or a
slow-to-access file systems.

Only when the goal is to exclude the nested projects' files from being listed in the output of 'project-files' of the encompassing project. I asked you about this, and you answered that this is a non-goal.

Otherwise, the VC Project backend uses file markers already anyway (that's what vc-responsible-backend is based on). The latest proposals to make the list of markers configurable in bug#41572 actually make this logic faster, not slower. Especially over Tramp.

I don't know how many people actually intend to do what you described,
though. But it seems workable just the same.

Whoever wants to reap the benefits of subprojects for NPM packages in a
monorepo with marker files will probably come across situations where
they want to reap the same benefits for fixed directories but without
marker files.  And vice versa, of course.  The solution to be adpted
should not favour marker files over other approaches.  And it's so
simple not to incur in this design mistake that's it's a bit baffling
that you keep insisting to do it.

What's baffling is how you insist on not reading or trying the patches that's been available in bug#41572 -- some for several days, some for over a year, which implement both this and other approaches.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]