moonrepo / proto

A pluggable multi-language version manager.
https://moonrepo.dev/proto
MIT License
677 stars 34 forks source link

proto activate zsh is slow, making shell startup time noticeably slower #563

Closed niieani closed 3 months ago

niieani commented 3 months ago

What version?

0.39.0

Which command?

proto activate zsh

What happened?

Adding eval "$(proto activate zsh)" into .zshrc makes the shell bootup noticeably slower.

As far as I understand, the function of proto activate zsh is to just print some commands that should be evaled by zsh. But for some reason, it takes ~200ms (sometimes even a few seconds!) to do this on my M1 MBP. Compare that to just running proto -V which also just prints some text, and only takes a few ms to run.

Screenshot 2024-07-25 at 18 42 02

A workaround was to just copy & paste the output of proto activate zsh into my .zshrc directly. This made zsh startup noticeably faster.

When I run --log trace it seems this command does a LOT of (unnecessary?) things in order to print that text, including Resolving 1.1.1.1:53 which seems to take the most time, and then loading a bunch of plugins.

Note that this seems different from #544.

Trace logs?

Trace ``` [DEBUG 2024-07-25 18:43:48.432] proto Running proto v0.39.0 bin="proto" args=["activate", "zsh", "--log", "trace"] pid=1078 [TRACE 18:43:48.432] starbase::app Running startup phase [DEBUG 18:43:48.432] proto_core::proto Creating proto environment, detecting store store="/Users/bbrzoska/.proto" [TRACE 18:43:48.432] starbase::app Running analyze phase [TRACE 18:43:48.432] proto_core::proto_config Traversing upwards and loading .prototools files [DEBUG 18:43:48.432] proto_core::proto_config Loading .prototools file="/Users/bbrzoska/.prototools" [TRACE 18:43:48.432] starbase_utils::fs Reading file file="/Users/bbrzoska/.prototools" [TRACE 18:43:48.432] schematic::config::loader Loading partial configuration config="ProtoConfig" [TRACE 18:43:48.432] schematic::config::loader Creating layer from source config="ProtoConfig" source="" [TRACE 18:43:48.432] schematic::config::loader Merging partial layers into a final result config="ProtoConfig" [DEBUG 18:43:48.432] proto_core::proto_config Loading .prototools file="/Users/bbrzoska/.proto/.prototools" [TRACE 18:43:48.432] starbase_utils::fs Opening file file="/Users/bbrzoska/.proto/.prototools" [TRACE 18:43:48.432] starbase_utils::fs_lock Locking file file="/Users/bbrzoska/.proto/.prototools" [TRACE 18:43:48.432] starbase_utils::fs_lock Unlocking file file="/Users/bbrzoska/.proto/.prototools" [TRACE 18:43:48.432] schematic::config::loader Loading partial configuration config="ProtoConfig" [TRACE 18:43:48.432] schematic::config::loader Creating layer from source config="ProtoConfig" source="" [TRACE 18:43:48.433] schematic::config::loader Merging partial layers into a final result config="ProtoConfig" [DEBUG 18:43:48.433] proto_core::proto_config Merging loaded configs [DEBUG 18:43:48.433] proto_core::proto_config Merged 2 configs [TRACE 18:43:48.433] starbase_utils::net Checking for an internet connection timeout=750 [TRACE 18:43:48.433] starbase_utils::net::offline Resolving 1.1.1.1:53 [TRACE 18:43:48.825] starbase_utils::net Online! [DEBUG 18:43:48.825] proto_core::proto_config Merging loaded configs without global [DEBUG 18:43:48.825] proto_core::proto_config Merged 1 configs [TRACE 18:43:48.825] starbase::app Running execute phase [DEBUG 18:43:48.825] proto_core::tool_loader Finding a configured plugin tool="internal-schema" [DEBUG 18:43:48.826] proto_core::tool_loader Using a built-in plugin plugin="https://github.com/moonrepo/tools/releases/download/schema_tool-v0.14.1/schema_tool.wasm" [TRACE 18:43:48.826] warpgate::loader Creating plugin loader cache_dir="/Users/bbrzoska/.proto/plugins" [TRACE 18:43:48.826] warpgate::loader Loading plugin internal-schema id="internal-schema" [TRACE 18:43:48.826] starbase_utils::fs Reading file file="/Users/bbrzoska/.proto/temp/.last-version-check" [TRACE 18:43:48.826] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/internal-schema-590d05f47477efb4d5062bd942036e93888e08d9fa658615d412884ed7c29162.wasm" [TRACE 18:43:48.827] warpgate::loader Plugin already downloaded and cached id="internal-schema" path="/Users/bbrzoska/.proto/plugins/internal-schema-590d05f47477efb4d5062bd942036e93888e08d9fa658615d412884ed7c29162.wasm" [TRACE 18:43:48.827] warpgate::loader Loading plugin yarn id="yarn" [TRACE 18:43:48.827] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/yarn-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.827] warpgate::loader Plugin already downloaded and cached id="yarn" path="/Users/bbrzoska/.proto/plugins/yarn-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [DEBUG 18:43:48.827] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/yarn-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.827] warpgate::plugin Storing plugin identifier id="yarn" [TRACE 18:43:48.827] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.827] proto_core::tool Creating tool yarn and instantiating plugin [TRACE 18:43:48.828] warpgate::loader Loading plugin node id="node" [TRACE 18:43:48.828] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/node-a15e0916dd4e51ceb9af2be427e6c9a05f126cf6ac695cd9253e66476c9f2db2.wasm" [TRACE 18:43:48.828] warpgate::loader Plugin already downloaded and cached id="node" path="/Users/bbrzoska/.proto/plugins/node-a15e0916dd4e51ceb9af2be427e6c9a05f126cf6ac695cd9253e66476c9f2db2.wasm" [TRACE 18:43:48.828] warpgate::loader Loading plugin go id="go" [TRACE 18:43:48.828] warpgate::loader Loading plugin deno id="deno" [TRACE 18:43:48.828] warpgate::loader Loading plugin npm id="npm" [TRACE 18:43:48.828] warpgate::loader Loading plugin pnpm id="pnpm" [TRACE 18:43:48.828] warpgate::loader Loading plugin python id="python" [TRACE 18:43:48.828] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/deno-ac7bfc51f3abcbac3ee11026b5dfcad231534edcab97692b79ef7afaa770cd41.wasm" [DEBUG 18:43:48.828] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/node-a15e0916dd4e51ceb9af2be427e6c9a05f126cf6ac695cd9253e66476c9f2db2.wasm" [TRACE 18:43:48.828] warpgate::loader Loading plugin bun id="bun" [TRACE 18:43:48.828] warpgate::loader Loading plugin rust id="rust" [TRACE 18:43:48.829] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/npm-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.828] warpgate::loader Loading plugin moon id="moon" [TRACE 18:43:48.828] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/go-f16779de56edb76267c5c0c6e3c3f999c2305b721253677e6093ae7c3a83dfc6.wasm" [TRACE 18:43:48.829] warpgate::loader Plugin already downloaded and cached id="deno" path="/Users/bbrzoska/.proto/plugins/deno-ac7bfc51f3abcbac3ee11026b5dfcad231534edcab97692b79ef7afaa770cd41.wasm" [TRACE 18:43:48.829] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/python-3212520a7999f9d026f796412c9d346baec148751d407c6bf62ee68aa7007802.wasm" [DEBUG 18:43:48.829] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/deno-ac7bfc51f3abcbac3ee11026b5dfcad231534edcab97692b79ef7afaa770cd41.wasm" [TRACE 18:43:48.829] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/moon-e22f6b95e7775965b02874eabde6e38e680dccc50a570ac1f51214b8c81d6d73.toml" [TRACE 18:43:48.829] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/bun-ed692bac71768824ee888b934290ce5523f8cdb75459eadb1da4352eaec6923d.wasm" [TRACE 18:43:48.829] warpgate::loader Plugin already downloaded and cached id="go" path="/Users/bbrzoska/.proto/plugins/go-f16779de56edb76267c5c0c6e3c3f999c2305b721253677e6093ae7c3a83dfc6.wasm" [TRACE 18:43:48.829] warpgate::loader Plugin already downloaded and cached id="python" path="/Users/bbrzoska/.proto/plugins/python-3212520a7999f9d026f796412c9d346baec148751d407c6bf62ee68aa7007802.wasm" [TRACE 18:43:48.829] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/pnpm-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.829] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/rust-3679fd7ea2ce3c163f9f127ca80a6b65f78b9b416a8b1ef0298b025e0ce14df4.wasm" [TRACE 18:43:48.829] warpgate::loader Plugin already downloaded and cached id="moon" path="/Users/bbrzoska/.proto/plugins/moon-e22f6b95e7775965b02874eabde6e38e680dccc50a570ac1f51214b8c81d6d73.toml" [DEBUG 18:43:48.829] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/go-f16779de56edb76267c5c0c6e3c3f999c2305b721253677e6093ae7c3a83dfc6.wasm" [DEBUG 18:43:48.830] proto_core::tool_loader Loading TOML plugin source="/Users/bbrzoska/.proto/plugins/moon-e22f6b95e7775965b02874eabde6e38e680dccc50a570ac1f51214b8c81d6d73.toml" [TRACE 18:43:48.830] warpgate::loader Plugin already downloaded and cached id="rust" path="/Users/bbrzoska/.proto/plugins/rust-3679fd7ea2ce3c163f9f127ca80a6b65f78b9b416a8b1ef0298b025e0ce14df4.wasm" [TRACE 18:43:48.830] warpgate::plugin Storing plugin identifier id="go" [DEBUG 18:43:48.829] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/python-3212520a7999f9d026f796412c9d346baec148751d407c6bf62ee68aa7007802.wasm" [TRACE 18:43:48.829] warpgate::plugin Storing plugin identifier id="deno" [TRACE 18:43:48.829] warpgate::plugin Storing plugin identifier id="node" [DEBUG 18:43:48.830] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/rust-3679fd7ea2ce3c163f9f127ca80a6b65f78b9b416a8b1ef0298b025e0ce14df4.wasm" [TRACE 18:43:48.829] warpgate::loader Plugin already downloaded and cached id="npm" path="/Users/bbrzoska/.proto/plugins/npm-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.829] warpgate::loader Plugin already downloaded and cached id="bun" path="/Users/bbrzoska/.proto/plugins/bun-ed692bac71768824ee888b934290ce5523f8cdb75459eadb1da4352eaec6923d.wasm" [DEBUG 18:43:48.830] proto_core::tool_loader Finding a configured plugin tool="internal-schema" [TRACE 18:43:48.830] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.830] proto_core::tool_loader Using a built-in plugin plugin="https://github.com/moonrepo/tools/releases/download/schema_tool-v0.14.1/schema_tool.wasm" [TRACE 18:43:48.829] warpgate::loader Plugin already downloaded and cached id="pnpm" path="/Users/bbrzoska/.proto/plugins/pnpm-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.830] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [TRACE 18:43:48.830] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.830] proto_core::tool Creating tool deno and instantiating plugin [DEBUG 18:43:48.830] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/bun-ed692bac71768824ee888b934290ce5523f8cdb75459eadb1da4352eaec6923d.wasm" [TRACE 18:43:48.830] warpgate::plugin Storing plugin identifier id="rust" [TRACE 18:43:48.830] warpgate::plugin Storing plugin identifier id="python" [DEBUG 18:43:48.830] proto_core::tool Creating tool go and instantiating plugin [TRACE 18:43:48.830] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.830] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/pnpm-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.830] warpgate::loader Loading plugin internal-schema id="internal-schema" [TRACE 18:43:48.830] warpgate::plugin Storing plugin identifier id="pnpm" [DEBUG 18:43:48.830] proto_core::tool_loader Loading WASM plugin source="/Users/bbrzoska/.proto/plugins/npm-558f534cf029706b348ea0e567b0b7c56954fa10867207c0f3f8814712b77f25.wasm" [TRACE 18:43:48.830] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.831] proto_core::tool Creating tool pnpm and instantiating plugin [TRACE 18:43:48.830] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [TRACE 18:43:48.831] warpgate::plugin Storing plugin identifier id="npm" [TRACE 18:43:48.831] starbase_utils::fs Reading file metadata file="/Users/bbrzoska/.proto/plugins/internal-schema-590d05f47477efb4d5062bd942036e93888e08d9fa658615d412884ed7c29162.wasm" [TRACE 18:43:48.831] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.831] proto_core::tool Creating tool python and instantiating plugin [TRACE 18:43:48.831] starbase_utils::json Formatting JSON [TRACE 18:43:48.830] starbase_utils::json Formatting JSON [TRACE 18:43:48.831] proto_core::tool_loader Storing proto tool configuration config={"shared-globals-dir":true} [TRACE 18:43:48.831] proto_core::tool_loader Storing proto tool configuration config={"bundled-npm":true} [TRACE 18:43:48.830] warpgate::plugin Storing plugin identifier id="bun" [DEBUG 18:43:48.830] proto_core::tool Creating tool rust and instantiating plugin [DEBUG 18:43:48.831] proto_core::tool Creating tool node and instantiating plugin [DEBUG 18:43:48.831] proto_core::tool Creating tool npm and instantiating plugin [TRACE 18:43:48.831] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.831] proto_core::tool Creating tool bun and instantiating plugin [TRACE 18:43:48.831] warpgate::loader Plugin already downloaded and cached id="internal-schema" path="/Users/bbrzoska/.proto/plugins/internal-schema-590d05f47477efb4d5062bd942036e93888e08d9fa658615d412884ed7c29162.wasm" [TRACE 18:43:48.832] starbase_utils::fs Reading file file="/Users/bbrzoska/.proto/plugins/moon-e22f6b95e7775965b02874eabde6e38e680dccc50a570ac1f51214b8c81d6d73.toml" [TRACE 18:43:48.832] starbase_utils::toml Reading TOML file file="/Users/bbrzoska/.proto/plugins/moon-e22f6b95e7775965b02874eabde6e38e680dccc50a570ac1f51214b8c81d6d73.toml" [TRACE 18:43:48.832] starbase_utils::json Formatting JSON [TRACE 18:43:48.832] proto_core::tool_loader Storing schema settings schema={"name":"moon","type":"cli","platform":{"linux":{"download-file":"moon-{arch}-unknown-linux-{libc}"},"macos":{"download-file":"moon-{arch}-apple-darwin"},"windows":{"download-file":"moon-{arch}-pc-windows-msvc.exe"}},"install":{"download-url":"https://github.com/moonrepo/moon/releases/download/v{version}/{download_file}","download-url-canary":"https://github.com/moonrepo/moon/releases/download/canary/{download_file}"},"resolve":{"git-url":"https://github.com/moonrepo/moon"},"metadata":{"self-upgrade-commands":["upgrade"]}} [TRACE 18:43:48.832] warpgate::plugin Storing plugin identifier id="moon" [TRACE 18:43:48.832] warpgate::plugin Storing host environment env={"arch":"arm64","libc":"gnu","os":"macos","home_dir":{"path":"/userhome/","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"}} [DEBUG 18:43:48.833] proto_core::tool Creating tool moon and instantiating plugin [TRACE 18:43:48.846] warpgate::plugin Created plugin container id="deno" plugin="d3344d72-352d-441e-919b-46a10443d6c9" [DEBUG 18:43:48.846] proto_core::tool Created tool deno and its WASM runtime [TRACE 18:43:48.846] warpgate::plugin Calling plugin function register_tool id="deno" plugin="d3344d72-352d-441e-919b-46a10443d6c9" input={"id":"deno"} [TRACE 18:43:48.846] warpgate::plugin Called plugin function register_tool id="deno" plugin="d3344d72-352d-441e-919b-46a10443d6c9" output={"inventory":{},"name":"Deno","plugin_version":"0.11.3","self_upgrade_commands":["upgrade"],"type":"Language"} [DEBUG 18:43:48.846] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/deno/manifest.json" [TRACE 18:43:48.847] starbase_utils::fs Opening file file="/Users/bbrzoska/.proto/tools/deno/manifest.json" [TRACE 18:43:48.847] starbase_utils::fs_lock Locking file file="/Users/bbrzoska/.proto/tools/deno/manifest.json" [TRACE 18:43:48.847] starbase_utils::fs_lock Unlocking file file="/Users/bbrzoska/.proto/tools/deno/manifest.json" [TRACE 18:43:48.848] warpgate::plugin Created plugin container id="bun" plugin="eb6c7db6-7474-4853-9ddd-4aea7bb33e60" [DEBUG 18:43:48.848] proto_core::tool Created tool bun and its WASM runtime [TRACE 18:43:48.848] warpgate::plugin Calling plugin function register_tool id="bun" plugin="eb6c7db6-7474-4853-9ddd-4aea7bb33e60" input={"id":"bun"} [TRACE 18:43:48.849] warpgate::plugin Called plugin function register_tool id="bun" plugin="eb6c7db6-7474-4853-9ddd-4aea7bb33e60" output={"inventory":{},"name":"Bun","plugin_version":"0.12.3","self_upgrade_commands":["upgrade"],"type":"Language"} [DEBUG 18:43:48.849] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/bun/manifest.json" [TRACE 18:43:48.849] warpgate::plugin Created plugin container id="python" plugin="ac6e101c-6863-4a7c-9b31-fede82058d99" [DEBUG 18:43:48.849] proto_core::tool Created tool python and its WASM runtime [TRACE 18:43:48.849] warpgate::plugin Calling plugin function register_tool id="python" plugin="ac6e101c-6863-4a7c-9b31-fede82058d99" input={"id":"python"} [TRACE 18:43:48.849] warpgate::plugin Called plugin function register_tool id="python" plugin="ac6e101c-6863-4a7c-9b31-fede82058d99" output={"inventory":{},"name":"Python","plugin_version":"0.10.5","type":"Language"} [DEBUG 18:43:48.849] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/python/manifest.json" [TRACE 18:43:48.861] warpgate::plugin Created plugin container id="go" plugin="98c3bf38-6b70-41b4-a0b9-339640015874" [DEBUG 18:43:48.861] proto_core::tool Created tool go and its WASM runtime [TRACE 18:43:48.861] warpgate::plugin Calling plugin function register_tool id="go" plugin="98c3bf38-6b70-41b4-a0b9-339640015874" input={"id":"go"} [TRACE 18:43:48.861] warpgate::plugin Called plugin function register_tool id="go" plugin="98c3bf38-6b70-41b4-a0b9-339640015874" output={"inventory":{},"name":"Go","plugin_version":"0.12.0","type":"Language"} [DEBUG 18:43:48.861] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/go/manifest.json" [TRACE 18:43:48.867] warpgate::plugin Created plugin container id="yarn" plugin="cf2acc60-f3a2-4cb6-abe2-6bfab4854ed3" [DEBUG 18:43:48.867] proto_core::tool Created tool yarn and its WASM runtime [TRACE 18:43:48.867] warpgate::plugin Calling plugin function register_tool id="yarn" plugin="cf2acc60-f3a2-4cb6-abe2-6bfab4854ed3" input={"id":"yarn"} [TRACE 18:43:48.868] warpgate::plugin Called plugin function register_tool id="yarn" plugin="cf2acc60-f3a2-4cb6-abe2-6bfab4854ed3" output={"inventory":{},"name":"yarn","plugin_version":"0.12.0","type":"DependencyManager"} [DEBUG 18:43:48.868] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/yarn/manifest.json" [TRACE 18:43:48.868] starbase_utils::fs Opening file file="/Users/bbrzoska/.proto/tools/yarn/manifest.json" [TRACE 18:43:48.868] starbase_utils::fs_lock Locking file file="/Users/bbrzoska/.proto/tools/yarn/manifest.json" [TRACE 18:43:48.868] starbase_utils::fs_lock Unlocking file file="/Users/bbrzoska/.proto/tools/yarn/manifest.json" [TRACE 18:43:48.875] warpgate::plugin Created plugin container id="node" plugin="5e21cdea-0f47-4a65-80d6-7e86205f7fed" [DEBUG 18:43:48.875] proto_core::tool Created tool node and its WASM runtime [TRACE 18:43:48.875] warpgate::plugin Created plugin container id="moon" plugin="77ae4f9c-fa2c-4602-b047-1443b5f3f11f" [TRACE 18:43:48.875] warpgate::plugin Calling plugin function register_tool id="node" plugin="5e21cdea-0f47-4a65-80d6-7e86205f7fed" input={"id":"node"} [DEBUG 18:43:48.875] proto_core::tool Created tool moon and its WASM runtime [TRACE 18:43:48.875] warpgate::plugin Calling plugin function register_tool id="moon" plugin="77ae4f9c-fa2c-4602-b047-1443b5f3f11f" input={"id":"moon"} [TRACE 18:43:48.875] warpgate::plugin Called plugin function register_tool id="node" plugin="5e21cdea-0f47-4a65-80d6-7e86205f7fed" output={"inventory":{},"name":"Node.js","plugin_version":"0.11.6","type":"Language"} [DEBUG 18:43:48.875] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/node/manifest.json" [TRACE 18:43:48.875] starbase_utils::fs Opening file file="/Users/bbrzoska/.proto/tools/node/manifest.json" [TRACE 18:43:48.875] starbase_utils::fs_lock Locking file file="/Users/bbrzoska/.proto/tools/node/manifest.json" [TRACE 18:43:48.875] starbase_utils::fs_lock Unlocking file file="/Users/bbrzoska/.proto/tools/node/manifest.json" [TRACE 18:43:48.875] warpgate::plugin Called plugin function register_tool id="moon" plugin="77ae4f9c-fa2c-4602-b047-1443b5f3f11f" output={"inventory":{},"name":"moon","plugin_version":"0.14.1","self_upgrade_commands":["upgrade"],"type":"CLI"} [DEBUG 18:43:48.875] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/moon/manifest.json" [TRACE 18:43:48.876] warpgate::plugin Created plugin container id="rust" plugin="74706b27-f871-41ef-b701-37130c093cba" [DEBUG 18:43:48.876] proto_core::tool Created tool rust and its WASM runtime [TRACE 18:43:48.876] warpgate::plugin Calling plugin function register_tool id="rust" plugin="74706b27-f871-41ef-b701-37130c093cba" input={"id":"rust"} [TRACE 18:43:48.876] warpgate::plugin Created plugin container id="pnpm" plugin="a4956ebe-d96e-4cd9-acb7-3b357bde244c" [DEBUG 18:43:48.876] proto_core::tool Created tool pnpm and its WASM runtime [TRACE 18:43:48.876] warpgate::plugin Created plugin container id="npm" plugin="e92fc3ad-ea2c-42e2-b013-3f28c638f613" [TRACE 18:43:48.876] warpgate::host_funcs Read environment variable from host name="RUSTUP_HOME" value="" [TRACE 18:43:48.876] warpgate::plugin Calling plugin function register_tool id="pnpm" plugin="a4956ebe-d96e-4cd9-acb7-3b357bde244c" input={"id":"pnpm"} [DEBUG 18:43:48.876] proto_core::tool Created tool npm and its WASM runtime [TRACE 18:43:48.876] warpgate::plugin Called plugin function register_tool id="rust" plugin="74706b27-f871-41ef-b701-37130c093cba" output={"default_version":"stable","inventory":{"disable_progress_bars":true,"override_dir":{"path":"/userhome/.rustup/toolchains","virtual_prefix":"/userhome","real_prefix":"/Users/bbrzoska"},"version_suffix":"-aarch64-apple-darwin"},"name":"Rust","plugin_version":"0.10.6","type":"Language"} [TRACE 18:43:48.876] warpgate::plugin Calling plugin function register_tool id="npm" plugin="e92fc3ad-ea2c-42e2-b013-3f28c638f613" input={"id":"npm"} [DEBUG 18:43:48.876] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/rust/manifest.json" [DEBUG 18:43:48.876] proto_core::tool Attempting to override inventory directory tool="rust" override_virtual=WithReal { path: "/userhome/.rustup/toolchains", virtual_prefix: "/userhome", real_prefix: "/Users/bbrzoska" } override_real=Some("/Users/bbrzoska/.rustup/toolchains") [TRACE 18:43:48.876] warpgate::plugin Called plugin function register_tool id="pnpm" plugin="a4956ebe-d96e-4cd9-acb7-3b357bde244c" output={"inventory":{},"name":"pnpm","plugin_version":"0.12.0","type":"DependencyManager"} [DEBUG 18:43:48.876] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/pnpm/manifest.json" [TRACE 18:43:48.876] starbase_utils::fs Opening file file="/Users/bbrzoska/.proto/tools/pnpm/manifest.json" [TRACE 18:43:48.876] starbase_utils::fs_lock Locking file file="/Users/bbrzoska/.proto/tools/pnpm/manifest.json" [TRACE 18:43:48.876] starbase_utils::fs_lock Unlocking file file="/Users/bbrzoska/.proto/tools/pnpm/manifest.json" [TRACE 18:43:48.876] warpgate::plugin Called plugin function register_tool id="npm" plugin="e92fc3ad-ea2c-42e2-b013-3f28c638f613" output={"default_version":"bundled","inventory":{},"name":"npm","plugin_version":"0.12.0","type":"DependencyManager"} [DEBUG 18:43:48.876] proto_core::tool_manifest Loading manifest.json file="/Users/bbrzoska/.proto/tools/npm/manifest.json" [TRACE 18:43:48.876] starbase_utils::fs Opening file file="/Users/bbrzoska/.proto/tools/npm/manifest.json" [TRACE 18:43:48.876] starbase_utils::fs_lock Locking file file="/Users/bbrzoska/.proto/tools/npm/manifest.json" [TRACE 18:43:48.876] starbase_utils::fs_lock Unlocking file file="/Users/bbrzoska/.proto/tools/npm/manifest.json" export __ORIG_PATH="$PATH" _proto_hook() { trap '' SIGINT output=$(proto activate zsh --export) if [ -n "$output" ]; then eval "$output"; fi trap - SIGINT } typeset -ag chpwd_functions if (( ! ${chpwd_functions[(I)_proto_hook]} )); then chpwd_functions=(_proto_hook $chpwd_functions) fi [TRACE 18:43:48.994] starbase::app Running shutdown phase ```

Operating system?

MacOS

Architecture?

arm64

milesj commented 3 months ago

This was on my list of things to fix and I forgot to do it for this release 😅

Let me patch it real quick.

milesj commented 3 months ago

Ok try 0.39.1

niieani commented 3 months ago

thanks @milesj, it's no longer loading plugins and down to ~20ms if it's been run recently. Sometimes it takes much longer though, hard to reproduce.

And it's still trying to resolve 1.1.1.1:53:

[TRACE 13:38:24.286] starbase_utils::net  Checking for an internet connection  timeout=750
[TRACE 13:38:24.286] starbase_utils::net::offline  Resolving 1.1.1.1:53
[TRACE 13:38:24.291] starbase_utils::net  Online!
[TRACE 13:38:24.291] starbase_utils::fs  Reading file  file="/Users/bbrzoska/.proto/temp/.last-version-check"
[TRACE 13:38:24.291] starbase::app  Running shutdown phase

Maybe it shouldn't be running last version check or anything networking related for that particular command (since it'll never be run in an interactive TTY anyway)?

milesj commented 3 months ago

Yeah I think that's the version check request. Let me look into disabling it for activate.

milesj commented 3 months ago

Fixed in 0.39.2