Skip to content

CmdPal: fix initializing the Run history in AOT builds#48463

Open
zadjii-msft wants to merge 1 commit into
mainfrom
dev/migrie/run-hist-init
Open

CmdPal: fix initializing the Run history in AOT builds#48463
zadjii-msft wants to merge 1 commit into
mainfrom
dev/migrie/run-hist-init

Conversation

@zadjii-msft

@zadjii-msft zadjii-msft commented Jun 10, 2026

Copy link
Copy Markdown
Member

Regressed in one of the last two releases.

The problem was that history.ToImmutableList() ran on the projected IVector<string>. ImmutableList.CreateRange checks for IReadOnlyCollection<string>, and resolving that interface on a WinRT object requires a helper type that AOT can't generate.

So we have to just not do that.

Closes #48445

Regressed in one of the last two commits.

The problem was that `history.ToImmutableList()` ran on the projected
`IVector<string>`. `ImmutableList.CreateRange` checks for
`IReadOnlyCollection<string>`, and resolving that interface on a WinRT
object requires a helper type that AOT can't generate.

So we have to just _not do that_.

Closes #48445
@zadjii-msft zadjii-msft added the Hot Fix Items we will product an out-of-band release for label Jun 10, 2026

// HERE BE DRAGONS: Using an ImmutableList<T> for a setting may explode in
// AOT builds. Make sure to test IN AOT setting this setting to null, [],
// and and array with values.
@github-actions

Copy link
Copy Markdown

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

❌ Errors and Warnings Count
⚠️ duplicate-pattern 2
❌ forbidden-pattern 1

See ❌ Event descriptions for more information.

These words are not needed and should be removed DWRITE LWIN nonstd VCENTER VREDRAW

Forbidden patterns 🙅 (1)

In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves.

These forbidden patterns matched content:

In English, duplicated words are generally mistakes

There are a few exceptions (e.g. "that that").
If the highlighted doubled word pair is in:

  • code, write a pattern to mask it.
  • prose, have someone read the English before you dismiss this error.
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hot Fix Items we will product an out-of-band release for Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CmdPal] Run commands extension crashes on load - IReadOnlyCollection WinRT interop failure

3 participants