All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: kconfig: error out if recursive dependencies are found
Date: Tue, 8 May 2007 00:36:04 +0200	[thread overview]
Message-ID: <20070507223604.GC4226@stusta.de> (raw)
In-Reply-To: <20070507193707.GA19985@uranus.ravnborg.org>

On Mon, May 07, 2007 at 09:37:07PM +0200, Sam Ravnborg wrote:
> On Mon, May 07, 2007 at 02:38:36AM +0200, Roman Zippel wrote:
> > Hi,
> > 
> > On Sun, 6 May 2007, Sam Ravnborg wrote:
> > 
> > >  	if (sym->flags & SYMBOL_CHECK) {
> > > -		printf("Warning! Found recursive dependency: %s", sym->name);
> > > +		fprintf(stderr, "%s:%d:error: found recursive dependency: %s",
> > > +		        sym->prop->file->name, sym->prop->lineno, sym->name);
> > >  		return sym;
> > >  	}
> > 
> > If it were that simple to print the location, I had done it already. :)
> > Try this:
> > 
> > config FOO
> >         bool
> >         select BAR
> >         depends on BAR
> > 
> > config BAR
> >         bool
> > 
> > I looked into this before, for simple properties one could just remember 
> > the last checked property via a static variable. The problem are the 
> > selects which are checked before that loop, here the information from 
> > where they were selected is not available anymore (at least not easily).
> 
> We need to point out _one_ of the faulty spots only.
> But I see that kconfig records file:line for properties and menu entries
> but not for symbols.
> Any special reason why file:line is omitted for symbols (except size of allocated
> memory)?
> 
> Without looking into details it looks more relevant to have file:line for symbols
> rather than for prompts / properties..

I'm not getting what problem you are trying to solve.

Kconfig has always printed all symbols in the dependency circle, and 
with this information it was never a problem to locate what went wrong.

The only thing that was missing was that the error often wasn't detected 
since it scroled away, so we need to error out.

I have no problem with more information being printed, but at least for 
me it isn't required since grep'ing for it is trivial.

> 	Sam

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  parent reply	other threads:[~2007-05-07 22:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-02 20:17 [GIT PATCHES] kbuild, kconfig + Kconfig updates Sam Ravnborg
2007-05-06  7:36 ` [GIT PATCHES #2] " Sam Ravnborg
2007-05-06  7:40   ` kconfig: error out if recursive dependencies are found Sam Ravnborg
2007-05-07  0:38     ` Roman Zippel
2007-05-07 19:37       ` Sam Ravnborg
2007-05-07 22:03         ` Roman Zippel
2007-05-07 22:36         ` Adrian Bunk [this message]
2007-05-06  7:42   ` kbuild: enable use of code from a different dir Sam Ravnborg
2007-05-06  7:43   ` kconfig: fix mconf segmentation fault Sam Ravnborg

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=20070507223604.GC4226@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=zippel@linux-m68k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.