feat(pack): support externalType: promise#2857
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for "promise" type externals across the core Rust logic, configuration schemas, and TypeScript compatibility layers. Key changes include adding the "promise" variant to external type enums, updating resolution logic to handle the "promise" prefix, and implementing a new snapshot test. Feedback suggests using the matches! macro in tests for better conciseness and refactoring duplicated logic in the Webpack compatibility module to improve maintainability.
📊 Performance Benchmark Report (with-antd)Utoopack Performance ReportReport ID: Executive Summary
Build Phase TimelineShows when each build phase is active and how much CPU it consumes.
Workload Distribution by Diagnostic Tier
Top 20 Tasks by Self-TimeSelf-time is the exclusive duration: time spent in the task itself, not in sub-tasks.
Critical Path AnalysisThe longest sequential dependency chains that determine wall-clock time.
Batching CandidatesHigh-volume tasks dominated by a single parent. If the parent can batch them,
Duration Distribution
Action Items
Report generated by Utoopack Performance Analysis Agent |
Resolves overlap with merged upstream PRs: - #2856 rustls + aws-lc-rs (gated to macOS only, prevents Linux regression) - #2862 single-flight manifest fetches via OnceMap (full Result-aware variant) - #2824 pm-e2e-bench unified workflow + phase-isolated bench infrastructure - #2858 mdx option, #2857 externalType: promise, #2829 sync next.js Resolution choices: - Cargo.toml: keep next's macOS-only aws-lc-rs gating (validated by #2856 to avoid Linux/x86_64 CI regression). Add crossbeam-queue for the worker-pool SegQueue. Keep rt-multi-thread test feature for worker-pool tests. - util/oncemap.rs + util/mod.rs: take next's superset (adds get_or_try_init, Debug impl, refined failure semantics). - service/* + model/manifest.rs + traits/registry.rs: keep PR's worker-pool API surface — its preload.rs depends on these shapes for the FuturesUnordered -> worker-pool migration. - Drop redundant `use utoo_ruborist::util::oncemap::OnceMap;` lines in pm/util/{cloner,downloader}.rs after import-path consolidation. cargo clippy --all-targets -- -D warnings clean for utoo-pm + utoo-ruborist cargo test passes: 245 pm + 167 ruborist + 10 doctests
Summary
ref: utooland/next.js#142
For business support:
Test Plan
add snapshot test.