Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: moonrepo/moon
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.33.1
Choose a base ref
...
head repository: moonrepo/moon
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.33.2
Choose a head ref
  • 5 commits
  • 32 files changed
  • 1 contributor

Commits on Mar 18, 2025

  1. deps: Update to latest.

    milesj committed Mar 18, 2025
    Copy the full SHA
    0fcbc8e View commit details
  2. Copy the full SHA
    22a72b7 View commit details
  3. Copy the full SHA
    c393a17 View commit details
  4. fix: Regenerate schemas.

    milesj committed Mar 18, 2025
    Copy the full SHA
    72e2268 View commit details
  5. Release

    - @moonrepo/cli@1.33.2
    - @moonrepo/core-linux-x64-gnu@1.33.2
    - @moonrepo/core-linux-arm64-musl@1.33.2
    - @moonrepo/core-linux-arm64-gnu@1.33.2
    - @moonrepo/core-linux-x64-musl@1.33.2
    - @moonrepo/core-macos-arm64@1.33.2
    - @moonrepo/core-macos-x64@1.33.2
    - @moonrepo/core-windows-x64-msvc@1.33.2
    - @moonrepo/types@1.25.1
    milesj committed Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0e82dca View commit details
Showing with 264 additions and 94 deletions.
  1. +15 −0 CHANGELOG.md
  2. +16 −15 Cargo.lock
  3. +6 −6 Cargo.toml
  4. +1 −1 crates/cli/Cargo.toml
  5. +25 −6 crates/config/src/portable_path.rs
  6. +1 −1 crates/config/src/template/template_locator.rs
  7. +14 −7 crates/config/src/workspace/remote_config.rs
  8. +4 −4 crates/config/src/workspace_config.rs
  9. +1 −0 crates/project-builder/Cargo.toml
  10. +24 −5 crates/project-builder/src/project_builder.rs
  11. +5 −0 crates/project-builder/tests/__fixtures__/langs/ts-disabled/moon.yml
  12. +1 −0 crates/project-builder/tests/__fixtures__/langs/ts-disabled/tsconfig.json
  13. +31 −4 crates/project-builder/tests/project_builder_test.rs
  14. +1 −1 crates/project-graph/tests/project_graph_test.rs
  15. +1 −1 crates/task-hasher/tests/task_hasher_test.rs
  16. +3 −7 crates/toolchain/src/detect/project_toolchain.rs
  17. +8 −8 packages/cli/package.json
  18. +1 −1 packages/core-linux-arm64-gnu/package.json
  19. +1 −1 packages/core-linux-arm64-musl/package.json
  20. +1 −1 packages/core-linux-x64-gnu/package.json
  21. +1 −1 packages/core-linux-x64-musl/package.json
  22. +1 −1 packages/core-macos-arm64/package.json
  23. +1 −1 packages/core-macos-x64/package.json
  24. +1 −1 packages/core-windows-x64-msvc/package.json
  25. +1 −1 packages/types/package.json
  26. +2 −0 packages/types/src/toolchain-config.ts
  27. +66 −6 packages/types/src/workspace-config.ts
  28. +8 −0 website/blog/2025-03-13_moon-v1.33.mdx
  29. +4 −0 website/static/schemas/project.json
  30. +4 −0 website/static/schemas/toolchain.json
  31. +1 −0 website/static/schemas/workspace.json
  32. +14 −14 yarn.lock
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 1.33.2

#### 🚀 Updates

- Added `MOON_REMOTE_*` environment variables for many `unstable_remote` settings.

#### 🐞 Fixes

- Fixed an issue where project toolchain detection would not take the `toolchain` disabled state in
`moon.yml` into account.

#### ⚙️ Internal

- Updated dependencies.

## 1.33.1

#### 🐞 Fixes
31 changes: 16 additions & 15 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ default-members = ["crates/cli"]

[workspace.dependencies]
async-recursion = "1.1.1"
async-trait = "0.1.87"
async-trait = "0.1.88"
cached = "0.55.1"
chrono = { version = "0.4.40", features = ["serde"] }
cd_env = "0.3.0"
@@ -37,7 +37,7 @@ futures = "0.3.31"
indexmap = "2.8.0"
md5 = "0.7.0"
miette = "7.5.0"
once_cell = "1.21.0"
once_cell = "1.21.1"
pathdiff = "0.2.3"
petgraph = { version = "0.7.1", default-features = false, features = [
"serde-1",
@@ -78,7 +78,7 @@ starbase_utils = { version = "0.11.1", default-features = false, features = [
] }
tera = { version = "1.20.0", features = ["preserve_order"] }
thiserror = "2.0.12"
tokio = { version = "1.44.0", default-features = false, features = [
tokio = { version = "1.44.1", default-features = false, features = [
"macros",
"process",
"rt-multi-thread",
@@ -87,15 +87,15 @@ tokio = { version = "1.44.0", default-features = false, features = [
"time",
"tracing",
] }
tokio-util = "0.7.13"
tokio-util = "0.7.14"
typescript_tsconfig_json = { version = "0.4.3", features = ["serialize"] }
tracing = "0.1.41"
uuid = { version = "1.15.1", features = ["v4"] }
uuid = { version = "1.16.0", features = ["v4"] }

# proto/plugin related
extism = "=1.10.0"
extism-pdk = "1.3.0"
proto_core = "0.47.9"
proto_core = "0.47.10"
proto_installer = "0.12.2"
system_env = "0.8.0"
version_spec = "0.9.1"
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "moon_cli"
version = "1.33.1"
version = "1.33.2"
edition = "2024"
publish = false

31 changes: 25 additions & 6 deletions crates/config/src/portable_path.rs
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ use schematic::{ParseError, Schema, SchemaBuilder, Schematic};
use serde::{Deserialize, Serialize};
use std::fmt;
use std::path::Path;
use std::str::FromStr;

/// Return true of the provided file looks like a glob pattern.
pub fn is_glob_like(value: &str) -> bool {
@@ -27,8 +28,10 @@ pub fn is_glob_like(value: &str) -> bool {
value.contains('?')
}

pub trait PortablePath: Sized {
fn from_str(path: &str) -> Result<Self, ParseError>;
pub trait PortablePath: FromStr {
fn parse(path: &str) -> Result<Self, Self::Err> {
Self::from_str(path)
}
}

macro_rules! path_type {
@@ -108,7 +111,11 @@ macro_rules! path_type {
// Represents any file glob pattern.
path_type!(GlobPath);

impl PortablePath for GlobPath {
impl PortablePath for GlobPath {}

impl FromStr for GlobPath {
type Err = ParseError;

fn from_str(value: &str) -> Result<Self, ParseError> {
Ok(GlobPath(value.into()))
}
@@ -117,7 +124,11 @@ impl PortablePath for GlobPath {
// Represents any file system path.
path_type!(FilePath);

impl PortablePath for FilePath {
impl PortablePath for FilePath {}

impl FromStr for FilePath {
type Err = ParseError;

fn from_str(value: &str) -> Result<Self, ParseError> {
if is_glob_like(value) {
return Err(ParseError::new(
@@ -132,7 +143,11 @@ impl PortablePath for FilePath {
// Represents a project-relative file glob pattern.
path_type!(ProjectGlobPath);

impl PortablePath for ProjectGlobPath {
impl PortablePath for ProjectGlobPath {}

impl FromStr for ProjectGlobPath {
type Err = ParseError;

fn from_str(value: &str) -> Result<Self, ParseError> {
validate_child_relative_path(value).map_err(|error| ParseError::new(error.to_string()))?;

@@ -143,7 +158,11 @@ impl PortablePath for ProjectGlobPath {
// Represents a project-relative file system path.
path_type!(ProjectFilePath);

impl PortablePath for ProjectFilePath {
impl PortablePath for ProjectFilePath {}

impl FromStr for ProjectFilePath {
type Err = ParseError;

fn from_str(value: &str) -> Result<Self, ParseError> {
if is_glob_like(value) {
return Err(ParseError::new(
2 changes: 1 addition & 1 deletion crates/config/src/template/template_locator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::is_glob_like;
use crate::portable_path::{FilePath, GlobPath, PortablePath};
use crate::portable_path::{FilePath, GlobPath};
use once_cell::sync::Lazy;
use regex::Regex;
use schematic::{ParseError, Schema, SchemaBuilder, Schematic};
21 changes: 14 additions & 7 deletions crates/config/src/workspace/remote_config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::portable_path::FilePath;
use rustc_hash::FxHashMap;
use schematic::{Config, ConfigEnum, ValidateError, ValidateResult, derive_enum, validate};
use schematic::{Config, ConfigEnum, ValidateError, ValidateResult, derive_enum, env, validate};

fn path_is_required<D, C>(
value: &FilePath,
@@ -34,6 +34,7 @@ pub struct RemoteAuthConfig {
pub headers: FxHashMap<String, String>,

/// The name of an environment variable to use as a bearer token.
#[setting(env = "MOON_REMOTE_AUTH_TOKEN")]
pub token: Option<String>,
}

@@ -59,10 +60,11 @@ impl RemoteCompression {
#[derive(Clone, Config, Debug)]
pub struct RemoteCacheConfig {
/// The compression format to use when uploading/downloading blobs.
#[setting(env = "MOON_REMOTE_CACHE_COMPRESSION")]
pub compression: RemoteCompression,

/// Unique instance name for blobs. Will be used as a folder name.
#[setting(default = "moon-outputs")]
#[setting(default = "moon-outputs", env = "MOON_REMOTE_CACHE_INSTANCE_NAME")]
pub instance_name: String,
}

@@ -71,14 +73,16 @@ pub struct RemoteCacheConfig {
pub struct RemoteTlsConfig {
/// If true, assume that the server supports HTTP/2,
/// even if it doesn't provide protocol negotiation via ALPN.
#[setting(env = "MOON_REMOTE_TLS_HTTP2", parse_env = env::parse_bool)]
pub assume_http2: bool,

/// A file path, relative from the workspace root, to the
/// certificate authority PEM encoded X509 certificate.
#[setting(validate = path_is_required)]
#[setting(env = "MOON_REMOTE_TLS_CERT", validate = path_is_required)]
pub cert: FilePath,

/// The domain name in which to verify the TLS certificate.
#[setting(env = "MOON_REMOTE_TLS_DOMAIN")]
pub domain: Option<String>,
}

@@ -87,31 +91,34 @@ pub struct RemoteTlsConfig {
pub struct RemoteMtlsConfig {
/// If true, assume that the server supports HTTP/2,
/// even if it doesn't provide protocol negotiation via ALPN.
#[setting(env = "MOON_REMOTE_MTLS_HTTP", parse_env = env::parse_bool)]
pub assume_http2: bool,

/// A file path, relative from the workspace root, to the
/// certificate authority PEM encoded X509 certificate.
#[setting(validate = path_is_required)]
#[setting(env = "MOON_REMOTE_MTLS_CA_CERT", validate = path_is_required)]
pub ca_cert: FilePath,

/// A file path, relative from the workspace root, to the
/// client's PEM encoded X509 certificate.
#[setting(validate = path_is_required)]
#[setting(env = "MOON_REMOTE_MTLS_CLIENT_CERT", validate = path_is_required)]
pub client_cert: FilePath,

/// A file path, relative from the workspace root, to the
/// client's PEM encoded X509 private key.
#[setting(validate = path_is_required)]
#[setting(env = "MOON_REMOTE_MTLS_CLIENT_KEY", validate = path_is_required)]
pub client_key: FilePath,

/// The domain name in which to verify the TLS certificate.
#[setting(env = "MOON_REMOTE_MTLS_DOMAIN")]
pub domain: Option<String>,
}

/// Configures the remote service, powered by the Bazel Remote Execution API.
#[derive(Clone, Config, Debug)]
pub struct RemoteConfig {
/// The API format of the remote service.
#[setting(env = "MOON_REMOTE_API")]
pub api: RemoteApi,

/// Connect to the host using basic HTTP authentication.
@@ -124,7 +131,7 @@ pub struct RemoteConfig {

/// The remote host to connect and send requests to.
/// Supports gRPC protocols.
#[setting(validate = validate::not_empty)]
#[setting(env = "MOON_REMOTE_HOST", validate = validate::not_empty)]
pub host: String,

/// Connect to the host using server and client authentication with mTLS.
8 changes: 4 additions & 4 deletions crates/config/src/workspace_config.rs
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ fn validate_projects<D, C>(
PartialWorkspaceProjects::Both(cfg) => {
if let Some(globs) = &cfg.globs {
for (i, g) in globs.iter().enumerate() {
ProjectGlobPath::from_str(g).map_err(|error| {
ProjectGlobPath::parse(g).map_err(|error| {
ValidateError::with_segments(
error.to_string(),
[PathSegment::Key("globs".to_owned()), PathSegment::Index(i)],
@@ -28,7 +28,7 @@ fn validate_projects<D, C>(

if let Some(sources) = &cfg.sources {
for (k, v) in sources {
ProjectFilePath::from_str(v).map_err(|error| {
ProjectFilePath::parse(v).map_err(|error| {
ValidateError::with_segments(
error.to_string(),
[
@@ -42,14 +42,14 @@ fn validate_projects<D, C>(
}
PartialWorkspaceProjects::Globs(globs) => {
for (i, g) in globs.iter().enumerate() {
ProjectGlobPath::from_str(g).map_err(|error| {
ProjectGlobPath::parse(g).map_err(|error| {
ValidateError::with_segments(error.to_string(), [PathSegment::Index(i)])
})?;
}
}
PartialWorkspaceProjects::Sources(sources) => {
for (k, v) in sources {
ProjectFilePath::from_str(v).map_err(|error| {
ProjectFilePath::parse(v).map_err(|error| {
ValidateError::with_segments(
error.to_string(),
[PathSegment::Key(k.to_string())],
1 change: 1 addition & 0 deletions crates/project-builder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ rustc-hash = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
moon_plugin = { path = "../plugin" }
starbase_sandbox = { workspace = true }
tokio = { workspace = true }

Loading