You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(pack): centralize root path configuration for worktrees - #3426
Add UTOO_ROOT_PATH so worktrees can access shared node_modules and linked dependencies outside the project. It overrides explicit rootPath and automatic detection; relative values resolve from the process working directory and empty values are ignored.
Use one resolver for build, serve, and direct project creation. Preserve the public ProjectOptions.rootPath: string type while allowing creation callers to omit it. Config-only updates retain the current root.
Keep findRootDir() independent of the override so framework plugin lookup and generated file locations stay stable, including Smallfish Less plugins/.sml and Umi's explicit utoopack.root.
UTOO_ROOT_PATH=/path/to/common-parent smallfish dev
UTOO_ROOT_PATH=.. utx up dev
Built @utoo/pack-shared, pack CJS/ESM, and @utoo/pack-cli; formatting and spelling checks passed.
Umi 4.7.26: real build/dev with env unset/set, explicit root, symlink dependency, HTTP 200, and Chrome rendering.
Smallfish 2.96.20 CLI with React 18: production build and dev/HTTP/Chrome rendering passed with env unset/set, including default PostCSS processing.
Smallfish 2.96.19 adapter: real build/dev with env unset/set, multiple entries, Less plugin, HTTP 200, and Chrome rendering; plugin and .sml locations stayed unchanged.
An external symlink fails at the default filesystem boundary and builds successfully with a common parent override.
Framework smoke tests use this PR's JavaScript and existing native binaries. Full Smallfish CLI validation uses the packed candidate with its declared runtime dependencies installed in an isolated directory under the consuming project.
Shows when each build phase is active and how much CPU it consumes. Self-Time is the time spent exclusively in that phase (excluding children).
Phase
Spans
Inclusive (ms)
Self-Time (ms)
Wall Range (ms)
Resolve
38,350
4,865.3
1,309.2
2,448.2
Parse
8,128
1,030.4
766.2
4,629.6
Analyze
122,295
32,418.6
6,827.7
4,568.2
Chunk
4,773
4,628.4
763.1
1,929.1
Codegen
8,902
1,747.0
1,120.6
1,658.2
Emit
29
37.1
18.6
8.2
Other
2,033
7,208.0
4,407.1
5,475.3
Workload Distribution by Diagnostic Tier
Category
Spans
Inclusive (ms)
% Work
Self-Time (ms)
% Self
P0: Scheduling & Resolution
160,807
37,701.5
225.2%
8,325.7
49.7%
P1: I/O & Heavy Tasks
2,745
91.8
0.5%
73.3
0.4%
P2: Architecture (Locks/Memory)
0
0.0
0.0%
0.0
0.0%
P3: Asset Pipeline
20,216
7,407.7
44.3%
2,642.2
15.8%
P4: Bridge/Interop
0
0.0
0.0%
0.0
0.0%
Other
742
6,733.8
40.2%
4,171.2
24.9%
Top 20 Tasks by Self-Time
Self-time is the exclusive duration: time spent in the task itself, not in sub-tasks.
This is the most accurate indicator of where CPU cycles are actually spent.
Self (ms)
Inclusive (ms)
Count
Avg Self (us)
P95 Self (ms)
Max Self (ms)
% Work
Task Name
Top Caller
3,402.0
19,381.5
82,566
41.2
0.1
8.9
20.3%
module
module (60%)
3,066.7
3,333.6
16
191666.7
381.1
636.6
18.3%
save snapshot
persist (6%)
1,654.1
1,736.4
2,225
743.4
2.2
161.4
9.9%
analyze ecmascript module
module (79%)
1,131.2
10,461.9
29,783
38.0
0.0
5.5
6.8%
process module
process module (80%)
881.0
2,358.8
20,769
42.4
0.1
7.3
5.3%
internal resolving
internal resolving (71%)
717.2
981.4
5,959
120.4
0.5
28.4
4.3%
parse ecmascript
parse ecmascript (66%)
621.8
4,401.3
3,820
162.8
0.1
133.2
3.7%
chunking
chunking (61%)
618.4
670.5
6,837
90.5
0.4
7.0
3.7%
precompute code generation
generate merged code (53%)
563.4
680.9
5,672
99.3
0.3
115.1
3.4%
compute async module info
compute async module info (51%)
519.3
1,669.3
510
1018.3
2.3
213.8
3.1%
generate merged code
chunking (81%)
422.4
2,500.7
17,034
24.8
0.0
4.7
2.5%
resolving
module (64%)
349.5
349.5
329
1062.3
0.8
213.3
2.1%
generate source map
code generation (83%)
293.5
621.8
132
2223.8
3.7
179.3
1.8%
emit code
generate merged code (40%)
269.9
269.9
9
29992.3
138.8
170.1
1.6%
blocking
save snapshot (56%)
227.7
411.2
930
244.8
0.1
135.7
1.4%
write all entrypoints to disk
write all entrypoints to disk (8%)
152.6
727.0
1,736
87.9
0.2
34.6
0.9%
code generation
code generation (82%)
139.1
224.4
919
151.3
0.4
22.6
0.8%
compute async chunks
compute async chunks (52%)
49.0
49.0
2,167
22.6
0.0
1.7
0.3%
read file
parse ecmascript (91%)
41.3
50.8
582
70.9
0.0
24.4
0.2%
compute binding usage info
compute binding usage info (59%)
25.3
49.2
1,450
17.4
0.0
9.5
0.2%
collect mergeable modules
collect mergeable modules (100%)
Critical Path Analysis
The longest sequential dependency chains that determine wall-clock time.
Focus on reducing the depth of these chains to improve parallelism.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
UTOO_ROOT_PATHso worktrees can access sharednode_modulesand linked dependencies outside the project. It overrides explicitrootPathand automatic detection; relative values resolve from the process working directory and empty values are ignored.Use one resolver for
build,serve, and direct project creation. Preserve the publicProjectOptions.rootPath: stringtype while allowing creation callers to omit it. Config-only updates retain the current root.Keep
findRootDir()independent of the override so framework plugin lookup and generated file locations stay stable, including Smallfish Less plugins/.smland Umi's explicitutoopack.root.Test Plan
@utoo/pack-shared, pack CJS/ESM, and@utoo/pack-cli; formatting and spelling checks passed..smllocations stayed unchanged.Framework smoke tests use this PR's JavaScript and existing native binaries. Full Smallfish CLI validation uses the packed candidate with its declared runtime dependencies installed in an isolated directory under the consuming project.