← Back to team overview

kicad-developers team mailing list archive

Re: file version compatibility (optional tokens in s-expression files)

 

On 1/14/2015 11:27 AM, Tomasz Wlostowski wrote:
> On 13.01.2015 20:11, Wayne Stambaugh wrote:
>> This is a tricky issue that has been discussed before.  The general
>> consensus in the past has been not to support forward compatibility.  It
>> increases maintenance and complexity of the file parser for a minimal
>> net gain to the user.  My preference is to force users that want to
>> bleed on the edge to use nightly builds rather than try to maintain any
>> forward file compatibility.  
> 
> Hi Wayne,
> 
> The only argument I see for limited forward compatibility is when
> someone uses a bleeding edge build to benefit from the latest features
> (or just adds them them as needed), but must be able to share the design
> (read only is OK) with other people who are forced to stick to the
> stable version (think of corporate/university users where software is
> centrally managed by some IT department).
> 
>> I also don't like idea of creating special tokens just for version
>> compatibility.  I would like to keep the file format as readable as
>> possible.  My guess is that any version compatibility tokens will have
>> to reference the other objects in the file making the file less readable
>> which is something that I will be reluctant to support.
> 
> I didn't consider impact on file readability. I'm not the type who edits
> graphics with a text editor (and a PCB, after all is mostly a graphical
> design), so as long as the file structure is easy to figure out, I'm OK
> with it. I understand your point though and I'm not going to argue here
> (especially given the fact that you've put quite a lot of effort to make
> the format readable).
> 
>>
>> How do you plan to prevent data loss when editing newer files with older
>> versions of pcbnew? 
> 
> 
> 
>> One solution might be to ignore any unsupported tokens and warn the user
>> that there may (will?) be data loss if the board is modified and saved.
>> Even this solution I think has a lot of potential pitfalls.  Make newer
>> files read only is also a possibility.
>>
>> The only way I would support forward file compatibility is if there is:
>>
>> a) no loss of file readability
>> b) no loss of user data
>> d) no unnecessary increase in the complexity of the file parser code.
>> c) no hoard of angry users who want to edit a new file version with and
>> older version of pcbnew.
> 
> OK, how about this:
> - No extra version tokens (fits point A)
> - Warning instead of error on unrecognized tokens (point C - no big
> changes needed in the parser)
> - If the opened file is produced by a newer version of Kicad, issue a
> big warning when the user attempts to save it, that certain features
> will be lost (points B and D - if somebody complains we can always tell
> him he was warned). AFAIK this is what most commercial software does.

This seems plausible but a bit risky.  How would you handle new file
objects that an older version of pcbnew knows nothing about?  These
objects would not be rendered and the user might get a false sense of
security that a complete file load was performed.  A warning may work or
it may not.  I guess you get to pick who you want to scream at you.  The
user who can't open a new file version or the user who just lost
valuable file information.  Pick your poison.  I'm more comfortable
telling people to upgrade rather than saying "Sorry, you were warned".

> 
> Cheers,
> Tom
> 
> 



Follow ups

References