Skip to content

Load the gate library parser before creating a new project - #655

Open
horhulenko wants to merge 2 commits into
emsec:masterfrom
horhulenko:bugfix/new_project_gatelib_parser
Open

horhulenko wants to merge 2 commits into
emsec:masterfrom
horhulenko:bugfix/new_project_gatelib_parser

Conversation

@horhulenko

Copy link
Copy Markdown

⚠️ AI-generated contribution

This PR was written by an AI coding assistant (Claude Code). The diagnosis, code change, changelog entry and this description were all produced by AI, and a human reviewed them before submission. Please review with that in mind.

Tested only on macOS: I ran into this issue on my Mac (arm64, Qt 6 from Homebrew) and have only tested the fix there. I have not tested this commit on Linux or on any other device.


Problem

Creating a project through New Project fails for every gate library with:

Cannot create project <…>, cannot load gate library <…/NanGate_15nm_OCL.hgl>

The GUI loads plugins only on demand. At startup, GuiPluginManager loads each plugin briefly to read its features and then unloads it, which also unregisters the .hgl parser. Every other code path that loads a gate library first calls GuiPluginTable::loadFeature(FacGatelibParser, ext). FileManager::newProject() called gate_library_manager::load directly, so no parser was registered for the file type.

Fix

Load the gate library parser for the selected library's extension in FileManager::newProject() before loading the library, as the import and open paths already do. A changelog entry is added under GUI bugfixes.

Testing

On macOS only: before the fix, New Project failed with the error above for NanGate_15nm_OCL.hgl. After the fix, the project was created successfully. Not tested on other platforms.

🤖 Generated with Claude Code

The GUI loads parser plugins only on demand, but New Project called
gate_library_manager::load without first loading the parser for the
library's file type, so every attempt failed with "cannot load gate
library".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@horhulenko

horhulenko commented Oct 17, 2026 •

Copy link
Copy Markdown
Author

The same fix is needed to be able to create new project on Ubuntu 24.04. I've checked and the one-line change makes the work for Ubuntu too.

joern274
joern274 previously approved these changes Oct 20, 2026

@joern274 joern274 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this bug. Must admit that the create-new-netlist-from-scratch function is not used very often, so the bug went unnoticed for quite some time. I commend the swift fix and documentation in CHANGELOG

@horhulenko horhulenko closed this Oct 24, 2026
@horhulenko horhulenko reopened this Oct 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants