[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: get-package-attribute sometimes returns "?" - ID: 3114991



On Dec 18, 2010, at 3:19 PM, clif@xxxxxxxxxxxxx wrote:

> 
> 
>> Date: Thu, 16 Dec 2010 21:56:28 -0700
>> From: John Doty <jpd@xxxxxxxxx>
>> Subject: Re: gEDA-user: get-package-attribute sometimes returns "?" -
>>      ID:     3114991
>> 
>> On Dec 16, 2010, at 9:29 PM, clif@xxxxxxxxxxxxx wrote:
>> 
>>> I'm not sure we're on the same page here. That pice of legacy code is
>>> what we want to remove. We don't want any code to reinterpret
>>> attributes. For the short term we would like to change a few
>>> probramatic symbols so we don't have to have special cases in the code.
>> 
>> But the "?" is there to tell you, when looking at the symbol in gschem,
>> that you *need* to edit the attribute (I use those symbols a lot).
> 
> Yes, agreed that is why it is there. However you may not see it unless you click on show inhereted attributes, and because they are inherited you can't delete them. You can only delete the promoted ones after which the inherited ones take over again.
> 
> Sometimes I use the blocks without the file name, just a value attribute to get a one liner. Other times I start with one type of block but change it to another, so I can see cases where a particualr attribute becomes superfluous.

Easy enough to make another symbol. Repeat after me: "the library symbols are only starting points". Everybody has their own working style: the library cannot possibly cover everybody's.

> 
>> I'm puzzled here, because I thought Stuart was the author of both
>> spice-sdb and the symbols in question, so the "WTF?" is strange.
> 
> Yes and it is causeing confusion so I would like to find a better way to handle it.

Fix spice-sdb to issue an error rather than ignoring the file.

> 
>> In any case, it seems to me that the user should get an error message
>> (from spice-sdb) in this case, as an explicit "?" here means that the
>> user has neither set the attribute to something useful nor deleted it as
>> irrelevant.
> 
> However the WTF? snipit is allowing it to fail silently.

That's right. That's the problem. Better to fix that than to paint over it.

> 
>> John Doty              Noqsi Aerospace, Ltd.
>> http://www.noqsi.com/
>> jpd@xxxxxxxxx
> 
>> Date: Fri, 17 Dec 2010 08:21:45 +0000
>> From: Peter TB Brett <peter@xxxxxxxxxxxxx>
>> Subject: Re: gEDA-user: get-package-attribute sometimes returns "?" -
>>      ID:     3114991
>> 
>> So what you are saying is that you think we should get rid of the "WTF?"
>> function in the code, but not modify the symbol library?
>> 
>>               Peter
>> 
>> --
>> Peter Brett <peter@xxxxxxxxxxxxx>
>> Remote Sensing Research Group
>> Surrey Space Centre
> 
>> Date: Fri, 17 Dec 2010 07:52:15 -0700
>> From: John Doty <jpd@xxxxxxxxx>
>> Subject: Re: gEDA-user: get-package-attribute sometimes returns "?" -
>>      ID:     3114991
>> 
>> On Dec 17, 2010, at 1:21 AM, Peter TB Brett wrote:
>> 
>> I think there's nothing wrong with file=? in the symbols. It indicates
>> that the you have failed to supply a required filename.
> 
> Or an optional filename.
> 
>> (create-file-info-list), the "WTF?" function in spice-sdb, should issue
>> a diagnostic if the file name is "?".
> 
> Perhaps that could be a quick fix but currently it fails silently.

It's the right fix.

> 
> Right now, all that results from
>> substituting "unknown" is that it silently omits the file, which is
>> surely wrong behavior. You won't even know there's a problem until you
>> run SPICE, which has its own troubles with generating diagnostics that
>> clearly identify the problem.
> 
> Yes there surely are problems with ambiguous errors though it's common to reference the wrong file too, and you would still have to fix it at that level.

Sure. But if I put in the wrong filename, my folly is generally obvious. If the problem name is "?", it's more confusing. It apparently confused Stuart, and he's a pretty smart guy.

> 
>> There are other problems with that function, too. Even if you give
>> spice-sdb no reason to inspect included file contents (use -I
>> --nomunge), it does so anyway. This can make building a subcircuit
>> library tricky. If you want the automatic file inclusion for subcircuits
>> to work you must build the library in topological order, because the
>> included file must exist at netlist generation time even if you're not
>> including it at that time, and have no dependence on its contents.
>> 
>> John Doty              Noqsi Aerospace, Ltd.
>> http://www.noqsi.com/
>> jpd@xxxxxxxxx
> 
> Well that might not be that hard to fix, but one thing at a time. It seems what we want is for the attributes to show up where we can see them eg. have them promoted. This implicitly suggestes that they need values filled in. We also need the option of deleting them without them coming back to haunt us from the inherited attributes.

Hierarchy->Down Symbol
Delete the offending attribute.
File->Save As
Hierarchy->Up
Delete old symbol, add new in its place.

Is that really so hard?

> 
> I think in my original post I suggested something like this.
> 
> 	Clif
> 
> 
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
> 

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user