Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

Version specifications in dmod_link_modules() were not propagating to generated .dmd dependency files. When developers specified dmod_link_modules(target dmini@1.0), the version constraint was lost in the build output.

Changes

CMake integration

  • dmod_link_modules() now serializes version requirements to <target>_version_requirements.txt at configure time
  • dmod_create_module() automatically passes this file to todmd via new -r flag during build

todmd enhancement

  • Added -r <file> flag to accept version requirements file
  • Version resolution: requirements file takes precedence over DMF-embedded versions
  • Format: simple text file with module@version entries

Test coverage

  • Integration test verifying end-to-end version transfer
  • Validates both file creation and .dmd generation with versions

Example

dmod_link_modules(my_module
    dmini@1.0      # Version requirement saved
    dmodex@0.2
)

Generates my_module_version_requirements.txt:

dmini@1.0
dmodex@0.2

During build, todmd receives this file and produces .dmd with version constraints intact.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Przenosić informacje o wersji z dmod_link_modules do dmd</issue_title>
<issue_description>Po każdej kompilacji modułów tworzony jest plik *.dmd, który zawiera informacje na temat wymaganych modułów używanych przez nasz moduł. Jest to generowane za pomocą narzędzia todmd, które czyta zależności z pliku *.dmf. Jest to bardzo dobre zachowanie, jednak musimy je rozbudować, gdyż aktualnie deweloperzy mogą podać wymaganą wersję w CMakeLists.txt do funkcji dmod_link_modules - powinniśmy jakoś podać te informacje do todmd tak, aby jeżeli rozpozna wykorzystanie danego modułu, to przeszuka listę tych podanych przez dewelopera i jeśli jest podana jakaś zależność wersji, to ją przekaże to pliku dmd również. </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add version information transfer from dmod_link_modules to dmd Transfer version requirements from dmod_link_modules to .dmd files Dec 11, 2025
Copilot AI requested a review from JohnAmadis December 11, 2025 15:00
Copilot AI and others added 5 commits December 12, 2025 08:53
- Modified dmod_link_modules to save version requirements to a file
- Updated todmd to accept -r flag for version requirements file
- Modified dmod_create_module to pass version requirements to todmd
- Added logic in todmd to merge versions from CMake with DMF dependencies

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
- Created test module that uses dmod_link_modules with versions
- Added test script to verify version requirements file creation
- Fixed dmod_link_modules to save versions even when dmf-get not available
- Tests verify version info is properly transferred to .dmd files

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
- Updated cmake-functions.md to describe version requirements handling
- Updated todmd README with -r flag and version requirements file format
- Added integration workflow explanation

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
@JohnAmadis JohnAmadis force-pushed the copilot/add-version-info-to-dmd branch from ee3d833 to e2d8133 Compare December 12, 2025 07:53
@JohnAmadis JohnAmadis marked this pull request as ready for review December 12, 2025 08:11
@JohnAmadis JohnAmadis merged commit 1fcc502 into develop Dec 12, 2025
4 checks passed
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.

Przenosić informacje o wersji z dmod_link_modules do dmd

2 participants