Add Export Lib To Files for library projects#28
Closed
gsokoll wants to merge 2 commits into
Closed
Conversation
Library projects keep POUs, DUTs, GVLs and folders directly under the project root rather than under a Device, so the existing Export To Files exports nothing for them. This adds a separate entry script that walks the project root, skips the service manager objects, and writes the same on-disk format without the device and application levels. Importing a library export back is not yet supported. Credit: reimplemented from ipfedor/codescribe commit a90c84a. Refs #24.
It is auto-created in every project, its GUID is unmapped, and native export of it fails, so the UNKNOWN fallback printed a warning on every run. Found during live validation on CODESYS SP11.
Contributor
Author
|
Live validation on CODESYS V3.5 SP11, automated via --runscript. Passed
|
This was referenced Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #24. Reimplemented from ipfedor/codescribe commit a90c84a.
Library projects keep their POUs, DUTs, GVLs and folders directly under the project root rather than under a Device, so the existing Export To Files (which walks device entrypoints) exports nothing for them. This adds a new script command, Export Lib To Files, that walks the project root and writes the same on-disk format without the device and application folder levels. It reuses the staging helpers from #26 and the UNKNOWN-GUID native-export fallback from #25.
Service objects are skipped by name (Library Manager, Project Information, Project Settings, Task Configuration, Symbol Configuration, Visualization Manager, Alarm Configuration, Recipe Manager). The manager objects carry GUIDs that are not in GUID_TYPE_MAPPING, so without the skip list the UNKNOWN fallback would export them as native xml noise. This list matches the fork implementation.
Importing a library export back into a project is out of scope for this PR, as it is in the fork.
Live validation required before merge
Stacked on #26, which is stacked on #25. Bases retarget automatically as those merge.