From: Greg Banks <gnb@alphalink.com.au>
To: Peter Samuelson <peter@cadcamlab.org>
Cc: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>,
linux-kernel@vger.kernel.org, kbuild-devel@lists.sourceforge.net
Subject: Re: [patch] config language dep_* enhancements
Date: Mon, 12 Aug 2002 21:04:09 +1000 [thread overview]
Message-ID: <3D579629.32732A73@alphalink.com.au> (raw)
In-Reply-To: 20020809161046.GB687@cadcamlab.org
Peter Samuelson wrote:
>
> > You're willing to potentially perturb 2.4?
>
> This stuff is trivial enough, and easy enough to test, that I think it
> could go in 2.4, yes.
I think you're underestimating the Gordian knot that is the CML1 corpus.
> Obviously xconfig would need to be dealt with
> in sync with the others, which I'm not doing during the prototyping /
> idea-mongering stage.
Fair enough.
> > I'm pleased to see that you have preserved those semantics. There
> > are many places in the corpus where a dep_* lists as a dependency a
> > variable which is not defined until later, or is only defined in
> > some architectures, or is never defined. Earlier today I tweaked up
> > gcml2 to detect them and found 260 in 2.5.29.
>
> You give me too much credit. The main motivation for dropping the '$'
> was to make possible the "" == "n" semantics. That the patch failed
> to do so was accident, not design.
Ah, well that's more disturbing. Changing the existing semantics, regardless
of how broken we all agree they are, is asking for a world of trouble. To
pick an example, in 2.5.29 drivers/ide/Config.in:17 is
dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_ATAPI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI
But at this point in the menu tree for 14 of 17 architectures, CONFIG_SCSI has
not yet been defined. The result is that CONFIG_BLK_DEV_IDESCSI only works
in "make config" and "make allyesconfig" precisely because of the semantic that
you wish to change.
In fact this is the first one gcml2 finds, I don't particularly feel like
trawling through the other two hundred-odd. Some of them are harmless, I don't
know how many.
> I know the current behavior is documented, but I had thought this was
> because changing the behavior was not feasible due to our Bash-based
> "JIT parsers".
Yes, changing the behaviour is infeasible with shell-based parsers. However,
there is now a body of rules which implictly depend on the semantics.
> Can you provide a rationale for why the current
> behavior is desirable?
I wouldn't call it "desirable". I would use words like "clunky", "congealed",
"unorthogonal", "riddled with errors", and "very hard to fix" like the rest of
the config language.
> It seems to me that it only encourages buggy
> Config.in code (since "" == "n" in other contexts like the #defines),
And "" != "n" in other contexts, like if [];then statements. Did I mention
"unorthogonal" ?
The problem is that logic in config language is implicitly four-state, with
the null or empty value being a separate value distinct from y, m and n.
The fact that both "" and "n" mean "don't build this object" to kbuild doesn't
mean that "" and "n" are the same thing. This isn't really obvious.
One example where there is a semantic difference between "" and "n" would be
an autoconfigurator, where "n" would mean "I have probed for this hardware and
it is not present" but "" means something like "I have not probed".
> and I don't see any benefits other than that it's the status quo.
I'm not defending the current syntax. It sucks and it's broken. But
fixing it will break things that currently aren't broken (or more accurately
are broken twice in opposite directions). If it's your intention to change
the semantics of "", perhaps it would be better to add new statements which
feature the new syntax and new semantics *only* and have no backwards
compatibility baggage. An example of this approach is the "nchoice" statement,
which does the same thing as "choice" but with a more civilized syntax.
> > > + case "$arg" in
> > > + y|m|n) ;;
> > > + *) arg=$(eval echo \$$arg) ;;
> >
> > Don't you want to check at this point that arg starts with CONFIG_?
> > Also, how about quoting \$$arg ?
>
> I suppose one could add sanity checks / diagnostics, but there are no
> other valid cases, so that's all they would be.
Yes, but there are invalid cases, and surely you don't want to help to
*increase* the amount of bugginess in the rules corpus?
Greg.
--
the price of civilisation today is a courageous willingness to prevail,
with force, if necessary, against whatever vicious and uncomprehending
enemies try to strike it down. - Roger Sandall, The Age, 28Sep2001.
next prev parent reply other threads:[~2002-08-12 11:00 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200208062329.g76NTqP30962@devserv.devel.redhat.com.suse.lists.linux.kernel>
2002-08-07 10:01 ` Linux 2.4.20-pre1 Andi Kleen
2002-08-07 11:50 ` Alan Cox
2002-08-07 10:41 ` 64bit clean drivers was " Andi Kleen
2002-08-07 12:16 ` Alan Cox
2002-08-07 11:04 ` Andi Kleen
2002-08-07 11:10 ` Alan Cox
2002-08-07 11:18 ` Andi Kleen
2002-08-07 11:51 ` Alan Cox
2002-08-07 11:56 ` Andi Kleen
2002-08-07 13:26 ` Alan Cox
2002-08-07 16:28 ` Jeff Garzik
2002-08-08 15:14 ` Peter Samuelson
2002-08-08 16:49 ` Kai Germaschewski
2002-08-08 16:47 ` Peter Samuelson
2002-08-09 4:15 ` [patch] config language dep_* enhancements Peter Samuelson
2002-08-09 14:43 ` [kbuild-devel] " Greg Banks
2002-08-09 15:38 ` Andreas Schwab
2002-08-12 10:38 ` Greg Banks
2002-08-09 16:10 ` Peter Samuelson
2002-08-12 11:04 ` Greg Banks [this message]
2002-08-12 14:46 ` Kai Germaschewski
2002-08-12 19:45 ` Roman Zippel
2002-08-12 21:40 ` [kbuild-devel] " Tom Rini
2002-08-12 22:13 ` Roman Zippel
2002-08-12 22:15 ` Tom Rini
2002-08-12 22:32 ` Roman Zippel
2002-08-12 22:47 ` Tom Rini
2002-08-12 23:17 ` Roman Zippel
2002-08-12 23:32 ` Tom Rini
2002-08-13 3:35 ` Greg Banks
2002-08-13 0:03 ` Peter Samuelson
2002-08-13 7:54 ` Roman Zippel
2002-08-13 3:33 ` Greg Banks
2002-08-13 9:32 ` Roman Zippel
2002-08-13 10:32 ` [kbuild-devel] " Greg Banks
[not found] ` <3D587483.1C459694@alphalink.com.au>
2002-08-13 3:39 ` Peter Samuelson
2002-08-13 4:31 ` Greg Banks
2002-08-13 14:00 ` [kbuild-devel] " Greg Banks
2002-08-13 15:53 ` Peter Samuelson
2002-08-13 18:48 ` Kai Germaschewski
2002-08-14 1:13 ` Greg Banks
2002-08-14 3:28 ` Peter Samuelson
2002-08-14 4:35 ` [patch] kernel config 3/N - move sound into drivers/media Peter Samuelson
2002-08-14 5:08 ` Kai Germaschewski
2002-08-14 5:49 ` Peter Samuelson
2002-08-14 10:56 ` [kbuild-devel] " Arnd Bergmann
2002-08-14 12:20 ` S390 vs S390x, was " Christoph Hellwig
2002-08-14 17:21 ` Arnd Bergmann
2002-08-14 18:16 ` Christoph Hellwig
2002-08-14 21:18 ` Arnd Bergmann
2002-08-14 19:22 ` Christoph Hellwig
2002-08-14 22:52 ` Arnd Bergmann
2002-08-14 6:14 ` Greg Banks
2002-08-14 6:31 ` Greg Banks
2002-08-14 8:16 ` Russell King
2002-08-14 6:01 ` [kbuild-devel] Re: [patch] config language dep_* enhancements Greg Banks
2002-08-14 8:18 ` Russell King
2002-08-14 14:22 ` Peter Samuelson
2002-08-15 1:28 ` Greg Banks
2002-08-15 2:33 ` Peter Samuelson
2002-08-15 3:27 ` Greg Banks
2002-08-13 18:43 ` Kai Germaschewski
2002-08-13 20:48 ` Peter Samuelson
2002-08-14 1:27 ` Greg Banks
2002-08-14 1:42 ` Peter Samuelson
2002-08-14 2:27 ` Greg Banks
2002-08-14 2:57 ` Peter Samuelson
2002-08-14 4:39 ` Kai Germaschewski
2002-08-14 5:35 ` Greg Banks
2002-08-14 11:40 ` Roman Zippel
2002-08-15 1:52 ` [kbuild-devel] " Greg Banks
2002-08-15 3:30 ` John Alvord
2002-08-16 2:24 ` Peter Samuelson
2002-08-15 9:46 ` Roman Zippel
2002-08-15 14:43 ` Kai Germaschewski
2002-08-15 20:12 ` Roman Zippel
2002-08-16 2:08 ` Greg Banks
2002-08-16 10:54 ` Roman Zippel
2002-08-19 9:27 ` Greg Banks
2002-08-19 10:20 ` Roman Zippel
2002-08-20 14:10 ` Greg Banks
2002-08-20 17:51 ` Roman Zippel
2002-08-19 20:30 ` Sam Ravnborg
2002-08-20 14:28 ` David Woodhouse
2002-08-23 15:18 ` Kai Germaschewski
2002-08-23 23:03 ` Roman Zippel
2002-08-24 12:43 ` Greg Banks
2002-08-14 1:19 ` Greg Banks
2002-08-12 15:47 ` Peter Samuelson
2002-08-13 3:23 ` [kbuild-devel] " Greg Banks
2002-08-13 16:04 ` Sam Ravnborg
2002-08-13 16:20 ` [kbuild-devel] " Peter Samuelson
2002-08-14 0:22 ` Greg Banks
2002-08-14 20:14 ` Get rid of shell based Config.in parsers? Sam Ravnborg
2002-08-14 22:21 ` [kbuild-devel] " Peter Samuelson
2002-08-15 17:51 ` Linus Torvalds
2002-08-08 23:57 ` 64bit clean drivers was Re: Linux 2.4.20-pre1 Thunder from the hill
2002-08-08 19:23 ` Roman Zippel
2002-08-08 20:03 ` Andi Kleen
2002-08-08 20:19 ` Roman Zippel
2002-08-08 17:42 ` Peter Samuelson
2002-08-09 10:21 ` Roman Zippel
2002-08-09 11:47 ` Peter Samuelson
2002-08-09 12:07 ` Russell King
2002-08-09 12:49 ` Peter Samuelson
2002-08-09 14:53 ` [kbuild-devel] " Greg Banks
2002-08-09 22:37 ` Thunder from the hill
2002-08-08 20:37 ` Andi Kleen
2002-08-08 20:51 ` Roman Zippel
2002-08-07 17:31 ` Thunder from the hill
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 \
--in-reply-to=3D579629.32732A73@alphalink.com.au \
--to=gnb@alphalink.com.au \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=kbuild-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@cadcamlab.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox