Reduce qualified type and event names - #2674
leighmcculloch wants to merge 47 commits into
Conversation
65c31be to
69c41b9
Compare
5fb4d08 to
7f6dacd
Compare
6a79b08 to
8710d3f
Compare
727af47 to
22f59e5
Compare
| // A spec with a single struct whose name is fully qualified. | ||
| let entry = ScSpecEntry::UdtStructV0(ScSpecUdtStructV0 { | ||
| doc: StringM::default(), | ||
| lib: StringM::default(), | ||
| name: "mycrate::mymod::MyType".to_string().try_into().unwrap(), | ||
| fields: VecM::default(), | ||
| }); |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved moderate issues affect security, build-path consistency, test coverage, and diagnostic accuracy.
Review effort: Lite
Findings: 5
Open (6)
Prevent terminal injection through unsanitized reduction errors · New Add coverage for nested references, events, and collision disambiguation Sanitize rename values before including them in warnings Detect reductions for undefined UDT references Add build integration coverage for spec name reduction Collision warning should include event names
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Moderate issues remain in build coverage, artifact handling, reference reduction, warning accuracy, and diagnostic sanitization.
Review effort: Lite
Findings: 5
Open (6)
Prevent terminal injection through unsanitized reduction errors Add coverage for nested references, events, and collision disambiguation Sanitize rename values before including them in warnings Detect reductions for undefined UDT references Add build integration coverage for spec name reduction Collision warning should include event names
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Unresolved issues affect reference rewriting, container builds, output sanitization, and test coverage.
Review effort: Lite
Findings: 5
Open (6)
Prevent terminal injection through unsanitized reduction errors Add coverage for nested references, events, and collision disambiguation Sanitize rename values before including them in warnings Detect reductions for undefined UDT references Add build integration coverage for spec name reduction Collision warning should include event names
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Spec-derived warning text needs sanitization, accurate wording, and command-level integration coverage.
Review effort: Balanced
Findings: 5
Open (6)
Prevent terminal injection through unsanitized reduction errors Add coverage for nested references, events, and collision disambiguation Sanitize rename values before including them in warnings Detect reductions for undefined UDT references Add build integration coverage for spec name reduction Collision warning should include event names



Note
Part of a stack of PRs listed here:
What
Reduce the fully qualified UDT type names that stellar/rs-soroban-sdk#1970 emits (e.g.
my_contract::inner::State) down to short names during the build process.Why
The soroban-sdk will be emitting fully qualified user-defined type names as an intermediary step so that the stellar-cli can reduce the spec to only those types needed by the exported interface of a contract, and so that types will be guaranteed to have unique names. The long names are not good for most tooling though which is already accustomed to the short simple names. The cli can make this change in the soroban-sdk a no-op for the rest of the ecosystem by converting the names to unique simple names during the build step.