Skip to content

fix(dmod_system): enable cross-platform module name lookup when crossplatform mode is active#299

Closed
Copilot wants to merge 4 commits into
developfrom
copilot/list-api-crossplatform
Closed

fix(dmod_system): enable cross-platform module name lookup when crossplatform mode is active#299
Copilot wants to merge 4 commits into
developfrom
copilot/list-api-crossplatform

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 28, 2026

--list-api inspects binary metadata without executing it, so it should work on binaries from any target platform. When loading a module by name (not file path), the lookup was hardcoded to DMOD_ARCH, making it impossible to find modules built for other architectures.

Changes

  • Dmod_FindModuleFile arch check bypass — when crossplatform mode is already enabled, the architecture check is skipped so modules built for any target platform can be found by name
  • --list-api automatically enables crossplatform mode — no extra flags needed; loading a module by name with --list-api will find it regardless of its target architecture

Usage

# Inspect API of a module built for a different architecture by name
dmod_loader difs --list-api

# File-path loading was already cross-platform and is unchanged
dmod_loader /path/to/arm-module.dmf --list-api

When --list-api is used, crossplatform mode is enabled automatically, which now also bypasses the architecture filter in Dmod_FindModuleFile, allowing modules for any target platform to be located by name.

Copilot AI changed the title [WIP] Fix --list-api option to be crossplatform feat(dmod_loader): add --arch option for cross-platform --list-api May 28, 2026
Copilot AI requested a review from JohnAmadis May 28, 2026 09:14
@JohnAmadis
Copy link
Copy Markdown
Contributor

@copilot co ty odwalasz znowu? Kompletnie źle... trzeba po prostu włączyć tryb crossplatform, wez sie ogarnij

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 28, 2026

@copilot co ty odwalasz znowu? Kompletnie źle... trzeba po prostu włączyć tryb crossplatform, wez sie ogarnij

Removed the --arch option. The fix is now in Dmod_FindModuleFile: when crossplatform mode is already enabled (which --list-api sets automatically), the architecture check is skipped so any module can be found by name regardless of its target arch.

Copilot AI changed the title feat(dmod_loader): add --arch option for cross-platform --list-api fix(dmod_system): enable cross-platform module name lookup when crossplatform mode is active May 28, 2026
add_subdirectory(todmd)
add_subdirectory(todmm)
add_subdirectory(dmf-get)
#add_subdirectory(dmf-get)
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.

WTF?!?!?!?!?!

@JohnAmadis
Copy link
Copy Markdown
Contributor

co za pacan

@JohnAmadis JohnAmadis closed this Jun 2, 2026
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.

--list-api w dmod_loaderze powinno być crossplatform

2 participants