← Back to team overview

kicad-developers team mailing list archive

Re: spaces not allowed in SCH library nicknames

 

Le 27/01/2018 à 13:41, Wayne Stambaugh a écrit :
> On 01/27/2018 05:55 AM, jp charras wrote:
>> Le 26/01/2018 à 23:11, Jeff Young a écrit :
>>> It is a great idea.  I hope it pans out….
>>>
>>
>> I perhaps missed something, but the only one reason spaces are not accepted in component lib names
>> (component lib_id) is the fact the space breaks the compatibility with old kicad versions.
> 
> Compatibility was broken when I introduced the fully qualified LIB_ID so I'm not sure this is and
> issue.  I also bumped the file version at the time.

In fact, when I am talking about compatibility, I mean just to be able to open a new schematic with
a 4.0 Kicad version.

This is currently possible, because all components with fully qualified LIB_ID are found in the
library cache (as long as there is no space in the LIB_ID).

> 
>>
>> I don't think the patch fix this compatibility problem.
> 
> This patch does fix a consistency problem.  The footprint library table allows spaces in library
> nicknames but the symbol library table does not.  This patch address that issue which is a good thing.
> 
>>
>> For me there is a more basic and more natural way to allow spaces:
>> double quote the component lib name, but *only* if it contains spaces (like many strings in
>> kicad_pcb files), when saving the .sch files, because anyway these files will be not compatible with
>> old kicad versions.
>>
>> And of course read a quoted component lib name as only one word.
> 
> This would require another file revision and a change in the legacy symbol library and would require
> a change to the parser to check for both quoted and unquoted symbol names which would be added
> complexity to the legacy parser.  I'm not sure it makes sense to do this unless there are issues
> with the patch.
> 
>>
>>>
>>>> On 26 Jan 2018, at 22:00, Wayne Stambaugh <stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>>
>>>> wrote:
>>>>
>>>> Seth,
>>>>
>>>> I haven't had a chance to test it but it's a clever concept.  I would
>>>> prefer a bunch user testing on this before I merge it.  If I do decide
>>>> to merge it, we should probably restore allowing spaces in symbol
>>>> library nicknames.  As of now, this patch doesn't buy us much if we
>>>> don't change that as well.
>>>>
>>>> Cheers,
>>>>
>>>> Wayne
>>>>
>>>> On 01/26/2018 03:00 PM, Seth Hillbrand wrote:
>>>>> Wayne-
>>>>>
>>>>> Would you object to a patch like the attached?  It reads the name line
>>>>> in reverse order, allowing spaces in the component name.  If this is an
>>>>> acceptable approach, I'll make the other required internal changes.
>>>>>
>>>>> -Seth
>>>>>
>>>>> 2018-01-26 10:22 GMT-08:00 Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx
>>>>> <mailto:tomasz.wlostowski@xxxxxxx>
>>>>> <mailto:tomasz.wlostowski@xxxxxxx>>:
>>>>>
>>>>>     On 26/01/18 19:18, Wayne Stambaugh wrote:
>>>>>> On 1/26/2018 1:01 PM, Tomasz Wlostowski wrote:
>>>>>>> Hi all,
>>>>>>>
>>>>>>> Why are space characters not allowed in the SCH library nicknames, but
>>>>>>> are OK for the FP libraries? Is this an overlook on SCH/PCB side?
>>>>>>>
>>>>>>> I'd like to disable the space check in eeschema, it's very annoying if
>>>>>>> the library file names contain spaces.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Tom
>>>>>>
>>>>>> For the same reason you can have spaces in symbol names, library symbol
>>>>>> names are not quoted in the schematic file format.  If you can figure
>>>>>> out a way to fix this without changing the schematic file format and
>>>>>> breaking anything, then I'm ok with that.  The new schematic file format
>>>>>> will use quoted strings for symbol library links (which will only be for
>>>>>> reverting or updating since symbols will be embedded in the schematic)
>>>>>> so I will remove this restriction once the new file formats are in play.


-- 
Jean-Pierre CHARRAS


Follow ups

References