Prototype named references in precomputed TypeMaps - #132891
Draft
jtschuster wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
Instead of adding an additional caching layer in The best way to do this may be to actually encode the "could not resolve to fixup" entries differently. I think a better encoding would be as a Sequence of |
This was referenced Aug 28, 2026
Open
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.
Discussion prototype
Alternative fix for #132811, published for design comparison rather than as a merge-ready product change. This prototype avoids adding synthetic manifest
AssemblyRefentries for custom-attribute-only types by extending the precomputed TypeMap payload itself.Design
0: the existing(importSection, fixupIndex)representation.1: the original custom-attributeSystem.TypeSerString stored as a NativeFormat string constant.TypeDesc; the descriptor remains the source for validation, proxy hashing, trimming, and dependency analysis.TypeHandle.#<simpleAssemblyName>:<sourceModuleIndex>ModuleRef without a corresponding sourceAssemblyRef.Validation
Fail-before on the blob-only
TypeMapLib5case:RunCrossGen2=1: failed withFileNotFoundExceptionfromFindPrecachedExternalTypeMapEntry.RunCrossGen2=1 CompositeBuildMode=1: failed with the same exception.With this prototype:
./build.sh clr+libs+host: passed with 0 warnings and 0 errors.Interop/TypeMap/TypeMapApp.csprojbuild: passed.TypeMapBlobOnlyLib.The test also adds two blob-only proxy source types with the same full name from different assemblies, exercising a shared proxy hash bucket and exact lazy candidate comparison.
Tradeoffs
System.Reflection.TypeNameResolverduring the TypeMap API lookup. That path can GC, throw, load assemblies, and invoke resolution callbacks, but it runs only in the existing lazy lookup QCall with no loader or TypeMap dictionary lock held; eager assembly loading remains unchanged.Note
This draft pull request description was generated by GitHub Copilot.