← Back to team overview

kicad-developers team mailing list archive

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

 

On 1/20/2015 12:07 PM, Tomasz Wlostowski wrote:
> On 20.01.2015 17:58, Wayne Stambaugh wrote:
>> On 1/20/2015 10:51 AM, Tomasz Wlostowski wrote:
>>> On 20.01.2015 16:19, Wayne Stambaugh wrote:
>>>> On 1/20/2015 12:44 AM, LordBlick wrote:
>>>>> In response to a message written on 13.01.2015, 19:20, from Tomasz
>>>>> Wlostowski:
>>>>>> Hi all,
>>>>>>
>>>>>> During my work on diff pairs/matched length tools, I've encountered a
>>>>>> rather tricky problem: as the diff pair gap specific to a particular
>>>>>> pair of traces is stored nowhere, the shove algorithm will mess up DP
>>>>>> coupling after saving and re-loading the board. Ergo: the DP gaps (and
>>>>>> possibly other settings) need to be stored somewhere in .kicad_pcb
>>>>>> files. Perhaps in a yet another s-expr token.
>>>>>>
>>>>>> The problem is that adding any new token to the file format causes all
>>>>>> precedent versions of pcbnew to drop an error attempting to load the
>>>>>> file. I would propose two solutions to overcome this:
>>>>>> - (a dumb one) if the version in the file header is newer than the
>>>>>> version supported by the running application, issue warnings instead of
>>>>>> fatal errors on unknown tokens,
>>>>>> - (a bit smarter) enclose all optional tokens in a "minimum" version
>>>>>> block ( min_version version_number ( optional_token ( ... ) ) ) that
>>>>>> would be ignored if the application version < version_number.
>>>>>>
>>>>>> I consider this modification quite important from the point of view of
>>>>>> adding future features and the upcoming stable version: if we keep
>>>>>> things as they are, adding any new feature will either make the files
>>>>>> unreadable to the stable version or force us to support saving in
>>>>>> multiple format versions.
>>>>>>
>>>>>> Looking forward to your feedback,
>>>>>> Tom
>>>>> I think that may be sufficient to add section [gal] to .pro file as
>>>>> usual project setting. In this way you can avoid the next .kicad_pcb
>>>>> format version change.
>>>>>
>>>>
>>>> I'm not terribly thrilled about that idea.  One of the things we have
>>>> changed over the years is to move board specific settings out of the
>>>> project file and into the board file.  This makes the board file more
>>>> portable. 
>>>
>>> Hi Wayne,
>>>
>>> Fully agree here. What I meant when I started this thread was defining a
>>> way to store more complex DRC constraints than simple clearance/track
>>> width. The current model can't handle differential pair and constrained
>>> trace length. Such parameters surely belong to a PCB design, so their
>>> place is IMHO in the .kicad_pcb file.
>>>
>>> Anyway, for the first release of the new P&S features, I'm not going to
>>> modify the file format.
>>>
>>> Cheers,
>>> Tom
>>>
>>
>> Hey Tom,
>>
>> If it is important to save the design settings, now would be the time to
>> make any file changes rather than after the stable release.  We know we
>> are already going to have issues with users who upgrade from the current
>> stable release due to layer name translations and the 32 to 64 layer
>> transition.  I would rather get it over with now than drag it out over
>> the next development cycle.
> 
> Hi Wayne,
> 
> I meant the merge of diff pairs into product branch, so that people
> could already test and profit from the new features. I hope we'll have
> the time to define and implement file format upgrades before the stable
> release goes out.
> 
> Cheers,
> Tom
> 

That makes sense to me.  I'm sure there are a few users who are looking
forward to trying out the diff pair feature.



References