← Back to team overview

kicad-developers team mailing list archive

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

 

On Tue, Jan 13, 2015 at 07:47:25PM +0100, Nick Østergaard wrote:
> Which is easy to handle if the file tells the minimum version. Then
> there should just be a check if the kicad that reads is new enough,
> and it can tell you to update. This will remove the fatal failure, and
> we don't have to support older versions in a simple way. IMHO.

Well, there is a version tag even in the legacy file format (the version
header line), so that shouldn't be a 'big' new. Checking that should be
easy. Deciding when to bump it, it's too: when the format (or maybe even
the meaning in some case) of any sexp changes. For supporting loading of
'legacy' forms there is a (relatively big) problem since the current
architecture is grammar driven (a recursive descent parser last time
I've checked) and not data driven (like true sexps) you need to special
case every time the old versions during parsing. Look at the layer table
for the most awful case ever encountered :P

In short, the needed infrastructure is already there but it's not
immediate to maintain every time the format changes...

As for allowing 'optional' forms in the format IIRC it was already
discussed and rejected a long time ago.

-- 
Lorenzo Marcantonio
Logos Srl


References