Unintentional footprint file format change? Library name now included in footprint name.

Bug #1772095 reported by Rene Poeschl
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Jeff Young

Bug Description

It seems the footprint editor now includes the library name in the first line of the file. In the past only footprint export did this.

If this is intended to stay for kicad 5 then all footprints in the official lib need to be updated. We would also need to update all our helper tools and the library convention.

This must be quite new as i made a pull request to the footprint lib about a month ago and did not observe this. (Or there is some hidden setting that i do not know about.)

My kicad version (ubuntu nightly from today)

Application: kicad
Version: 5.0.0-rc2-dev-unknown-dfcdfe9~65~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.13.0-41-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Rene Poeschl (poeschlr)
summary: - Unintentional file footprint format change? Library name now included in
+ Unintentional footprint file format change? Library name now included in
footprint name.
Revision history for this message
jean-pierre charras (jp-charras) wrote :

I am guessing it is a side effect of an other change.
I do not see any good reason to write a nickname in this footprint file.

Revision history for this message
Rene Poeschl (poeschlr) wrote :

This seems to have been introduced by the fix for this: https://bugs.launchpad.net/kicad/+bug/1767736

Really guys if you change the footprint or symbol file format (even if it only is a whitespace character) notify us librarieans as we might need to update our tools!

It is also strange that this was done during the feature freeze.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I don't know what happened here but originally, the footprint file format contained the footprint name even though the name was ignored and the file name without the extension was used as the footprint. In hindsight, this was probably not a good idea as it limits the set of footprint name characters to those that are valid file name characters. I am planning on fixing that during v6 primarily because so many users have symbol names with invalid file name characters. That being said, it should not make any difference if the footprint name is saved in the footprint file. The parser will parse it and ignore it unless someone changed the parser as well.

Jeff Young (jeyjey)
Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
milestone: none → 5.0.0-rc2
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 0bcfb2c7df2dc37608983831cb6b2492772d507f
https://git.launchpad.net/kicad/patch/?id=0bcfb2c7df2dc37608983831cb6b2492772d507f

Changed in kicad:
status: Triaged → Fix Committed
Revision history for this message
Rene Poeschl (poeschlr) wrote :

Thanks, looks like the footprint editor now saves the file the same way as it always did.

I would suggest to add two auto test cases to avoid such a problem in the future.
One for the symbol editor and one for the footprint editor.
The testcase would be as follows:
0. Copy reference footprint to test library (or use git features instead)
0a. set this library as active
1. Open the reference footprint (or symbol) using the editor
2. Set the kicad internal modified flag
3. Trigger save action
4. Check the footprint is the same (with exception of the time stamp) as the reference footprint. (not just the parsed footprint. Every char must match! Otherwise the change will create a lot of noise in the official library and in the version control systems of the users.)

If a change in the footprint or symbol is detected there must be a discussion on the mailing list before this change is accepted.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.