Merge pull request #8694 from roc-lang/fix-8693

Use `exports` (not `all_defs`) to only include exported platform definitions as entrypoints
This commit is contained in:
Luke Boswell 2025-12-17 09:40:35 +11:00 committed by GitHub
commit e0360be969
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2647,8 +2647,10 @@ fn compileAndSerializeModulesForEmbedding(
}
// Get entry points from primary environment
// Use exports (not all_defs) to only include exported definitions as entry points.
// all_defs includes method definitions from associated blocks which should not be entry points.
const primary_env = &compiled_modules.items[primary_env_index].env;
const entry_defs = primary_env.all_defs;
const entry_defs = primary_env.exports;
const entry_count: u32 = entry_defs.span.len;
// Build entry def indices - use sliceDefs to get actual Def.Idx values