← Back to team overview

kicad-developers team mailing list archive

Re: Migrating old designs best practice

 

On 26/11/17 04:00, Wayne Stambaugh wrote:
On 11/24/2017 05:01 PM, hauptmech wrote:
On 25/11/17 02:14, Wayne Stambaugh wrote:
This is *the* fatal flaw with the cache library.  User's assume it is
stale symbols or a temporary copy.  It is not.  It is a snapshot of the
current library symbols linked to the symbols in the schematic.  It gets
refreshed every time the schematic is saved.  Once you delete this file
or keep an out of date copy using cvs, all bets are off.  It is only a
matter of time before one of your symbol libraries changes or gets
removed and you will end up with a broken schematic.  The rescue code
depends on the cache being up to date in order preserve you schematic.
If the cache is not current, the rescuing cannot be guaranteed.
I don't think it's necessarily a flaw. And your description above is
indeed a cache. That's not a bad thing. I recall that I left it out of
version control because I wanted to make sure fixes to my symbols were
always propagated to the design. In the repo I'm referencing for this
discussion I had 10 project files all using the same local library. I
didn't want to have to manually update each schematic to propagate
changes. Deleting untracked files was what I did instead. At the time no
one was making breaking changes to system installed symbols, so the
system libs were stable for this workflow.

I'm trying think of the least effort way to migrate an old design in
these circumstances.

Can we have the rescue code fail if no cache file is found? That at
least lets the user know they are in uncharted territory. Then if a lot
of users come complaining you will know if it is worth doing a bit more
in the rescue code.

If the cache is not available during rescue you can load a copy of the
libraries that were current at the schematic save date and either
re-cache them or rescue them directly. But this is only worth doing if a
significant number of users are affected.
AFAIK, the rescue code doesn't do anything if there is not cache file
because the cache file is used for the comparison.  I actually
considered adding a check on schematic load to warn the user with a list
of all of symbols linked to the cache library so they could fix them.
I'm not sure this is desirable but at least users would know that
symbols were missing from their libraries and the links were falling
back to the cache which is tenuous at best.


It depends on how you view the role of the rescue code. While the schematic itself is not changed, the library files are, and in the case of no cache, the library files are part of the schematic dataset.  The schematic still needs rescuing.

It would be nice if we could just point to a folder full of the old libraries on load that could then be the source for the symbols copied into the rescue.lib

But, a simple warning that symbols were changed if there is no cache file would at least let people what's going on.  You and I know what's going on now, but the next person to see this will just see the rescue operation succeed and then a broken schematic full of disconnected wires.

The symbols from cache list sounds like it would be useful.

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




References