Skip to content

Commit

Permalink
build: Redo Rust upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jul 26, 2024
1 parent 223855c commit edb57c4
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 218 deletions.
25 changes: 18 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Plugin changelogs

- [Bun](https://github.com/moonrepo/bun-plugin/blob/master/CHANGELOG.md)
- [Deno](https://github.com/moonrepo/deno-plugin/blob/master/CHANGELOG.md)
- [Go](https://github.com/moonrepo/go-plugin/blob/master/CHANGELOG.md)
- [Node](https://github.com/moonrepo/node-plugin/blob/master/CHANGELOG.md)
- [Python](https://github.com/moonrepo/python-plugin/blob/master/CHANGELOG.md)
- [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md)
- [TOML schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md)
- [Bun](https://github.com/moonrepo/tools/blob/master/tools/bun/CHANGELOG.md)
- [Deno](https://github.com/moonrepo/tools/blob/master/tools/deno/CHANGELOG.md)
- [Go](https://github.com/moonrepo/tools/blob/master/tools/go/CHANGELOG.md)
- [Node](https://github.com/moonrepo/tools/blob/master/tools/node/CHANGELOG.md)
- [Python](https://github.com/moonrepo/tools/blob/master/tools/python/CHANGELOG.md)
- [Rust](https://github.com/moonrepo/tools/blob/master/tools/rust/CHANGELOG.md)
- [TOML schema](https://github.com/moonrepo/tools/blob/master/tools/internal-schema/CHANGELOG.md)

## Unreleased

Expand Down Expand Up @@ -42,6 +42,17 @@
proto = "0.38.0"
```

#### 🧩 Plugins

- Updated `go_plugin` to v0.12.
- Changed the `gobin` setting to `false` by default.
- Updated `node_depman_plugin` to v0.12.
- Added a `dist-url` config setting, allowing the download host to be customized.

#### ⚙️ Internal

- Updated Rust to v1.80.

## 0.38.4

#### 🐞 Fixes
Expand Down
75 changes: 25 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ default-members = ["crates/cli"]
[workspace.dependencies]
anyhow = "1.0.86"
async-trait = "0.1.81"
clap = "4.5.10"
clap_complete = "4.5.9"
clap = "4.5.11"
clap_complete = "4.5.11"
dirs = "5.0.1"
extism = "1.0.0" # Lower for consumers
extism-pdk = "1.2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async-trait = { workspace = true }
chrono = "0.4.38"
clap = { workspace = true, features = ["derive", "env"] }
clap_complete = { workspace = true }
clap_complete_nushell = "4.5.2"
clap_complete_nushell = "4.5.3"
comfy-table = "7.1.1"
dialoguer = "0.11.0"
dirs = { workspace = true }
Expand Down
29 changes: 12 additions & 17 deletions crates/cli/src/commands/activate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,18 @@ pub async fn activate(session: ProtoSession, args: ActivateArgs) -> AppResult {

// If not exporting data, just print the activation syntax immediately
if !args.export && !args.json {
match shell_type.build().format_hook(Hook::OnChangeDir {
command: match shell_type {
// These operate on JSON
ShellType::Nu => format!("proto activate {} --json", shell_type),
// While these evaluate shell syntax
_ => format!("proto activate {} --export", shell_type),
},
prefix: "proto".into(),
}) {
Ok(output) => {
println!("{output}");
}
Err(_) => {
// Do nothing? This command is typically wrapped in `eval`,
// so these warnings would actually just trigger a syntax error.
}
};
println!(
"{}",
shell_type.build().format_hook(Hook::OnChangeDir {
command: match shell_type {
// These operate on JSON
ShellType::Nu => format!("proto activate {} --json", shell_type),
// While these evaluate shell syntax
_ => format!("proto activate {} --export", shell_type),
},
prefix: "proto".into(),
})?
);

return Ok(());
}
Expand Down
1 change: 0 additions & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ serde_json = { workspace = true }
sha2 = { workspace = true }
shell-words = { workspace = true }
starbase_archive = { workspace = true }
starbase_events = { workspace = true }
starbase_styles = { workspace = true }
starbase_utils = { workspace = true, features = ["fs-lock"] }
thiserror = { workspace = true }
Expand Down
46 changes: 0 additions & 46 deletions crates/core/src/events.rs

This file was deleted.

10 changes: 5 additions & 5 deletions crates/core/src/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use miette::IntoDiagnostic;
use once_cell::sync::Lazy;
use regex::Regex;
use semver::Version;
use serde::de::DeserializeOwned;
Expand All @@ -10,13 +9,14 @@ use starbase_utils::json::{self, JsonError};
use starbase_utils::net;
use std::env;
use std::path::Path;
use std::sync::OnceLock;
use std::sync::{LazyLock, OnceLock};
use std::time::SystemTime;

pub static ENV_VAR: Lazy<Regex> = Lazy::new(|| Regex::new(r"\$(?<name>[A-Z0-9_]+)").unwrap());
pub static ENV_VAR: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"\$(?<name>[A-Z0-9_]+)").unwrap());

pub static ENV_VAR_SUB: Lazy<Regex> =
Lazy::new(|| Regex::new(r"\$\{(?<name>[A-Z0-9_]+)\}").unwrap());
pub static ENV_VAR_SUB: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"\$\{(?<name>[A-Z0-9_]+)\}").unwrap());

pub fn get_proto_version() -> &'static Version {
static VERSION_CACHE: OnceLock<Version> = OnceLock::new();
Expand Down
Loading

0 comments on commit edb57c4

Please sign in to comment.