Regarding the Addition of a File Version Downgrade Feature to KiCad

312 views
Skip to first unread message

熊义彬

unread,
May 29, 2026, 4:22:56 AMMay 29
to KiCad Developers
Regarding the KiCad file version downgrading feature,once this functionality is officially supported, more users will be willing to participate in testing new features within the development builds. This will facilitate the earlier detection and reporting of bugs, thereby enabling the expedited implementation of more stable features—with the ultimate goal of significantly reducing the number of bugs present in the final official release version.
I have developed a C++-based command-line interface (CLI) tool capable of downgrading KiCad files from versions such as 10.99, 10, 9, or 8 back to earlier versions like 10, 9, 8, or 7. The code repository for this project is located at: https://github.com/AskStr/kicad-backport-cplus
You are welcome to visit the repository to review the code.
Additionally, the repository contains a document—compiled and analyzed by me—that provides a detailed exposition on the "version differences within the KiCad file format."
Ideally, this functionality would be integrated directly into the KiCad project itself, allowing users to simply select the desired target version number via the "Save As" menu option to save their files in a specific legacy format.

Bob Kuczewski

unread,
Jun 3, 2026, 6:30:22 PMJun 3
to KiCad Developers, xyb...@gmail.com
Hello,

It's an amazing coincidence that the topic of downgrading was mentioned just a few days ago. I've been poking into this myself for the past few days without having seen this post. In pursuit of that goal, I just posted to the KiCad-Users group on Groups.io which led me to this devlist:


As mentioned in that post, there is a "downgrader" back to version 7 available here

But millions of Raspberry Pi's have been shipped with versions 5 or 6. Similarly, Debian (and many derivatives) have also shipped with earlier versions. Yes, people can upgrade, but it would be handy to be able to save simple designs in a format that can be read by nearly all versions of KiCad without requiring any upgrades. This would be a nearly universal format since all newer versions can naturally upgrade the project to their native format. While it would be great to have a "save as old version" option in KiCad itself (Libre Office can still save as Word97!!), it would be good enough to extend the HubertHQH code to convert to older versions. I'd like to work on that, and I'm looking for any help on understanding what was changed from 5 to 6 and from 6 to 7. Any help is welcomed. Thanks for your time.

Bob

Seth Hillbrand

unread,
Jun 3, 2026, 10:19:56 PMJun 3
to dev...@kicad.org
Hi folks.  This is in progress for v11.  Depending on the timeline, it may be able to be backported
    
Seth Hillbrand
Lead Developer
+1-530-302-5483
Long Beach, CA
www.kipro-pcb.com    in...@kipro-pcb.com


--
You received this message because you are subscribed to the Google Groups "KiCad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devlist+u...@kicad.org.
To view this discussion visit https://groups.google.com/a/kicad.org/d/msgid/devlist/0b60bf33-cc03-4bac-89f4-95f8aa19946bn%40kicad.org.

熊义彬(askstar)

unread,
Jun 4, 2026, 6:50:37 AMJun 4
to KiCad Developers, se...@kipro-pcb.com
Hello.This is the latest analysis and compilation as of today, with added documentation on the differences in file formats between KICAD V4/V5 and the KICAD 11 development version: https://github.com/AskStr/kicad-backport-cplus/blob/main/docs/kicad-file-format-version-differences.md
Document on upgrade and downgrade strategies:
kicad-format-migration-implementation-strategy.md
Hope this can be helpful. I will also take some time these days to implement it.

Bob

unread,
Jun 4, 2026, 6:04:42 PMJun 4
to KiCad Developers, xyb...@gmail.com, se...@kipro-pcb.com
Thanks. Both of these documents were highly informative:

  https://github.com/AskStr/kicad-backport-cplus/blob/main/docs/kicad-file-format-version-differences.md
  https://github.com/AskStr/kicad-backport-cplus/blob/main/docs/kicad-format-migration-implementation-strategy.md

Also, I'd like to offer a few more thoughts on the "downgrading" issue. The basic need is the ability to share projects with people who may be using different versions of KiCad. It's easy to share with some using a newer version because the upgrade is nicely automatic (thank you). But the downgrade process isn't currently supported so sharing becomes a one-way street.

There are a number of ways to provide the "downgrade" functionality:

  1.   Export as KiCad version X
  2.   Export to a Common Denominator Format
  3.   External Conversion Programs

Any of these would satisfy the basic need to share projects. And they each have their advantages and disadvantages.

The first (Export as KiCad version X) is probably the most powerful and maybe even the "right" way to do it. But it may also be the most work and it does have the disadvantage that it needs to be done by the person with the higher version. That may not always be easy when a design, for example, has been posted to the web and the author isn't willing to downgrade to every version that someone might want.

The second (Export to a Common Denominator Format) could be less work and similarly effective. It could also have the benefit that the Common Denominator Format (CDF) might become a defacto standard so that people might post their current KiCad versioned file along with the CDF version. People writing third party software (such as hardware in the loop simulators) might simplify their jobs by only supporting that CDF format. I don't know if there is such a "Common Denominator" format, but I believe that KiCad has supported importing from Eagle CAD for a long long time. So that might be a good candidate "Common Denominator" format.

The third option (External Conversion Program) seems like it could produce the most immediately available solution. There are already at least two different convert programs that I've found:


And I found those without having done a thorough search. Since those converters both convert from version 7 onward, they would only need the modification to handle a few older formats to then be a complete solution. This seems like a fairly easy way to go.

Also, it's important to note that there are a number of consequences of these choices:

For example, both of  "Export..." options assume that the person who produced the higher level project is willing (and able) to export a lower level version as well. They may not think to do that, and they may not be available after the fact to produce a downgraded or common version. So anyone finding such a project on the web might still be stuck without a method to downgrade unless they can find someone to help them. The vast majority of existing projects may fall into this category.

On the other hand, the conversion programs would allow anyone to convert any project (old or new) without any other assistance. But they are, by definition, external to KiCad, and would also need to be maintained. If the KiCad team were to maintain them, then that would solve that problem.

So those are just a few things to consider from a user's perspective. In either case, thanks very much for the thorough attention you've given to this feature request.

熊义彬(askstar)

unread,
Jun 4, 2026, 7:01:36 PMJun 4
to KiCad Developers, Bob, 熊义彬, se...@kipro-pcb.com
Hello everyone. I have completed the downgrade support for the V6 version files. The repository has been updated.
The updates are as follows:
Add latest dev-format downgrade support and complete V6 compatibility work

Add downgrade handling for current development format changes 20260521 and 20260603
Bring KiCad V6 downgrade support to a mostly complete state, validated by manually opening converted files in the actual KiCad V6 application
Refine the code architecture to prepare for future V5 upgrade/downgrade support
Further expand and polish the KiCad file format version differences documentation

I also considered using third-party format conversion before, but relatively speaking, converting between minor versions would result in losing too many features.

If the KiCad team takes over maintaining them, I am very willing to hand over the KiCad downgrade project to the KiCad team for everyone to maintain together, and I will also do my best to follow up and improve it together. What do I need to do?

Mark Roszko

unread,
Jun 6, 2026, 5:41:47 PMJun 6
to dev...@kicad.org, Bob, 熊义彬, se...@kipro-pcb.com
We are looking to add downgrading into KiCad itself by versioning its file I/O architecture. We don't want post-processors that strip out information after the fact.


Bob Kuczewski

unread,
Jun 6, 2026, 6:34:44 PMJun 6
to Mark Roszko, dev...@kicad.org, 熊义彬, se...@kipro-pcb.com
Thanks very much for looking into this. The fact that this has come up reflects the happy situation that KiCad has been in widespread use for a long time and is widely used by many people. The need to consider backward and forward compatibility is a testimony to the success of your software.  :)

I do have one request for the official downgrading implementation. PLEASE (please, please) make it a stand-alone program with very few (if any) dependencies. If it requires running KiCad 99 to downgrade from version 99 then that somewhat defeats its purpose. Anyone who can install and run 99 for downgrading probably doesn't need the downgrading for themselves.

The situation you should consider is someone running an older version of KiCad who finds a newer KiCad project on the web (on GitHub, for example). They download the project files but can't open it because it's a newer version than they have. They might like to upgrade, but they are afraid of the "dependency hell" that they've experienced with other packages. They don't want to have to upgrade their entire operating system just to run the newer version. They also might not want to face having to learn the differences between the versions (at least not right then). There may be other alternatives (Docker and virtual machines), but these may be more than they want to deal with, and they would still involve learning the differences. So they just let it go.

What a person needs in a situation like that is a simple command line program (or even a Javascript web application) to take the new version and downgrade it to their version. They need something that either works out of the box or that compiles easily on any platform with virtually no outside dependencies. I hope that's what you will consider providing for your downgrading process.

Thanks again for considering this.

熊义彬(askstar)

unread,
Jun 7, 2026, 6:09:00 AMJun 7
to KiCad Developers, Bob, dev...@kicad.org, 熊义彬, se...@kipro-pcb.com, mark....@gmail.com
Hello everyone,
大家好,


1. If downgrade functionality is added directly to KiCad itself, it can indeed only be supported in newer versions, or all older versions that need support would have to be updated to include the downgrade feature.
1. 如果直接在 KiCad 本身中添加降级功能,则只能在新版本中得到支持,或者所有需要支持的旧版本都必须更新以包含降级功能。

2. The current implementation in the `kicad-backport-cplus` repository is an independent command-line program.
2. `kicad-backport-cplus` 存储库中的当前实现是一个独立的命令行程序。

3. All version downgrade functionality has now been fully implemented, and upgrade functionality is also mostly implemented. Downgrades from V10.99 -> V10 -> V9 -> V8 -> V7 -> V6 -> V5 -> V4 are supported, as are upgrades from V4 -> V5 -> V6 -> V7 -> V8 -> V9 -> V10 -> V10.99. Due to limited test samples, there may still be undiscovered bugs.
3. 所有版本降级功能现已完全实现,升级功能也已基本实现。支持从 V10.99 -> V10 -> V9 -> V8 -> V7 -> V6 -> V5 -> V4 降级,以及从 V4 -> V5 -> V6 -> V7 -> V8 -> V9 -> V10 -> V10.99 升级。由于测试样本有限,可能仍存在尚未发现的错误。

Bob

unread,
Jun 7, 2026, 4:39:40 PMJun 7
to KiCad Developers, xyb...@gmail.com, Bob, dev...@kicad.org, se...@kipro-pcb.com, mark....@gmail.com
For anyone who is interested, on June 6, I downloaded the kicad-backport-cplus repository at approximately 4:57pm PDT. I have since compiled it using a simple script (below), and I ran it against what I believe was a KiCad 7.0 schematic file (20230121). I have since opened the converted schematic in KiCad 6.0.9 and it all appears to be correct. I similarly opened the PCB file converted from the same project, and it looked correct as well.

I highly recommend that this software be reviewed as appropriate for safety and correctness and added to the KiCad distribution as soon as possible. I would also recommend two minor changes:

1. It would be nice if the program printed the detected KiCad version of the original file as a sanity check.

2. It might simplify compilation to include simple scripts for various platforms so that CMake isn't needed. I found that CMake was not installed on my Raspberry Pi, so I created the following simple script which worked (provided that all source files were moved into a single directory):

g++ -std=c++17 -c kicad_backport.cpp
g++ -std=c++17 -c kicad_backport_document.cpp
g++ -std=c++17 -c kicad_backport_legacy.cpp
g++ -std=c++17 -c kicad_backport_pathmap.cpp
g++ -std=c++17 -c kicad_backport_report.cpp
g++ -std=c++17 -c kicad_backport_rule_rewriters.cpp
g++ -std=c++17 -c kicad_backport_rules.cpp
g++ -std=c++17 -c kicad_backport_upgrade.cpp
g++ -std=c++17 -c kicad_backport_util.cpp
g++ -std=c++17 -c kicad_backport_versions.cpp
g++ -std=c++17 -c main.cpp
g++ -std=c++17 -c sexpr.cpp
g++ -std=c++17 -pthread -o main main.o kicad_backport_document.o kicad_backport.o kicad_backport_report.o kicad_backport_rules.o kicad_backport_util.o kicad_backport_legacy.o kicad_backport_pathmap.o kicad_backport_rule_rewriters.o kicad_backport_upgrade.o kicad_backport_versions.o sexpr.o

Finally, thanks again to all KiCad Developers and especially to wenxing (AskStr on GitHub) for all of your hard work.

Bob

熊义彬(askstar)

unread,
Jun 8, 2026, 5:08:32 AMJun 8
to KiCad Developers, Bob, 熊义彬, dev...@kicad.org, se...@kipro-pcb.com, mark....@gmail.com
Hello everyone,
Regarding adding source file version output, it will be added in the next step.
This is a web page that uses the current latest open-source C source code compiled CLI to achieve online conversion of KiCad file versions: https://kicad.askstar.cn. Future updates to the C source code will also be synchronized with the CLI backend of this website. It supports converting KiCad files or KiCad files in zip archives online anytime, anywhere. The internationalization is complete, and the current page supports display in 18 languages.

熊义彬(askstar)

unread,
Jun 8, 2026, 10:16:49 AMJun 8
to KiCad Developers, 熊义彬, Bob, dev...@kicad.org, se...@kipro-pcb.com, mark....@gmail.com
Hello everyone
I have just completed the full implementation of KiCad file version downgrading for the PYTHON plugin version:
- Implement arbitrary upgrades and downgrades between all supported versions
- Provide full KiCad support from KiCad V5 to KiCad V10.99
- Requires Python 3 or higher installed on the system when running from KiCad V5
- Extend Python conversion coverage for both modern and old KiCad files
- Add KiCad 5 launcher, internationalization detection, and GUI fallback improvements
- Fix old symbol fill mappings output by V5
- Add smoke tests for consistency, practical configuration, KiCad 5, and internationalization behavior
Repository: https://github.com/AskStr/kicad-backport-plugin

Bob

unread,
Jun 8, 2026, 12:51:44 PMJun 8
to KiCad Developers, xyb...@gmail.com, Bob, dev...@kicad.org, se...@kipro-pcb.com, mark....@gmail.com
Thanks for your work. I have used your kicad-backport-cplus and it seems to work very well so far. However, there is one small problem. The current code uses memory_resource ("#include <memory_resource>") in many locations. Unfortunately, that was not available in the versions of gcc that would be on computers still using the early versions of KiCad. So anyone using such an early version would not be able to compile kicad-backport-cplus in order to use it. Would it be possible to include the code for <memory_resource> directly in the repository or to not use it at all? The same is true of CMake. Computers using older versions of KiCad might not have CMake installed, so they would be unable to (easily) compile kicad-backport-plus. Would it be possible to create either a simple makefile or simple build scripts which compile directly without needing CMake?

Thank you again for your time and effort.

Bob

unread,
Jun 8, 2026, 1:05:01 PMJun 8
to KiCad Developers, Bob, xyb...@gmail.com, dev...@kicad.org, se...@kipro-pcb.com, mark....@gmail.com
Please note that these requests have been added as "Issues" in the GitHub repository for this project. The "Issues" page is at:

熊义彬(askstar)

unread,
Jun 9, 2026, 8:17:00 PMJun 9
to KiCad Developers, Bob, 熊义彬, dev...@kicad.org, se...@kipro-pcb.com, mark....@gmail.com
Hello everyone, the detailed handling of the conversion functionality of 'kicad-backport-cplus' is basically complete, and the CLI version, Python plugin version, and web online version have been implemented and are available for use or testing. Future work will mainly follow the development version to update support for the latest high versions and daily bug fixes.

1. CLI version: https://github.com/AskStr/kicad-backport-cplus
cli.png

2. Plugin version: https://github.com/AskStr/kicad-backport-plugin
plugin.png

3. Online web version (implemented based on calling the CLI version): https://kicad.askstar.cn
web.png

Salvador Eduardo Tropea

unread,
Jun 10, 2026, 7:34:24 AMJun 10
to dev...@kicad.org

El 4/6/26 a las 19:04, Bob escribió:
Indeed, and in particular because KiCad format is poorly documented.



Seth Hillbrand

unread,
Jun 10, 2026, 5:18:14 PMJun 10
to dev...@kicad.org

This is far better format documentation than you will find in any other EDA package out there.  And it can be updated.  We're not interested in a 50k update MR but if you wanted to improve the existing documentation, that is the place to do it.

But if you prefer your documentation to be AI generated, just be prepared to deal with the errors hidden in pages of verbosity.   I took a quick look and as soon as it started talking about kicad_dru file versions it was clear that no human checked this file.


    
Seth Hillbrand
Lead Developer
+1-530-302-5483
Long Beach, CA
www.kipro-pcb.com    in...@kipro-pcb.com

--
You received this message because you are subscribed to the Google Groups "KiCad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devlist+u...@kicad.org.

Bob

unread,
Jun 10, 2026, 5:44:16 PMJun 10
to KiCad Developers, se...@kipro-pcb.com
For the record, I believe that AI will mark the end of our long-cherished human freedoms. We're now watching AI through the same eyes that ancient chimpanzees used when watching their less hairy cousins rub sticks together to make fire. They didn't know what to do about it either.

Having said that, the ability to move KiCad projects between versions is highly useful. If the downgrading code satisfies a KiCad team review, then I would encourage the KiCad team to adopt the code as a standalone part of the KiCad package.

Thanks to all developers for giving us this remarkable tool. :)

Salvador Eduardo Tropea

unread,
Jun 11, 2026, 5:44:58 AMJun 11
to dev...@kicad.org

It was fine for KiCad 6.

For 7, 8, 9 and 10 was always outdated. I had to adapt my code on every single release and never found documentation for the changes.

It doesn't help that a lot of the changes are just cosmetic. Others are just a lack of abstraction in the file format, which seems to reflect some internal details.

Is also a pitty that the change from the ad-hoc format used in 4/5 was done to s-expressions + JSON, instead of just JSON. A lot of inconsistencies, that were then changed, are just a consequence of the format. 

I understand KiCad team lacks resources, but I don't agree with the huge priority of additions, and the low priority on consistency and reproducibility. I can't believe the huge amount of bugs introduced in minor releases. Stable releases should remain stable, let the fancy stuff for the unstable branch. I see too much cherry-picking instead of backporting fixes. Yes, it takes more time, which can't be dedicated to the funny new stuff, but this is what makes a project reliable.

And this policy gets reflected in the file format. The lack of documentation makes things even worst.

Perhaps the team should have a policy about changes in the file format without its corresponding documentation, just reject them.

BTW: is too hard to contribute to the code base, MR takes for ever to be incorporated, even some trivial ones. The code is organized in a way that a small change takes hours to be compiled, this makes verifications frustrating. I also think the poor coverage of the tests is one really weak point, the team doesn't have a mechanism to be confident about a change, and this leads to a state where the code is never stable.

Is not my intention to sound harsh, but after years developing plug-ins and contributing to the project I'm really frustrated.

El 10/6/26 a las 18:17, 'Seth Hillbrand' via KiCad Developers escribió:

熊义彬(askstar)

unread,
Jun 11, 2026, 7:20:38 PMJun 11
to KiCad Developers, str...@inti.gob.ar

Hello everyone, the documentation for the kicad-backport-cplus project has been fully reviewed and organized. The differences documentation has been compiled into a table format for easy reference.  
大家好,kicad-backport-cplus 项目的文档已全面审核整理完毕。差异文档已汇总成表格形式,方便查阅。

New differences and conversion handling instruction document: https://github.com/AskStr/kicad-backport-cplus/blob/main/docs/kicad-backport-converter-format-differences.md
新增差异和转换处理说明文档:https://github.com/AskStr/kicad-backport-cplus/blob/main/docs/kicad-backport-converter-format-differences.md
Reply all
Reply to author
Forward
0 new messages