diff --git a/README.md b/README.md index 025cfe8bdd..7c0f82b3d7 100644 --- a/README.md +++ b/README.md @@ -611,7 +611,7 @@ Then when inside of `~/src/myproj/backend`, `node` will be `18`, `python` will b will be `3.1`. You can check the active versions with `rtx ls --current`. You can also have environment specific config files like `.rtx.production.toml`, see -[Config Environments](#experimental-config-environments) for more details. +[Config Environments](#config-environments) for more details. #### `[env]` - Arbitrary Environment Variables @@ -835,12 +835,12 @@ a different name. Set to something other than `.rtx.toml` to have rtx look for `.rtx.toml` config files with a different name. -#### [experimental] `RTX_ENV` +#### `RTX_ENV` Enables environment-specific config files such as `.rtx.development.toml`. Use this for different env vars or different tool versions in development/staging/production environments. See -[Config Environments](#experimental-config-environments) for more on how +[Config Environments](#config-environments) for more on how to use this feature. #### `RTX_USE_VERSIONS_HOST` @@ -1123,10 +1123,6 @@ does not work for some reason. ## Templates -> **Warning** -> -> This functionality is experimental and may change in the future. - Templates are used in the following locations: - `.tool-versions` files @@ -1157,11 +1153,10 @@ Here's another using `exec()`: current = "{{exec(command='node --version')}}" ``` -## [experimental] Config Environments +## Config Environments It's possible to have separate `.rtx.toml` files in the same directory for different -environments like `development` and `production`. To enable, set -`experimental = true` in `~/.config/rtx/config.toml`, then set `RTX_ENV` to an environment like +environments like `development` and `production`. To enable, set `RTX_ENV` to an environment like `development` or `production`. rtx will then look for a `.rtx.{RTX_ENV}.toml` file in the current directory. rtx will also look for "local" files like `.rtx.local.toml` and `.rtx.{RTX_ENV}.local.toml` in @@ -1213,8 +1208,8 @@ You can see the core plugins with `rtx plugin ls --core`. - [Ruby](./docs/ruby.md) - [Go](./docs/go.md) - [Java](./docs/java.md) -- [Deno (experimental)](./docs/deno.md) -- [Bun (experimental)](./docs/bun.md) +- [Deno](./docs/deno.md) +- [Bun](./docs/bun.md) ## FAQs diff --git a/src/cli/use.rs b/src/cli/use.rs index 96fee8f1b8..22b6f357cd 100644 --- a/src/cli/use.rs +++ b/src/cli/use.rs @@ -53,7 +53,7 @@ pub struct Use { #[clap(short, long, overrides_with_all = &["path", "env"])] global: bool, - /// [experimental] Modify an environment-specific config file like .rtx..toml + /// Modify an environment-specific config file like .rtx..toml #[clap(long, short, overrides_with_all = &["global", "path"])] env: Option, diff --git a/src/config/mod.rs b/src/config/mod.rs index 720e058fb9..10060605de 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -52,10 +52,10 @@ pub struct Config { impl Config { pub fn load() -> Result { let global_config = load_rtxrc()?; + let config_filenames = load_config_filenames(&BTreeMap::new()); let settings = Settings::default_builder() .preloaded(global_config.settings()?) .load()?; - let config_filenames = load_config_filenames(&settings, &BTreeMap::new()); let plugins = load_plugins(&settings)?; let config_files = load_all_config_files( &settings, @@ -330,14 +330,11 @@ fn load_legacy_files(settings: &Settings, tools: &PluginMap) -> BTreeMap>, -) -> Vec { +fn load_config_filenames(legacy_filenames: &BTreeMap>) -> Vec { let mut filenames = legacy_filenames.keys().cloned().collect_vec(); filenames.push(env::RTX_DEFAULT_TOOL_VERSIONS_FILENAME.clone()); filenames.push(env::RTX_DEFAULT_CONFIG_FILENAME.clone()); - if settings.experimental && *env::RTX_DEFAULT_CONFIG_FILENAME == ".rtx.toml" { + if *env::RTX_DEFAULT_CONFIG_FILENAME == ".rtx.toml" { filenames.push(".rtx.local.toml".to_string()); if let Some(env) = &*env::RTX_ENV { filenames.push(format!(".rtx.{}.toml", env)); diff --git a/src/plugins/core/mod.rs b/src/plugins/core/mod.rs index f0d890bc1f..74c0dbdd3e 100644 --- a/src/plugins/core/mod.rs +++ b/src/plugins/core/mod.rs @@ -39,6 +39,8 @@ pub type PluginMap = BTreeMap>; pub static CORE_PLUGINS: Lazy = Lazy::new(|| { let plugins: Vec> = vec![ + Arc::new(BunPlugin::new()), + Arc::new(DenoPlugin::new()), Arc::new(GoPlugin::new()), Arc::new(JavaPlugin::new()), if *RTX_NODE_BUILD == Some(true) { @@ -56,11 +58,7 @@ pub static CORE_PLUGINS: Lazy = Lazy::new(|| { }); pub static EXPERIMENTAL_CORE_PLUGINS: Lazy = Lazy::new(|| { - let plugins: Vec> = vec![ - Arc::new(BunPlugin::new()), - Arc::new(DenoPlugin::new()), - Arc::new(ErlangPlugin::new()), - ]; + let plugins: Vec> = vec![Arc::new(ErlangPlugin::new())]; plugins .into_iter() .map(|plugin| (plugin.name().to_string(), plugin))