Coder Social home page Coder Social logo

moonrepo / proto Goto Github PK

View Code? Open in Web Editor NEW
458.0 3.0 17.0 2.87 MB

A pluggable multi-language version manager.

Home Page: https://moonrepo.dev/proto

License: MIT License

Rust 99.69% Just 0.24% JavaScript 0.08%
toolchain toolchain-manager version-manager nodejs deno bun golang

proto's People

Contributors

bhelx avatar frantic1048 avatar hayes avatar ignisda avatar imbios avatar milesj avatar mmiszy avatar rotu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

proto's Issues

Install bundled version of npm

Hi team, thanks for creating this amazing tool with support for .nvmrc and .node-version!

I have a feature request: nvm installs the version of npm that comes bundled with the specific version of Node that you're using. Volta allows you to install the bundled npm version with volta install npm@bundled. I'd love to see proto provide something similar.

New Language: python

Hi there,

one language, that would be extremely nice to have in proton is python!
Especially seeing the problems around python 2 and python 3.
Maybe you can integrate pyenv internally or something like this, like with rust.
Or you decide, that it would be worth it to have direct python support,
even though I'm imagining that this might be hard to do.

`engines` handling is too strict?

I have Node 16.14.2 and npm 8.5.0 installed, I would expect this to work with engines configured like so:

{
    ...
    "engines": {
        "node": ">=16.13.0",
        "npm": ">=8.1.0"
    }
}

Instead I get an error when invoking either node or npm:

Attempted to run npm v8.1, but this version has not been installed. Install it with `proto install npm 8.1`!

Using ^ or ~ instead of >= gives the same result.

This is in a project with no other versioning files. I'm using the latest version of proto at the time of writing (0.2.1.)

No way to manage global node binaries

I used to manage my global npm packages with pnpm. This let me check for outdated versions and launch an interactive upgrade tool to select which ones should be upgraded.

In the last couple of versions of proto I have received an error when trying to add new global packages.

pnpm add --global some-package-from-npm

Error: proto::misc

  × Global binaries must be installed with proto install-global pnpm and ~/.proto/tools/node/
  │ globals/bin should be added to your PATH!
  │ Learn more: https://moonrepo.dev/docs/proto/faq#how-can-i-install-a-global-binary-for-a-language

Reading up on this in the linked FAQ it says the following

The exception to this is Node.js (and npm, pnpm, yarn). Each of these tools install global packages differently, and they're also tied to the parent tools version. So if you install a new language version, you lose your global packages. We suggest using proto install-global for all Node.js packages, which installs everything to a shared location, ~/.proto/tools/node/globals/bin.

I think there are a few issues with this:

  1. The statement in the FAQ does not seem to be true. I've managed my dependencies with pnpm add --global for a long time and have upgraded both node and pnpm without losing any global packages.
  2. The install-global command just can't replace the built in ones for a few reason.
    a. There is no uninstall-global command
    b. There's no way to see if any of the global packages have new versions
    c. There's no way to upgrade outdated global packages (except for blindly running proto install-global again I assume)

With these limitations in mind, to me as a user it feels a bit like a hostile takeover to block me from using my package manager to manage my global dependencies as that approach worked perfectly fine for me.

Is there any way that proto could do any of the following?

  • Revert the block of managing global deps with package managers (or at least let me opt out with an env var or something)
  • Build out the feature set for protos management of global deps to match those of npm/yarn/pnpm

Add support for Stripe

Stripe is a very popular payment provider, is adopted by many orgs and projects alike therefore having integration with the Stripe CLI would aid DX for many developers.

Allow installing multiple global binaries

It is very tedious to write:

proto install-global node wrangler && proto install-global node typescript-language-server && proto install-global node vscode-langservers-extracted

Would be really nice if that could be condensed to:

proto install-global node wrangler typescript-language-server vscode-langservers-extracted

Install script runs into 404 when trying to specify version

I bumped into this issue, so wanted to downgrade to an earlier version. I used this command curl -fsSL https://moonrepo.dev/install/proto.sh | bash -s -- v0.10.6, but it gives a 404.

Looking at the install script and comparing it to the URLs on the releases page, it seems like you need to change all cases of $target like this, i.e. remove the $version_part variable.

- "Darwin arm64") target="proto_cli$version_part-aarch64-apple-darwin" ;;
+ "Darwin arm64") target="proto_cli-aarch64-apple-darwin" ;;

proto direction: lanaguages or any tool?

Docs appear proto will install languages and their respective package managers, but #15 and #16 are for individual cli tools and the proto cli is quite similar to asdf's.

Will proto be analogs of the likes of asdf and brew or more along the lines of nvm, rvm and what not?

Swift language

Add support for the Swift language, this is usually a very challenging / lengthy process to setup on non Mac devices, so proto automating it would save alot of dev time.

command not found: vite

my step:
1.install proto
2. proto install nodejs
3. npm install vite
4. vite -h
any npm ci package have bug

so,I do:
npm config get prefix
/Users/luz/.proto/tools/node/18.16.0

add "/Users/luz/.proto/tools/node/18.16.0/bin" to .zshrc

but it not best way, so fix it

install should add a newline after adding executable to PATH

proto adds the following to your profile/zshrc

# proto
export PROTO_ROOT="$HOME/.proto"
export PATH="$PROTO_ROOT/bin:$PATH"

but it doesn't add a trailing newline. The can cause issues when other tools don't add prepend a newline before they make their own changes.

Defining the local version outside of the cwd

It would be great to be able to explicitly define local versions of tools without having to have a config file in the local directory.

My specific use case:

  • I am the only one using proto, so I don't want to add a proto specific config file
  • I need to run specific versions of tools, but can't make the engines config specific
    • eg we have node set to >=18 and I need to run certain thing with node 18, but have 20 installed as well, which results in proto automatically using node 20

I could add the proto config file to .gitignore, but I'd rather have a way to define this via a config file stored in my home directory or something

Add support for Rust

Rust needs no introduction, and a lot of stacks use Rust in production, so adding Rust should be a priority in my opinion

RFC: Plugin system

For proto to become the best toolchain manager in the ecosystem, it needs to support plugins. Plugins will allow consumers to implement custom languages (no need for it to be in proto itself), possibly implement non-language tools (like CLI binaries), hook into life-cycles, and more.

Enabling a plugin

Plugins can be enabled on a per-directory basis through the .prototools configuration file. This allows companies and projects to pin the plugins required for their repository to function correctly.

Plugins can also be enabled in ~/.proto/config.toml for the current user.

Since both of these configuration files are TOML, the plugins will be defined in a [plugins] table, which requires a mapping of tool name to plugin locator. A plugin locator is a string that combines a unique protocol to a location in which to fetch the plugin.

[plugins]
kotlin = "protocol:location"

The following protocols are supported:

schema: protocol

The schema: protocol defines the location of a TOML plugin schema. The location can be a file path (relative from the parent config), or an https URL.

[plugins]
# By path
kotlin = "schema:../../tools/kotlin.toml"
# By url
kotlin = "schema:https://raw.githubusercontent.com/kotlin/kotlin/master/proto-schema.toml"
# By url using a specific version
kotlin = "schema:https://raw.githubusercontent.com/kotlin/kotlin/9ec2503ce3324d637065f8f657b6efea0bbb81b7/proto-schema.toml"

source: protocol

The source: protocol defines the location of the compiled WASM plugin file. The location can be a file path (relative from the parent config), or an https URL.

[plugins]
# By path
kotlin = "source:../../tools/kotlin.wasm"
# By url
kotlin = "source:https://github.com/kotlin/kotlin/releases/latest/download/proto-plugin.wasm"
# By url using a specific version
kotlin = "source:https://github.com/kotlin/kotlin/releases/download/v0.5.0/proto-plugin.wasm"

github: protocol

The github: protocol defines the GitHub repository to download the WASM plugin file from. This protocol requires that the WASM file is added as an asset to each release, using a specific naming scheme.

[plugins]
# Default to latest
kotlin = "github:kotlin/kotlin"
# Using a specific version
kotlin = "github:kotlin/[email protected]"

Implementing a plugin

Because proto is written in Rust, supporting a runtime based plugin system is difficult. The only native solution to this problem is WASM plugins, which have the following concerns:

  • Tooling to compile and build the WASM plugins must be stable.
  • Plugins should be able to be written in any language that supports WASM, not just Rust.
  • WASM is a foreign/unknown concept to many. Will most likely have a learning curve.

To mitigate these concerns and to ease the plugin implementation process, we’ll actually be supporting 2 types of plugins. The standard WASM plugin, and a TOML configuration schema plugin.

Configuration schema plugin

The schema plugin is a TOML file that defines all the necessary information for downloading, installing, and executing a tool. Since this is a configuration file, and all settings are defined literally, it only provides the bare minimum of functionality, and only supports pre-built tools and not build from source.

If more advanced functionality is required, then a WASM plugin will need to be used instead.

Here’s an example of what this schema may look like, using Node.js:

# PROOF OF CONCEPT, NOT FINAL!
name = "Node.js"
bin-name = "node"

[platform.os]
linux = "linux"
macos = "darwin"
windows = "win"

[platform.arch]
arm = "armv7l"
aarch64 = "arm64"
x86_64 = "x64"
x86 = "x86"

[resolve]
versions-url = "https://nodejs.org/dist/index.json"
version-selector = ".version"

[install]
archive-prefix = "node-v{version}-{os}-{arch}"
download-url = "https://nodejs.org/dist/v{version}/node-v{version}-{os}-{arch}{ext}"
checksum-url = "https://nodejs.org/dist/v{version}/SHASUMS256.txt"

[install.ext]
linux = ".tar.xz"
macos = ".zip"
windows = ".tar.xz"

[detect]
version-files = [".nvmrc", ".node-version"]

[execute.bin-path]
linux = "bin/node"
macos = "bin/node"
windows = "node.exe"

[commands]
install-global = "npm install -g {dependency}"

WASM plugin

For WASM plugins, we’ll be using Extism, a universal plugin system for multiple languages. On the host side (proto), we import the .wasm plugin file and execute functions provided by the plugin. On the guest side (the plugin), plugins can be written in multiple languages, like Rust, JavaScript, and Go, all of which define and export functions that compile to .wasm.

An example of what this may look like in Rust:

use extism_pdk::*;
use serde::Deserialize;
use std::env::consts;

#[derive(Deserialize)]
struct DownloadParams {
  version: String,
}

#[plugin_fn]
pub fn get_download_url(input: String) -> String {
	let params: DownloadParams = serde_json::from_str(&input).unwrap();

	format!(
		"https://nodejs.org/dist/v{version}/node-v{version}-{os}-{arch}{ext}", 
		version = params.version, 
		os = consts::OS,
		arch = consts::ARCH,
		ext = ".tar.xz"
	)
}

And again in JavaScript (not tested):

export function get_download_url() {
	const params = JSON.parse(Host.inputString());

	Host.outputString(
		`https://nodejs.org/dist/v${params.version}/node-v${params.version}-${process.platform}-${process.arch}.tar.xz`
	);
}

Extism is a good choice for the following reasons:

  • It provides libraries/SDKs for both plugin authors and for plugin loader (proto).
  • It supports multiple languages and doesn’t lock authors into Rust.
  • We’re not reinventing the wheel.
  • It’s maintained by a company and supports a community.
  • Supports async functions.

Automatic Installation

Coming from other tools, they would (with some exceptions) automatically install the appropriate runtime if a shim was referenced and the appropriate versions were correct. This is super helpful especially when the runtime version changes reasonably frequently due to maintenance automation bots like Renovate/Dependabot.

Don't know if a good default would be on-by-default or not, but would love to have the option!

Inject `GOBIN` into the user's shell

If a users starts using go via proto without running the official go installer, the GOBIN env var will not be set. We should inject this automatically into the user's shell.

Parsing engine version from `package.json`

When I'm trying to install tools by using proto use I get a following error message:

Error: proto::version::invalid

  × Invalid version >=8.0.0 <10.0.0
  ╰─▶ expected comma after patch version number, found '<'

It's referring to npm version specified inside my app's package.json:

{
  "engines": {
    "npm": ">=8.0.0 <10.0.0",
    "node": ">=18.0.0 <19.0.0",
    "pnpm": ">=8.0.0 <9.0.0"
  }
}

It looks like proto isn't parsing versions correctly in package.json format

Proto upgrade

A CLI upgrade command, similar to moon, or perhaps since moon depends on proto running moon upgrade should upgrade moon and proto together.

proto doesn't really work on windows

Version
0.3.0 using 0.3.1 script

reproduce

  • added .proto\bin to PATH (set manually, the script doesn't do that)
  • install any components, for example node
  • call node
  • error displayed

error details

.proto\bin\node.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ node
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

expect

can use installed components

Installation script doesn't work on Windows

Version: 0.3.0

Description

Use the installation script on the homepage to install on Windows (Windows 11), it didn't work

Error logs

PS C:\Users\mine> irm https://moonrepo.dev/install/proto.ps1 | iex
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                                                       0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0                                                                                                                                      0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0                                                                                                                                    curl: (56) Failure when receiving data from the peer                                                                                                                                                              Expand-Archive : The path 'C:\Users\mine\.proto\temp\proto\proto_cli-v0.3.0-x86_64-pc-windows-msvc.zip' either does not exist or is not a valid file system path.
At line:35 char:1
+ Expand-Archive -Path $DownloadFile -DestinationPath $TempDir
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (C:\Users\mine\.p...indows-msvc.zip:String) [Expand-Archive], InvalidOperationException
    + FullyQualifiedErrorId : ArchiveCmdletPathNotFound,Expand-Archive

Inside the directory, it seems to be a directory instead of a file

PS C:\Users\mine\.proto\temp\proto> ls


    Directory: C:\Users\mine\.proto\temp\proto


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         16 Mar 23     11:12                proto_cli-v0.3.0-x86_64-pc-windows-msvc

Expected, script installed correctly

`npx --version` fails

Precondition

proto --version
proto 0.7.2

proto list node
18.16.0

Actual

npx --version
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/--version - Not found
npm ERR! 404
npm ERR! 404  '--version@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/user/.npm/_logs/2023-04-27T05_08_59_789Z-debug-0.log

Expected

npx --version
9.6.4

unable to install modern yarn

Running proto install yarn 3.6.0 leaves the output:

[ INFO 2023-06-01 19:40:54] proto::commands::install:run  yarn has already been installed at ~\.proto\tools\yarn\1.22.19

Contributing Guidance

Howdy! I'd be interested in contributing #14, but I noticed there was no CONTRIBUTING.md or anything like it. Is there any guidance for someone looking to contribute?

`Failed to parse JSON file ~/.proto/tools/node/manifest.json` when running multiple tasks

Occasionally the following errors may occur. 🤔
maybe, related: #75


My package.json:

{
  "name": "proto-problem",
  "version": "1.0.0",
  "scripts": {
    "task": "run-p task:*",
    "task:a": "node -e \"console.log('a')\"",
    "task:b": "node -e \"console.log('b')\"",
    "task:c": "node -e \"console.log('c')\"",
    "task:d": "node -e \"console.log('d')\"",
    "task:e": "node -e \"console.log('e')\"",
    "task:f": "node -e \"console.log('f')\"",
    "task:g": "node -e \"console.log('g')\"",
    "task:h": "node -e \"console.log('h')\"",
    "task:i": "node -e \"console.log('i')\"",
    "task:j": "node -e \"console.log('j')\""
  },
  "devDependencies": {
    "npm-run-all": "^4.1.5"
  }
}

and proto version 0.7.0:

proto --version
proto 0.7.0

then, run the task:

npm install
npm run task

and the result:

Error: proto::json
  × Failed to parse JSON file ~/.proto/tools/node/manifest.json
  ╰─▶ EOF while parsing a value at line 1 column 0

Problem with non-resolvable global npm packages

Hi there,

I tried to install wrtc in one of my projects with:
pnpm add wrtc

This fails with:

✖ pnpm add wrtc   
Packages: +3
+++
Progress: resolved 385, reused 377, downloaded 0, added 0, done
node_modules/.pnpm/[email protected]/node_modules/wrtc: Running install script, failed in 129ms
.../.pnpm/[email protected]/node_modules/wrtc install$ node scripts/download-prebuilt.js
│ /bin/sh: node-pre-gyp: command not found
└─ Failed in 129ms at /Users/bjesuiter/Develop/bjesuiter/bgf-translation-tagungsapp/node_modules/.pnpm/[email protected]/node_modules/wrtc
 ELIFECYCLE  Command failed with exit code 1.

After that, I tried to install node-pre-gyp with

npm i -g @mapbox/node-pre-gyp

(since the non-scoped variant of this package is deprecated)

=> But it still does not work.

Problem found

After further inspection i found, that i have no location in my path for globally installed npm packages.
Your Docs say here https://moonrepo.dev/docs/proto/tools#npm-pnpm-yarn:

Global binaries
Installs to ~/.proto/tools/node/globals/bin.
Internally all package managers [install globals](https://moonrepo.dev/docs/proto/commands/install-global) with npm into the location above.

But this location does not exist on my macbook.
I only have:

.proto/tools/npm 
❯ ls
8.11.0          9.6.4           9.6.6           manifest.json

Debugging

When I try to install the package with pnpm I get:

 pnpm add -g @mapbox/node-pre-gyp
 ERR_PNPM_NO_GLOBAL_BIN_DIR  Unable to find the global bin directory

Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.

I could do this now, but I think, this should be solved by proto, otherwise this kind-of defeats it's purpose.

proto 0.11.x raises an error when a directory name contains spaces

$ proto -V
proto 0.11.1
$ mkdir "hello world"
$ echo "console.log('hello')" > hello\ world/index.js
$ node hello\ world/index.js # or node "hello world/index.js"
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module '/Users/user/hello'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.16.1

proto 0.10.6 works fine

$ proto -V
proto 0.10.6
$ node hello\ world/index.js
hello

npx not found

After installing Node and npm with Proto, I'm unable to use npx. I don't see npx in the ~/.proto/bin folder, I think it should be there?

$ proto install node 18
[INFO  proto:install] Installing Node.js with version "18"
[INFO  proto:install] Node.js has been installed at /Users/timon.vanspronsen/.proto/tools/node/18.15.0!
[INFO  proto:install] Installing npm with version "bundled"
[INFO  proto:install] npm has been installed at /Users/timon.vanspronsen/.proto/tools/npm/9.5.0!
$ proto global node 18
[INFO  proto:global] Set the global Node.js version to 18
$ proto global npm 9.5.0
[INFO  proto:global] Set the global npm version to 9.5.0
$ npx
zsh: command not found: npx

Support node-gyp tool

npm depends on node-gyp, can find binary here: ${PROTO_ROOT}/tools/npm/${version}/bin/node-gyp-bin/node-gyp.

Can you support node-gyp tool?

Proto and all installed tools break after `proto upgrade`

Whenever a new version of proto arrives and I run proto upgrade, the whole installation breaks. I can't run proto or any of the tools installed by proto. Installation only breaks if there's actually a new version available. The only way to resolve the issue is to run the installation script again.

Examples of broken output

proto --help
[1]    33324 killed     proto --help
pnpm run dev
[1]    33165 killed     pnpm run dev

I initially installed proto with curl -fsSL https://moonrepo.dev/install/proto.sh | bash, and that's also what I use to fix proto when it breaks.

I'm running MacOS v13.3.1 on a 16" MacbookPro M1 Max.

`proto setup` exports are non-deterministic

format_env_vars uses a HashMap to pass environment variables to be added to the user's shell. However, when iterating the map, the keys/values may be returned in a non-deterministic order. This leads to broken behavior in proto setup when PROTO_ROOT is written after the PATH.

❯ proto --version
proto 0.14.0

❯ tail ~/.zshrc

autoload -U +X bashcompinit && bashcompinit

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# iTerm2 Shell Integration
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"

❯ proto setup

❯ tail ~/.zshrc
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# iTerm2 Shell Integration
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"


# proto
export PATH="$PROTO_ROOT/bin:$PATH"
export PROTO_ROOT="$HOME/.proto"

Canary / nightly versions of languages?

Would it be possible to use nightly versions of languages i.e. Bun which is almost v1 but still on 0.5, and expecting releases up to 0.7 has bun upgrade --canary, there are other languages and CLIs that have this problem / opportunity

proto 0.11.0 throws an error when invoking tools

proto 0.11.0 throws an error when invoking tools. 🥲

proto upgrade

proto --version
proto 0.11.0

which pnpm
/Users/user/.proto/bin/pnpm

pnpm
error: invalid value 'proto=warn,starbase=warn' for '--log <LOG>'
  [possible values: off, error, warn, info, debug, trace]

For more information, try '--help'.

Install NX globally

I'm trying to install NX monorepo CLI globally on my machine but it's not working when node is installed with proto.

With Volta you can do this Volta install NX

`Failed to parse JSON file ~/.proto/temp/node/versions.json` when running multiple tasks

What version?

0.14.1

Which command?

node

What happened?

It is similar to what I reported previously.
To reproduce this issue, use the same steps.

If you're reporting an issue for a specific language/tool and not for proto itself, please report the issue on their official repository.

Sorry but I don't know. I think this is issue for proto itself.

Any logs?

> [email protected] task
> run-p task:*


> [email protected] task:f
> node -e "console.log('f')"

Error: json::parse_file

  × Failed to parse JSON file ~/.proto/temp/node/versions.json.
  ╰─▶ EOF while parsing a value at line 1 column 0

Error: json::parse_file

  × Failed to parse JSON file ~/.proto/temp/node/versions.json.
  ╰─▶ EOF while parsing a value at line 1 column 0

Error: json::parse_file

  × Failed to parse JSON file ~/.proto/temp/node/versions.json.
  ╰─▶ EOF while parsing a value at line 1 column 0

Operating system?

MacOS

Architecture?

Arm64

Unknown Plugins Scope 'schema'

Just installed proto and trying to install Moon Repo using it.

[plugins]
moon = "schema:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"

When then running proto install moon we see:

Error: proto::misc

  × Unknown plugin scope `schema`.

bug: rustup not syncing manifest

I ran into this working on the python PR and noticed it happens for rust too.

Screenshot 2023-07-03 at 10 01 27 PM

To reproduce:

  • use rustup to install rust 1.70 outside of proto
  • use proto to try to install rust 1.70
  • it says its installed
  • when I try to list installed rust versions it just lists other versions, not the one already installed

Could potentially solve by checking the manifest when calling install if something is already installed, and if so to update the manifest?

Seems like an edge case but wanted to report the bug 👍

Install Specific Architecture (arm / x64)

Hey, proto seems to be a really good solution for multiple environments developments. I didn't see an option to choose the architecture of the installed version in the documentation. Is this feature planned?

Bye !

Add support for Terraform

The Terraform CLI is a popular tool that is installed as part of many packages, it would be great if Proto supports such tooling to be integrated so that a dev environment can have Terraform pre-installed

Main thread panic when running yarn after upgrading to v0.9.1

After upgrading to proto v0.9.1 I can no longer run yarn. I've tried to reinstall yarn (proto uninstall yarn 1 && proto install yarn 1) as well as reinstall proto (curl -fsSL https://moonrepo.dev/install/proto.sh | bash). Both npm and pnpm still work.

System: MacOS v13.3.1 on a 16" MacbookPro M1 Max
Node: v18.13

RUST_BACKTRACE=1 yarn --help
Error:   × Main thread panicked.
  ├─▶ at crates/cli/src/hooks/node.rs:25:34
  ╰─▶ index out of bounds: the len is 1 but the index is 1
         0: 0x102fad2fc - _rust_begin_unwind
         1: 0x103099830 - core::panicking::panic_fmt::h7e47e10600a90221
         2: 0x10309992c - core::panicking::panic_bounds_check::hde809934b70194da
         3: 0x102d79eec - proto::run::{{closure}}::{{closure}}::hfe9d082a2acd1e3f
         4: 0x102d36af8 - <T as starbase::system::SystemFunc>::call::
      {{closure}}::h5f0c5ae554220f01
         5: 0x102f85388 - <starbase::system::CallbackSystem as
      starbase::system::System>::run::{{closure}}::hba96f4123f64049a
         6: 0x102d53e04 - starbase::app::App::run_systems_in_parallel::{{closure}}::
      {{closure}}::h00f20793287adfda
         7: 0x102d4039c - tokio::runtime::task::raw::poll::hbf9f29b1f33a568f
         8: 0x102fe0080 -
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task::hc34bc066a3f5f630
         9: 0x102fdf458 -
      tokio::runtime::scheduler::multi_thread::worker::run::h1847cf568c203998
        10: 0x102fe3ec0 - tokio::runtime::task::raw::poll::h78f032750521b70f
  help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.

[1]    36765 abort      RUST_BACKTRACE=1 yarn --help

`npm start` is broken when using proto-installed npm

I have npm installed via proto.

When I'm inside a repo which has no .prototools file,
I'd expect npm start to simply execute the start script.

However, it seems not to work, I throws this error:

Error: proto::alias::unknown

  × Version alias bundled could not be found in the manifest.

I'm completely lost on what that means, seems like an internal error to me.
I also don't know, which infos you need to debug this, please ask if you need something more specific.

OS: MacOS Ventura (13.3)
Proto Version: 0.8.2 (but seemed to have happened also with 0.8.1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.