Skip to content

Match assembly identity to what callers look up - #17

Merged
ncave merged 1 commit into
ncave:fablefrom
MangelMaxime:fix/fcs-fable-assembly-identity
Aug 24, 2026
Merged

Match assembly identity to what callers look up#17
ncave merged 1 commit into
ncave:fablefrom
MangelMaxime:fix/fcs-fable-assembly-identity

Conversation

@MangelMaxime

Copy link
Copy Markdown

Two places where fcs-fable disagrees with FCS about an assembly's name. Both only bite when the IL module name differs from the name callers use, which never happens for ordinary assemblies - but fable precompile writes Fable.Precompiled.dll from a project called something else, and its module calls itself Fable.Precompiled.exe.

1. CCU name (GetCcuFS)

FCS names a CCU from the signature-data resource - CompilerImports.fs does CcuThunk.Create(ccuName, ccuData) with ccuName from GetResourceNameAndSignatureDataFuncs. fcs-fable used ilModule.ManifestOfAssembly.Name.

Pickled data refers to its own CCU by the name it was pickled under. Registered under the manifest name, that reference stays an unresolved thunk and any type reached through it raises UnresolvedPathReferenceNoRange while type-checking.

2. Assembly file name (LoadMod, LoadSigData, LoadOptData, GetCcuIL, GetCcuFS)

ccuData.FileName was ilModule.Name. There is no file system here - an assembly is known by the name handed to readAllBytes - so anything looking one up by path misses. Concretely, TryGetEntity's fallback into a precompiled assembly always returned None.

Effect

Referencing a fable precompile assembly from fable-standalone works. Before, it failed on any type that assembly defined.

Consumed by fable-compiler/Fable#4898, where ./build.sh test standalone is green (3076 tests).

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.

2 participants