← Back to team overview

kicad-developers team mailing list archive

Re: Handling invalid characters in symbol/component LIB_IDs

 

Attached a small project to observe the problem/test the patches. There
are two libraries inside:
- slash.lib contains one symbol with '/' in its LIB_ID
- slash_conflict.lib contains two symbols that result in a LIB_ID clash
(RELAY_Hongfa_HF115F/012-1H3T and RELAY_Hongfa_HF115F_012-1H3T).

Normally you can use slash.lib, but if you want to check what happens in
case of a conflict, then use the other one.

On 03/06/2018 02:55 PM, Maciej Sumiński wrote:
> I am trying to find a reasonable way to handle symbol and components
> with invalid characters in their LIB_IDs (see bug report #1752419 [1]).
> While now it is impossible to create such LIB_IDs, we need to handle
> documents that had been created before the restriction was introduced.
> 
> LIB_IDs in SCH_COMPONENTS will have illegal characters replaced on load,
> but it is not the case for LIB_{PART,ALIAS} classes. Due to that:
> 
> - Symbol-component links are broken (e.g. component with LIB_ID
> 'Test/Name' will change to 'Test_Name', but the corresponding LIB_PART
> will remain 'Test/Name'.
> 
> - It is impossible to place/edit such symbols.
> 
> The simplest solution is to process LIB_{PART,ALIAS} LIB_IDs in the same
> way as id done for SCH_COMPONENTs, so they become valid names that match
> SCH_COMPONENTs using them (see the attached patches). There are two
> drawbacks:
> 
> - Changing names that user had previously assigned, which might be
> annoying if LIB_IDs are used e.g. to create BOMs. Personally I would use
> the value field that accepts all characters for this purpose.
> 
> - Naming conflicts may occur (e.g. both 'Test/Name' and 'Test:Name' will
> be changed to 'Test_Name', but I believe it is a rare case.
> 
> Any thoughts? I believe a more elegant solution will be implemented once
> the new schematic file format is ready.
> 
> Cheers,
> Orson
> 
> 1. https://bugs.launchpad.net/kicad/+bug/1752419
> 
> 
> 
> _______________________________________________
> 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
> 

Attachment: slash_test.tar.bz2
Description: BZip2 compressed data

Attachment: signature.asc
Description: OpenPGP digital signature


References