Skip to content

Commit 2c818f4

Browse files
committed
internal: Update proto and rename some internals. (#1919)
* Rename session. * Rename methods. * Add theme/verbose. * Update proto. * Add cache key. * Update tests. * Fix tests.
1 parent 41315dd commit 2c818f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+350
-178
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
with:
104104
auto-install: true
105105
cache: true
106-
proto-version: '0.47.7' # Keep in sync
106+
proto-version: '0.47.11' # Keep in sync
107107
- uses: mozilla-actions/[email protected]
108108
if: ${{ vars.ENABLE_SCCACHE == 'true' }}
109109
# Fixes issues where proto can't find a version because nothing is pinned globally

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44

55
#### 🚀 Updates
66

7+
- Added a new task option, `cacheKey`, which can be used to seed the hash, and invalidate local and
8+
remote caches.
79
- Added a new task option, `priority`, that controls the position in the pipeline queue.
810
- Supports `critical`, `high`, `normal` (default), or `low`.
11+
- Added a `--log=verbose` level, which includes span information on top of the trace level.
12+
- Added a light terminal theme. Can be enabled with `--theme=light` or `MOON_THEME=light`.
13+
- This is still a work in progress. Open to feedback on color/contrast choices.
914
- Added 2 new webhooks, `toolchain.installing` and `toolchain.installed`, which emit when a
1015
toolchain WASM plugin is installing a tool (via proto).
1116
- Updated and simplified the relationships in the action graph.
@@ -23,6 +28,8 @@
2328

2429
#### ⚙️ Internal
2530

31+
- Updated proto to [v0.47.11](https://github.com/moonrepo/proto/releases/tag/v0.47.11) (from
32+
0.47.7).
2633
- Updated Rust to v1.86.0.
2734

2835
## 1.34.3

Cargo.lock

Lines changed: 32 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cached = "0.55.1"
2222
chrono = { version = "0.4.40", features = ["serde"] }
2323
cd_env = "0.3.0"
2424
ci_env = "0.4.0"
25-
clap = { version = "4.5.35", default-features = false, features = [
25+
clap = { version = "4.5.36", default-features = false, features = [
2626
"derive",
2727
"std",
2828
"error-context",
@@ -55,7 +55,7 @@ reqwest = { version = "0.12.15", default-features = false, features = [
5555
] }
5656
rustc-hash = "2.1.1"
5757
scc = "2.3.3"
58-
schematic = { version = "0.18.3", default-features = false, features = [
58+
schematic = { version = "0.18.4", default-features = false, features = [
5959
"schema",
6060
] }
6161
serial_test = "3.2.0"
@@ -64,17 +64,17 @@ serde = { version = "1.0.219", features = ["derive"] }
6464
serde_json = "1.0.140"
6565
serde_yml = "0.0.12"
6666
sha2 = "0.10.8"
67-
starbase = { version = "0.10.1" }
68-
starbase_archive = { version = "0.10.2", default-features = false, features = [
67+
starbase = { version = "0.10.2" }
68+
starbase_archive = { version = "0.10.3", default-features = false, features = [
6969
"miette",
7070
"tar-gz",
7171
] }
72-
starbase_console = { version = "0.6.6", features = ["miette"] }
72+
starbase_console = { version = "0.6.7", features = ["miette"] }
7373
starbase_events = "0.7.1"
7474
starbase_sandbox = "0.9.1"
7575
starbase_shell = "0.7.3"
76-
starbase_styles = { version = "0.5.0", features = ["relative-path"] }
77-
starbase_utils = { version = "0.11.5", default-features = false, features = [
76+
starbase_styles = { version = "0.6.0", features = ["relative-path"] }
77+
starbase_utils = { version = "0.11.6", default-features = false, features = [
7878
"editor-config",
7979
"glob-cache",
8080
"miette",
@@ -98,11 +98,11 @@ uuid = { version = "1.16.0", features = ["v4"] }
9898
# proto/plugin related
9999
extism = "=1.10.0"
100100
extism-pdk = "1.4.0"
101-
proto_core = "0.47.15"
102-
proto_installer = "0.12.3"
101+
proto_core = "0.47.16"
102+
proto_installer = "0.12.4"
103103
system_env = "0.8.0"
104104
version_spec = "0.9.1"
105-
warpgate = "0.23.9"
105+
warpgate = "0.23.10"
106106
warpgate_api = "0.13.4"
107107
warpgate_pdk = "0.12.2"
108108

crates/actions/src/actions/sync_project.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub async fn sync_project(
8383
// Loop through each toolchain and sync
8484
for sync_result in app_context
8585
.toolchain_registry
86-
.sync_project(project.get_enabled_toolchains(), |registry, toolchain| {
86+
.sync_project_many(project.get_enabled_toolchains(), |registry, toolchain| {
8787
SyncProjectInput {
8888
context: registry.create_context(),
8989
project_dependencies: dependency_fragments.clone(),

crates/actions/src/actions/sync_workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub async fn sync_workspace(
106106
let mut ops = vec![];
107107

108108
for sync_result in toolchain_registry
109-
.sync_workspace(|registry, _| SyncWorkspaceInput {
109+
.sync_workspace_all(|registry, _| SyncWorkspaceInput {
110110
context: registry.create_context(),
111111
})
112112
.await?

crates/actions/src/operations/sync_config_schemas.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub async fn sync_config_schemas(app_context: &AppContext, force: bool) -> miett
2121
out_dir,
2222
app_context
2323
.toolchain_registry
24-
.define_toolchain_config()
24+
.define_toolchain_config_all()
2525
.await?,
2626
)
2727
.map(|_| true)
@@ -48,7 +48,7 @@ pub async fn sync_config_schemas(app_context: &AppContext, force: bool) -> miett
4848
out_dir,
4949
app_context
5050
.toolchain_registry
51-
.define_toolchain_config()
51+
.define_toolchain_config_all()
5252
.await?,
5353
)
5454
},

crates/app/src/app.rs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use crate::app_options::*;
12
use crate::commands::bin::BinArgs;
23
use crate::commands::check::CheckArgs;
34
use crate::commands::ci::CiArgs;
@@ -25,7 +26,6 @@ use clap::{Parser, Subcommand};
2526
use moon_cache::CacheMode;
2627
use moon_common::consts::BIN_NAME;
2728
use moon_env_var::GlobalEnvBag;
28-
use starbase::tracing::LogLevel;
2929
use starbase_styles::color::Color as ColorType;
3030
use std::env;
3131
use std::path::PathBuf;
@@ -295,6 +295,7 @@ pub struct Cli {
295295
pub dump: bool,
296296

297297
#[arg(
298+
value_enum,
298299
long,
299300
global = true,
300301
env = "MOON_LOG",
@@ -320,6 +321,16 @@ pub struct Cli {
320321
)]
321322
pub quiet: bool,
322323

324+
#[arg(
325+
value_enum,
326+
long,
327+
global = true,
328+
env = "MOON_THEME",
329+
help = "Terminal theme to print with",
330+
default_value_t
331+
)]
332+
pub theme: AppTheme,
333+
323334
#[command(subcommand)]
324335
pub command: Commands,
325336
}
@@ -330,13 +341,18 @@ impl Cli {
330341

331342
let bag = GlobalEnvBag::instance();
332343
bag.set("STARBASE_LOG", self.log.to_string());
344+
bag.set("STARBASE_THEME", self.theme.to_string());
345+
346+
if !bag.has("MOON_CACHE") {
347+
bag.set("MOON_CACHE", self.cache.to_string());
348+
}
333349

334350
if !bag.has("MOON_LOG") {
335351
bag.set("MOON_LOG", self.log.to_string());
336352
}
337353

338-
if !bag.has("MOON_CACHE") {
339-
bag.set("MOON_CACHE", self.cache.to_string());
354+
if !bag.has("MOON_THEME") {
355+
bag.set("MOON_THEME", self.theme.to_string());
340356
}
341357

342358
if matches!(self.cache, CacheMode::Off | CacheMode::Write) {

0 commit comments

Comments
 (0)