Skip to content

internal: Update proto and rename some internals. #1919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
with:
auto-install: true
cache: true
proto-version: '0.47.7' # Keep in sync
proto-version: '0.47.11' # Keep in sync
- uses: mozilla-actions/[email protected]
if: ${{ vars.ENABLE_SCCACHE == 'true' }}
# Fixes issues where proto can't find a version because nothing is pinned globally
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@

#### 🚀 Updates

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

#### ⚙️ Internal

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

## 1.34.3
Expand Down
65 changes: 32 additions & 33 deletions Cargo.lock

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

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cached = "0.55.1"
chrono = { version = "0.4.40", features = ["serde"] }
cd_env = "0.3.0"
ci_env = "0.4.0"
clap = { version = "4.5.35", default-features = false, features = [
clap = { version = "4.5.36", default-features = false, features = [
"derive",
"std",
"error-context",
Expand Down Expand Up @@ -55,7 +55,7 @@ reqwest = { version = "0.12.15", default-features = false, features = [
] }
rustc-hash = "2.1.1"
scc = "2.3.3"
schematic = { version = "0.18.3", default-features = false, features = [
schematic = { version = "0.18.4", default-features = false, features = [
"schema",
] }
serial_test = "3.2.0"
Expand All @@ -64,17 +64,17 @@ serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
serde_yml = "0.0.12"
sha2 = "0.10.8"
starbase = { version = "0.10.1" }
starbase_archive = { version = "0.10.2", default-features = false, features = [
starbase = { version = "0.10.2" }
starbase_archive = { version = "0.10.3", default-features = false, features = [
"miette",
"tar-gz",
] }
starbase_console = { version = "0.6.6", features = ["miette"] }
starbase_console = { version = "0.6.7", features = ["miette"] }
starbase_events = "0.7.1"
starbase_sandbox = "0.9.1"
starbase_shell = "0.7.3"
starbase_styles = { version = "0.5.0", features = ["relative-path"] }
starbase_utils = { version = "0.11.5", default-features = false, features = [
starbase_styles = { version = "0.6.0", features = ["relative-path"] }
starbase_utils = { version = "0.11.6", default-features = false, features = [
"editor-config",
"glob-cache",
"miette",
Expand All @@ -98,11 +98,11 @@ uuid = { version = "1.16.0", features = ["v4"] }
# proto/plugin related
extism = "=1.10.0"
extism-pdk = "1.4.0"
proto_core = "0.47.15"
proto_installer = "0.12.3"
proto_core = "0.47.16"
proto_installer = "0.12.4"
system_env = "0.8.0"
version_spec = "0.9.1"
warpgate = "0.23.9"
warpgate = "0.23.10"
warpgate_api = "0.13.4"
warpgate_pdk = "0.12.2"

Expand Down
2 changes: 1 addition & 1 deletion crates/actions/src/actions/sync_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub async fn sync_project(
// Loop through each toolchain and sync
for sync_result in app_context
.toolchain_registry
.sync_project(project.get_enabled_toolchains(), |registry, toolchain| {
.sync_project_many(project.get_enabled_toolchains(), |registry, toolchain| {
SyncProjectInput {
context: registry.create_context(),
project_dependencies: dependency_fragments.clone(),
Expand Down
2 changes: 1 addition & 1 deletion crates/actions/src/actions/sync_workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub async fn sync_workspace(
let mut ops = vec![];

for sync_result in toolchain_registry
.sync_workspace(|registry, _| SyncWorkspaceInput {
.sync_workspace_all(|registry, _| SyncWorkspaceInput {
context: registry.create_context(),
})
.await?
Expand Down
4 changes: 2 additions & 2 deletions crates/actions/src/operations/sync_config_schemas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub async fn sync_config_schemas(app_context: &AppContext, force: bool) -> miett
out_dir,
app_context
.toolchain_registry
.define_toolchain_config()
.define_toolchain_config_all()
.await?,
)
.map(|_| true)
Expand All @@ -48,7 +48,7 @@ pub async fn sync_config_schemas(app_context: &AppContext, force: bool) -> miett
out_dir,
app_context
.toolchain_registry
.define_toolchain_config()
.define_toolchain_config_all()
.await?,
)
},
Expand Down
22 changes: 19 additions & 3 deletions crates/app/src/app.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::app_options::*;
use crate::commands::bin::BinArgs;
use crate::commands::check::CheckArgs;
use crate::commands::ci::CiArgs;
Expand Down Expand Up @@ -25,7 +26,6 @@ use clap::{Parser, Subcommand};
use moon_cache::CacheMode;
use moon_common::consts::BIN_NAME;
use moon_env_var::GlobalEnvBag;
use starbase::tracing::LogLevel;
use starbase_styles::color::Color as ColorType;
use std::env;
use std::path::PathBuf;
Expand Down Expand Up @@ -295,6 +295,7 @@ pub struct Cli {
pub dump: bool,

#[arg(
value_enum,
long,
global = true,
env = "MOON_LOG",
Expand All @@ -320,6 +321,16 @@ pub struct Cli {
)]
pub quiet: bool,

#[arg(
value_enum,
long,
global = true,
env = "MOON_THEME",
help = "Terminal theme to print with",
default_value_t
)]
pub theme: AppTheme,

#[command(subcommand)]
pub command: Commands,
}
Expand All @@ -330,13 +341,18 @@ impl Cli {

let bag = GlobalEnvBag::instance();
bag.set("STARBASE_LOG", self.log.to_string());
bag.set("STARBASE_THEME", self.theme.to_string());

if !bag.has("MOON_CACHE") {
bag.set("MOON_CACHE", self.cache.to_string());
}

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

if !bag.has("MOON_CACHE") {
bag.set("MOON_CACHE", self.cache.to_string());
if !bag.has("MOON_THEME") {
bag.set("MOON_THEME", self.theme.to_string());
}

if matches!(self.cache, CacheMode::Off | CacheMode::Write) {
Expand Down
Loading
Loading