AaronRobinsonMSFT / DNMD

Reimplementation of ECMA-335 metadata APIs
MIT License
16 stars 3 forks source link

DNMD edit APIs do not account for Portable PDB's ability to reference tables in other images. #33

Closed jkoritzinsky closed 10 months ago

jkoritzinsky commented 11 months ago

The DNMD edit APIs don't account for/update the "referenced type system tables" number of rows for portable pdbs.

The existing "keep the image schema matching the savable format" logic assumes that all table references point to tokens that can exist given the current schema. For Portable PDBs, tokens can reference tables that exist in the "runtime metadata" image, so we need to account for that when editing. In particular, we likely need to enable "resizing" cell references on "set column value as token or cursor" operations when values don't fit and tracking the "highest referenced row" in various tables.