Skip to content

Probe and prioritize module-native runtimes across framework folders - #791

Merged
PrzemyslawKlys merged 3 commits into
mainfrom
fix/module-runtime-fallback
Aug 20, 2026
Merged

Probe and prioritize module-native runtimes across framework folders#791
PrzemyslawKlys merged 3 commits into
mainfrom
fix/module-runtime-fallback

Conversation

@PrzemyslawKlys

@PrzemyslawKlys PrzemyslawKlys commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • makes generated module bootstrapper native-runtime probing process-architecture aware across all packaged managed-framework folders
  • rebuilds the module-owned PATH prefix on every import, with the active managed-framework folder first and every viable fallback retained
  • makes development runtime switching deterministic across repeated Debug/Release imports
  • allows a Desktop/Default assembly to reuse x86 native dependencies bundled under Core without dropping other split native dependencies

Why

Multi-target modules can legitimately place runtime assets under more than one Lib/<framework>/runtimes/<rid>/native tree. The existing bootstrapper searched only the active managed framework folder. The first revision discovered fallbacks, but a repeated import could leave an already-present fallback ahead of the newly active framework. The generated handlers now remove every module-owned candidate from the existing PATH and rebuild the prefix in the intended order while preserving unrelated entries.

Validation

  • 35/35 focused ModuleBootstrapperGeneratorTests pass on the final head
  • generated bootstrapper retains selected-framework precedence and every distinct module-local native path
  • direct PowerShell 7 execution proves active-to-fallback and Debug-to-Release-to-Debug ordering across repeated imports
  • direct Windows PowerShell 5.1 execution proves the combined packaged and development handlers preserve the same ordering
  • the consumer scenario was reproduced with a multi-target EventViewerX module containing x86/x64/arm64 SQLite runtimes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cee152c461

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread PowerForge/Scripts/ModuleBootstrapper/RuntimeHandler.Template.ps1 Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14a6ca0224

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread PowerForge/Scripts/ModuleBootstrapper/RuntimeHandler.Template.ps1 Outdated
@PrzemyslawKlys PrzemyslawKlys changed the title Probe module-native runtimes across framework folders Probe and prioritize module-native runtimes across framework folders Aug 20, 2026
@PrzemyslawKlys
PrzemyslawKlys merged commit fc4ff8a into main Aug 20, 2026
8 checks passed
@PrzemyslawKlys
PrzemyslawKlys deleted the fix/module-runtime-fallback branch August 20, 2026 20:47
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.

1 participant