Skip to content

Commit

Permalink
node: remove node-build support (#1304)
Browse files Browse the repository at this point in the history
See #1028

Use asdf-nodejs if you want to continue using node-build (but please lmk
why you need it)
  • Loading branch information
jdx authored Dec 31, 2023
1 parent cb2b500 commit a60fe1b
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 333 deletions.
19 changes: 1 addition & 18 deletions docs/bun.md
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
# Bun in rtx

The following are instructions for using the bun rtx core plugin. This is used when there isn't a
git plugin installed named "bun".

The code for this is inside the rtx repository at
[`./src/plugins/core/bun.rs`](https://github.com/jdx/rtx/blob/main/src/plugins/core/bun.rs).

## Usage

The following installs bun and makes it the global default:

```sh-session
rtx use -g [email protected] # install bun 0.7.x
rtx use -g bun@latest # install latest bun
```

See available versions with `rtx ls-remote bun`.
See [rtx.jdx.dev](https://rtx.jdx.dev/lang/bun.html) for more information.
2 changes: 1 addition & 1 deletion docs/deno.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Moved to [rtx.jdx.dev/lang/deno](https://rtx.jdx.dev/lang/deno).
Moved to [rtx.jdx.dev/lang/deno.html](https://rtx.jdx.dev/lang/deno.html).
2 changes: 1 addition & 1 deletion docs/go.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Moved to [rtx.jdx.dev/lang/go](https://rtx.jdx.dev/lang/go).
Moved to [rtx.jdx.dev/lang/go.html](https://rtx.jdx.dev/lang/go.html).
2 changes: 1 addition & 1 deletion docs/java.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Moved to [rtx.jdx.dev/lang/java](https://rtx.jdx.dev/lang/java).
Moved to [rtx.jdx.dev/lang/java.html](https://rtx.jdx.dev/lang/java.html).
2 changes: 1 addition & 1 deletion docs/node.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Moved to [rtx.jdx.dev/lang/node](https://rtx.jdx.dev/lang/node).
Moved to [rtx.jdx.dev/lang/node.html](https://rtx.jdx.dev/lang/node.html).
2 changes: 1 addition & 1 deletion docs/python.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Moved to [rtx.jdx.dev/lang/python](https://rtx.jdx.dev/lang/python)
Moved to [rtx.jdx.dev/lang/python.html](https://rtx.jdx.dev/lang/python.html)
2 changes: 1 addition & 1 deletion docs/ruby.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Moved to [rtx.jdx.dev/lang/ruby](https://rtx.jdx.dev/lang/ruby).
Moved to [rtx.jdx.dev/lang/ruby.html](https://rtx.jdx.dev/lang/ruby.html).
6 changes: 0 additions & 6 deletions src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ pub static PYENV_ROOT: Lazy<PathBuf> =
Lazy::new(|| var_path("PYENV_ROOT").unwrap_or_else(|| HOME.join(".pyenv")));

// node
pub static RTX_NODE_BUILD: Lazy<Option<bool>> = Lazy::new(|| var_option_bool("RTX_NODE_BUILD"));
pub static RTX_NODE_BUILD_REPO: Lazy<String> = Lazy::new(|| {
var("RTX_NODE_BUILD_REPO").unwrap_or_else(|_| "https://github.com/nodenv/node-build.git".into())
});
pub static RTX_NODE_MIRROR_URL: Lazy<Url> = Lazy::new(|| {
var_url("RTX_NODE_MIRROR_URL")
.or_else(|| var_url("NODE_BUILD_MIRROR_URL"))
Expand All @@ -163,8 +159,6 @@ pub static RTX_NODE_CONCURRENCY: Lazy<Option<usize>> = Lazy::new(|| {
}
})
});
pub static RTX_NODE_VERBOSE_INSTALL: Lazy<Option<bool>> =
Lazy::new(|| var_option_bool("RTX_NODE_VERBOSE_INSTALL"));
pub static RTX_NODE_MAKE: Lazy<String> =
Lazy::new(|| var("RTX_NODE_MAKE").unwrap_or_else(|_| "make".into()));
pub static RTX_NODE_NINJA: Lazy<bool> =
Expand Down
9 changes: 1 addition & 8 deletions src/plugins/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ use once_cell::sync::Lazy;
pub use python::PythonPlugin;

use crate::cache::CacheManager;
use crate::env::RTX_NODE_BUILD;
use crate::http::HTTP_FETCH;
use crate::plugins::core::bun::BunPlugin;
use crate::plugins::core::deno::DenoPlugin;
use crate::plugins::core::erlang::ErlangPlugin;
use crate::plugins::core::go::GoPlugin;
use crate::plugins::core::java::JavaPlugin;
use crate::plugins::core::node::NodePlugin;
use crate::plugins::core::node_build::NodeBuildPlugin;
use crate::plugins::core::ruby::RubyPlugin;
use crate::plugins::Plugin;
use crate::timeout::run_with_timeout;
Expand All @@ -32,7 +30,6 @@ mod erlang;
mod go;
mod java;
mod node;
mod node_build;
mod python;
mod ruby;

Expand All @@ -44,11 +41,7 @@ pub static CORE_PLUGINS: Lazy<PluginMap> = Lazy::new(|| {
Arc::new(DenoPlugin::new()),
Arc::new(GoPlugin::new()),
Arc::new(JavaPlugin::new()),
if *RTX_NODE_BUILD == Some(true) {
Arc::new(NodeBuildPlugin::new())
} else {
Arc::new(NodePlugin::new())
},
Arc::new(NodePlugin::new()),
Arc::new(PythonPlugin::new()),
Arc::new(RubyPlugin::new()),
];
Expand Down
295 changes: 0 additions & 295 deletions src/plugins/core/node_build.rs

This file was deleted.

0 comments on commit a60fe1b

Please sign in to comment.