Fix assembly privacy checks and build provenance inputs#3091
Fix assembly privacy checks and build provenance inputs#3091huitseeker merged 4 commits intonextfrom
Conversation
54d7665 to
95f1fbe
Compare
All those seem fine to me. I think the main thing missing here is that we must reject the use of private type declarations in the signature of exported procedures, since it would cause dangling references in the final package in some cases (namely enum types). The type system is structural, not nominal, so most type aliases are transparent (i.e. a private type alias could appear in an exported signature and it wouldn't have an impact on the type signature encoded in the final package) - but for the purpose of binding generation in Rust/other languages, we will probably move towards preserving at least some names in the final artifact, so rejecting that as an edge case will make that doable without causing breakages at some point. |
815c53f to
431fd2a
Compare
|
@bitwalker Right on, I opened #3092. |
Al-Kindi-0
left a comment
There was a problem hiding this comment.
LGTM, modulo a couple of questions
There was a problem hiding this comment.
Q: What is the intention of this test ?
There was a problem hiding this comment.
The test checks that bundle --kernel can still produce a package when the bundled library has no exports. After the new privacy rule, the old fixture was invalid because its kernel called a private proc from lib_noexports. The new kernel_noexports.masm keeps the same test intent without relying on a private cross-module call.
ba39621 to
2d48398
Compare
2d48398 to
6865e9f
Compare
This closes #2945, closes #2712, and closes #2897.
Some assembly imports were resolved without checking whether the target item was public, and signature-only type uses were skipped by the import visitor. Build reuse also depended on manifest data that should not affect compiled output.
This PR:
Design decisions that could have gone another way: