Problem: When the PCM_ prefix is added after library installation, it breaks the connection between the symbol and footprint because the prefix is added to the footprint “Nickname,” which is used as the path defined in the symbol footprint property.
I looked through other libraries available on PCM, and some of them simply add the default prefix (PCM_) to the symbol’s footprint property, assuming the user will not change that setting locally (of course, if the user changes it, it breaks). This is what I am doing right now, although I do not like it.
Are there any known solutions to circumvent this? In addition to being prone to local user settings, it is also harder to add new symbols when working on a non-PCM copy. I have added the prefix during the build process, so when developing the library, if I want to check if it works, I build a PCM zip and then unzip it to verify that it works properly.
KiCad 8 automatically adds third-party libraries to library tables, by default it also adds the PCM_ prefix to their names. If you have the default PCM_ prefix in Preferences → Packages and Updates, simply choose the default 4.0.1 version.
If you want no prefixes, simply leave the Library nickname prefix blank and chose version 4.0 in package manager.
There are cases where users are notified of this guide and are able to avoid the problem by creating two zip files.
For example, even if a developer of a plugin library set develops the source code as follows:
The plugin provides two different zip file contents for download, providing a workaround to users.
Yes, this is a real limitation of current implementation.
I imagine something like special substitution variable is necessary for kicad to automatically replace something like ${PCM_LIB_PREFIX} to whatever user currently has configured for the prefix.
This should be a feature request, I would file it myself but my access to a PC with kicad and internet is limited at the moment.
Your package identifier must be namespaced using reverse-DNS format. For example, official KiCad addons use the namespace org.kicad.packagename.
For example, I wonder if this issue can be resolved by registering rules so that they do not conflict with common rules and identifiers?
Create rules using package identifiers (e.g., PCM_“package identifier”) and implement a way to hide them from users. Alternatively, create a name (e.g., PCM_packaceshortname) that does not conflict with KiCAD itself and other packages. Package short name (e.g., maximum 3 characters) … ?