From: Yuri Pankov <email@example.com> To: firstname.lastname@example.org Subject: Re: move roff sections to a separate file Date: Tue, 30 May 2017 03:09:06 +0300 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <20170529234717.GA54102@athene.usta.de> On Tue, 30 May 2017 01:47:17 +0200, Ingo Schwarze wrote: > Hi Yuri, > > Yuri Pankov wrote on Tue, May 30, 2017 at 01:14:35AM +0300: > >> I'd like a propose a small change which would simplify maintaining a >> downstream version for us (as we need it modified and with a bit changed >> order) - move list of sections (roff_sec) and their descriptions (secnames) >> to separate file which we keep without a need to sync with upstream, >> roffsec.in. Patch is pretty straightforward and simply moves both there. > > I see why such small differences can be a bother in maintenance, > but i don't like the direction this is going. > > 1. I'd like to encourage more consistency in manual page organization > across different systems, not facilitate divergence. Section > naming and ordering is an area where existing differences are > relatively mild, and making this aggressively configurable > really seems like pushing into the wrong direction to me. > > 2. Besides harming users by promoting gratuitious differences among > platforms, such configurability also impedes flexibility of > development because - even keeping the user-visibile functionality > constant - the implementation cannot be modified when *.in-style > interfaces are promised to downstream systems. > > 3. Technically, i don't like the concept of *.in files at all. > They make reading the code harder, as they are neither fish nor > fowl, neither proper, readable C code, nor proper, readable *.h > headers. I want to slowly get rid of them. I have deleted a > few already and hope to continue in that direction, even if not > with terribly high priority. But i certainly don't want to add > any more of them. That's unfortunate as .in files allow us to keep the man sections (msec.in) and library (lib.in) descriptions separate of the code updates, see: https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/mandoc/lib.in https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/mandoc/msec.in That's where we historically differ from BSD section layout, and it's (sadly) not going to change soon. > 4. Your specific patch is incorrect. > "static const char * const secnames[SEC__MAX]" > is not a declaration, but a definition. > So if it goes into an *.in file, that *.in file cannot be > included in any *.h file, but only in one *.c file, because > otherwise every *.o file using the *.h file gets its own copy > of the array. > But enum roff_sec *is* needed in roff.h, so you are stuck. It works as it's *static*, but I do agree that it's ugly, it was more an idea than actual patch. > I don't think you should try to fix the technicality (4) because > that will only make the patch yet uglier, aggravate (3), and not > solve the more fundamental issues (1) and (2) in the least. > > > To help finding a solution, i should like to understand the scope > of the issue better. > > Which sections specificially do you want to order in which > non-standard way? > > Is there any other, specific issue except ordering that you would > like to change? If so, which one? We have CONTEXT section after RETURN VALUES. > Note that, if you simply use some additional, non-standard sections > in some pages, i'm not convinced they need to be listed at all. > They should work just fine as SEC_CUSTOM. The sections I listed below are standard for us, so there's a need to order them properly. > Then again, if a section name is sufficiently widespread, we > usually carry it even if it is not used in every system (e.g. LIBRARY). > If you think there is such a case of a section name used by many, but > not by all systems, that ought to be added, which one is it? We have the following sections in our man pages that aren't present currently in validation, and I don't think it'd make sense to add them as generic ones: INTERFACE LEVEL (after SYNOPSIS and before DESCRIPTION) CODE SET INDEPENDENCE INTERFACE STABILITY MT-LEVEL Having separate .in file would allow us having our own ordering rules while making updates easier - we do NOT modify any of the mdocml source except for customized .in files. To sum it all up, the differences are for historic reasons, and not something that can be changed easily, hence the request. -- To unsubscribe send an email to firstname.lastname@example.org
next prev parent reply other threads:[~2017-05-30 0:09 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-05-29 22:14 Yuri Pankov 2017-05-29 23:47 ` Ingo Schwarze 2017-05-30 0:09 ` Yuri Pankov [this message] 2017-05-30 1:15 ` Ingo Schwarze
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: move roff sections to a separate file' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).