committed by
GitHub
parent
1aa81484e7
commit
754bd3cd03
@@ -3,8 +3,8 @@
|
||||
_realname=turbo
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.6.0
|
||||
pkgrel=2
|
||||
pkgver=2.6.1
|
||||
pkgrel=1
|
||||
pkgdesc="Incremental bundler and build system optimized for JavaScript and TypeScript (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
@@ -26,17 +26,14 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-rustup"
|
||||
options=('!strip')
|
||||
source=("git+${msys2_repository_url}.git#tag=v${pkgver}"
|
||||
"zstd-sys.tar.gz::https://crates.io/api/v1/crates/zstd-sys/2.0.10+zstd.1.5.6/download"
|
||||
"zstd-sys-remove-statik.patch"
|
||||
"turbo-support-rust-1.91.patch")
|
||||
sha256sums=('f4a19e00ada31dc4e1d091cd3e0893c67cab2c6a2668cc5781c6b1f6c475a3c2'
|
||||
"zstd-sys-remove-statik.patch")
|
||||
sha256sums=('c6f5a8f1ec0350a4133d49d42314d5e4e1544d5a4e388a5600bfb2dedda593b5'
|
||||
'c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa'
|
||||
'48f4900ceb02d3aaf9a1020f33d56629156e96759f456c0e7ca18bfcf910767b'
|
||||
'cec00f2875c25cdf78770aa94dab01f3047f58546fe64ed93bf43b035088dbee')
|
||||
'48f4900ceb02d3aaf9a1020f33d56629156e96759f456c0e7ca18bfcf910767b')
|
||||
|
||||
prepare() {
|
||||
cd turborepo
|
||||
|
||||
patch -Np1 -i ../turbo-support-rust-1.91.patch
|
||||
patch -d ../zstd-sys-2.0.10+zstd.1.5.6 -i ../zstd-sys-remove-statik.patch
|
||||
cat >> Cargo.toml <<END
|
||||
|
||||
|
||||
@@ -1,357 +0,0 @@
|
||||
From cc058b4b5ead2abb95f434ea21cc3af65e4b73b1 Mon Sep 17 00:00:00 2001
|
||||
From: Maksim Bondarenkov <maksapple2306@gmail.com>
|
||||
Date: Thu, 30 Oct 2025 21:54:03 +0300
|
||||
Subject: [PATCH] chore: update to Rust 1.91.0
|
||||
|
||||
---
|
||||
crates/turborepo-lib/src/cli/mod.rs | 27 +++---------
|
||||
crates/turborepo-lib/src/engine/builder.rs | 22 +++++-----
|
||||
crates/turborepo-lib/src/lib.rs | 1 -
|
||||
crates/turborepo-lib/src/turbo_json/mod.rs | 11 ++---
|
||||
.../turborepo-lib/src/turbo_json/validator.rs | 41 +++++++++----------
|
||||
crates/turborepo-lockfiles/src/bun/mod.rs | 9 +---
|
||||
crates/turborepo-vt100/src/attrs.rs | 9 +---
|
||||
crates/turborepo-vt100/src/screen.rs | 18 ++------
|
||||
packages/turbo-repository/scripts/build.sh | 2 +-
|
||||
rust-toolchain.toml | 2 +-
|
||||
10 files changed, 52 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/crates/turborepo-lib/src/cli/mod.rs b/crates/turborepo-lib/src/cli/mod.rs
|
||||
index 990edce842b7c..196f068e044a9 100644
|
||||
--- a/crates/turborepo-lib/src/cli/mod.rs
|
||||
+++ b/crates/turborepo-lib/src/cli/mod.rs
|
||||
@@ -48,9 +48,10 @@ const DEFAULT_NUM_WORKERS: u32 = 10;
|
||||
const SUPPORTED_GRAPH_FILE_EXTENSIONS: [&str; 8] =
|
||||
["svg", "png", "jpg", "pdf", "json", "html", "mermaid", "dot"];
|
||||
|
||||
-#[derive(Copy, Clone, Debug, PartialEq, Eq, ValueEnum, Deserializable, Serialize)]
|
||||
+#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, ValueEnum, Deserializable, Serialize)]
|
||||
pub enum OutputLogsMode {
|
||||
#[serde(rename = "full")]
|
||||
+ #[default]
|
||||
Full,
|
||||
#[serde(rename = "none")]
|
||||
None,
|
||||
@@ -62,12 +63,6 @@ pub enum OutputLogsMode {
|
||||
ErrorsOnly,
|
||||
}
|
||||
|
||||
-impl Default for OutputLogsMode {
|
||||
- fn default() -> Self {
|
||||
- Self::Full
|
||||
- }
|
||||
-}
|
||||
-
|
||||
impl Display for OutputLogsMode {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str(match self {
|
||||
@@ -92,9 +87,10 @@ impl From<OutputLogsMode> for turborepo_ui::tui::event::OutputLogs {
|
||||
}
|
||||
}
|
||||
|
||||
-#[derive(Copy, Clone, Debug, PartialEq, Serialize, ValueEnum, Deserialize, Eq)]
|
||||
+#[derive(Copy, Clone, Debug, Default, PartialEq, Serialize, ValueEnum, Deserialize, Eq)]
|
||||
pub enum LogOrder {
|
||||
#[serde(rename = "auto")]
|
||||
+ #[default]
|
||||
Auto,
|
||||
#[serde(rename = "stream")]
|
||||
Stream,
|
||||
@@ -102,12 +98,6 @@ pub enum LogOrder {
|
||||
Grouped,
|
||||
}
|
||||
|
||||
-impl Default for LogOrder {
|
||||
- fn default() -> Self {
|
||||
- Self::Auto
|
||||
- }
|
||||
-}
|
||||
-
|
||||
impl Display for LogOrder {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str(match self {
|
||||
@@ -1162,9 +1152,10 @@ impl RunArgs {
|
||||
}
|
||||
}
|
||||
|
||||
-#[derive(ValueEnum, Clone, Copy, Debug, PartialEq, Serialize)]
|
||||
+#[derive(ValueEnum, Clone, Copy, Debug, Default, PartialEq, Serialize)]
|
||||
pub enum LogPrefix {
|
||||
#[serde(rename = "auto")]
|
||||
+ #[default]
|
||||
Auto,
|
||||
#[serde(rename = "none")]
|
||||
None,
|
||||
@@ -1172,12 +1163,6 @@ pub enum LogPrefix {
|
||||
Task,
|
||||
}
|
||||
|
||||
-impl Default for LogPrefix {
|
||||
- fn default() -> Self {
|
||||
- Self::Auto
|
||||
- }
|
||||
-}
|
||||
-
|
||||
impl Display for LogPrefix {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
diff --git a/crates/turborepo-lib/src/engine/builder.rs b/crates/turborepo-lib/src/engine/builder.rs
|
||||
index 9bbda4115682d..66b3cb8b1aa14 100644
|
||||
--- a/crates/turborepo-lib/src/engine/builder.rs
|
||||
+++ b/crates/turborepo-lib/src/engine/builder.rs
|
||||
@@ -732,16 +732,18 @@ impl<'a> EngineBuilder<'a> {
|
||||
.load(package_name)
|
||||
.map(Some)
|
||||
.or_else(|err| {
|
||||
- if let Some((span, text)) = read_req.required()
|
||||
- && matches!(err, config::Error::NoTurboJSON)
|
||||
- {
|
||||
- Err(Error::MissingTurboJsonExtends(Box::new(
|
||||
- MissingTurboJsonExtends {
|
||||
- package_name: read_req.package_name().to_string(),
|
||||
- span,
|
||||
- text,
|
||||
- },
|
||||
- )))
|
||||
+ if let Some((span, text)) = read_req.required() {
|
||||
+ if matches!(err, config::Error::NoTurboJSON) {
|
||||
+ Err(Error::MissingTurboJsonExtends(Box::new(
|
||||
+ MissingTurboJsonExtends {
|
||||
+ package_name: read_req.package_name().to_string(),
|
||||
+ span,
|
||||
+ text,
|
||||
+ },
|
||||
+ )))
|
||||
+ } else {
|
||||
+ Err(err.into())
|
||||
+ }
|
||||
} else if matches!(err, config::Error::NoTurboJSON) {
|
||||
Ok(None)
|
||||
} else {
|
||||
diff --git a/crates/turborepo-lib/src/lib.rs b/crates/turborepo-lib/src/lib.rs
|
||||
index 5fcc430c94766..65b8ed29b9819 100644
|
||||
--- a/crates/turborepo-lib/src/lib.rs
|
||||
+++ b/crates/turborepo-lib/src/lib.rs
|
||||
@@ -4,7 +4,6 @@
|
||||
#![feature(once_cell_try)]
|
||||
#![feature(try_blocks)]
|
||||
#![feature(impl_trait_in_assoc_type)]
|
||||
-#![feature(let_chains)]
|
||||
#![deny(clippy::all)]
|
||||
// Clippy's needless mut lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11299
|
||||
#![allow(clippy::needless_pass_by_ref_mut)]
|
||||
diff --git a/crates/turborepo-lib/src/turbo_json/mod.rs b/crates/turborepo-lib/src/turbo_json/mod.rs
|
||||
index 5315d2a462643..9e4d781e0c99a 100644
|
||||
--- a/crates/turborepo-lib/src/turbo_json/mod.rs
|
||||
+++ b/crates/turborepo-lib/src/turbo_json/mod.rs
|
||||
@@ -99,10 +99,13 @@ impl DerefMut for Pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
-#[derive(Serialize, Deserialize, Debug, Copy, Clone, Deserializable, PartialEq, Eq, ValueEnum)]
|
||||
+#[derive(
|
||||
+ Serialize, Deserialize, Debug, Default, Copy, Clone, Deserializable, PartialEq, Eq, ValueEnum,
|
||||
+)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum UIMode {
|
||||
/// Use the terminal user interface
|
||||
+ #[default]
|
||||
Tui,
|
||||
/// Use the standard output stream
|
||||
Stream,
|
||||
@@ -110,12 +113,6 @@ pub enum UIMode {
|
||||
Web,
|
||||
}
|
||||
|
||||
-impl Default for UIMode {
|
||||
- fn default() -> Self {
|
||||
- Self::Tui
|
||||
- }
|
||||
-}
|
||||
-
|
||||
impl Display for UIMode {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
diff --git a/crates/turborepo-lib/src/turbo_json/validator.rs b/crates/turborepo-lib/src/turbo_json/validator.rs
|
||||
index 4ef1707ecaaf8..f15cf9d1f0d6a 100644
|
||||
--- a/crates/turborepo-lib/src/turbo_json/validator.rs
|
||||
+++ b/crates/turborepo-lib/src/turbo_json/validator.rs
|
||||
@@ -98,28 +98,27 @@ pub fn validate_extends(validator: &Validator, turbo_json: &TurboJson) -> Vec<Er
|
||||
text: NamedSource::new(path, text),
|
||||
}];
|
||||
}
|
||||
- if let Some(package_name) = turbo_json.extends.first()
|
||||
- && package_name != ROOT_PKG_NAME
|
||||
- && validator.non_root_extends
|
||||
- {
|
||||
- let path = turbo_json
|
||||
- .path
|
||||
- .as_ref()
|
||||
- .map_or("turbo.json", |p| p.as_ref());
|
||||
+ if let Some(package_name) = turbo_json.extends.first() {
|
||||
+ if package_name != ROOT_PKG_NAME && validator.non_root_extends {
|
||||
+ let path = turbo_json
|
||||
+ .path
|
||||
+ .as_ref()
|
||||
+ .map_or("turbo.json", |p| p.as_ref());
|
||||
|
||||
- let (span, text) = match turbo_json.text {
|
||||
- Some(ref text) => {
|
||||
- let len = text.len();
|
||||
- let span: SourceSpan = (0, len - 1).into();
|
||||
- (Some(span), text.to_string())
|
||||
- }
|
||||
- None => (None, String::new()),
|
||||
- };
|
||||
- // Root needs to be first
|
||||
- return vec![Error::ExtendsRootFirst {
|
||||
- span,
|
||||
- text: NamedSource::new(path, text),
|
||||
- }];
|
||||
+ let (span, text) = match turbo_json.text {
|
||||
+ Some(ref text) => {
|
||||
+ let len = text.len();
|
||||
+ let span: SourceSpan = (0, len - 1).into();
|
||||
+ (Some(span), text.to_string())
|
||||
+ }
|
||||
+ None => (None, String::new()),
|
||||
+ };
|
||||
+ // Root needs to be first
|
||||
+ return vec![Error::ExtendsRootFirst {
|
||||
+ span,
|
||||
+ text: NamedSource::new(path, text),
|
||||
+ }];
|
||||
+ }
|
||||
}
|
||||
// If we allow for non-root extends we don't need to perform this check
|
||||
(!validator.non_root_extends
|
||||
diff --git a/crates/turborepo-lockfiles/src/bun/mod.rs b/crates/turborepo-lockfiles/src/bun/mod.rs
|
||||
index 8df121b793e4c..7cd4b065ec2fe 100644
|
||||
--- a/crates/turborepo-lockfiles/src/bun/mod.rs
|
||||
+++ b/crates/turborepo-lockfiles/src/bun/mod.rs
|
||||
@@ -115,9 +115,10 @@ type BTreeSet<T> = std::collections::BTreeSet<T>;
|
||||
|
||||
/// Represents a platform constraint that can be either inclusive or exclusive.
|
||||
/// This matches Bun's Negatable type for os/cpu/libc fields.
|
||||
-#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
+#[derive(Debug, Default, Clone, PartialEq, Eq)]
|
||||
pub enum Negatable {
|
||||
/// No constraint - package works on all platforms
|
||||
+ #[default]
|
||||
None,
|
||||
/// Single platform constraint
|
||||
Single(String),
|
||||
@@ -127,12 +128,6 @@ pub enum Negatable {
|
||||
Negated(Vec<String>),
|
||||
}
|
||||
|
||||
-impl Default for Negatable {
|
||||
- fn default() -> Self {
|
||||
- Self::None
|
||||
- }
|
||||
-}
|
||||
-
|
||||
impl Serialize for Negatable {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
diff --git a/crates/turborepo-vt100/src/attrs.rs b/crates/turborepo-vt100/src/attrs.rs
|
||||
index e5ee3fbac20e9..d48a5adc5ea46 100644
|
||||
--- a/crates/turborepo-vt100/src/attrs.rs
|
||||
+++ b/crates/turborepo-vt100/src/attrs.rs
|
||||
@@ -1,9 +1,10 @@
|
||||
use crate::term::BufWrite as _;
|
||||
|
||||
/// Represents a foreground or background color for cells.
|
||||
-#[derive(Eq, PartialEq, Debug, Copy, Clone)]
|
||||
+#[derive(Eq, PartialEq, Debug, Default, Copy, Clone)]
|
||||
pub enum Color {
|
||||
/// The default terminal color.
|
||||
+ #[default]
|
||||
Default,
|
||||
|
||||
/// An indexed terminal color.
|
||||
@@ -13,12 +14,6 @@ pub enum Color {
|
||||
Rgb(u8, u8, u8),
|
||||
}
|
||||
|
||||
-impl Default for Color {
|
||||
- fn default() -> Self {
|
||||
- Self::Default
|
||||
- }
|
||||
-}
|
||||
-
|
||||
const TEXT_MODE_BOLD: u8 = 0b0000_0001;
|
||||
const TEXT_MODE_ITALIC: u8 = 0b0000_0010;
|
||||
const TEXT_MODE_UNDERLINE: u8 = 0b0000_0100;
|
||||
diff --git a/crates/turborepo-vt100/src/screen.rs b/crates/turborepo-vt100/src/screen.rs
|
||||
index 29ecb76cd022e..a3618f085060f 100644
|
||||
--- a/crates/turborepo-vt100/src/screen.rs
|
||||
+++ b/crates/turborepo-vt100/src/screen.rs
|
||||
@@ -8,9 +8,10 @@ const MODE_ALTERNATE_SCREEN: u8 = 0b0000_1000;
|
||||
const MODE_BRACKETED_PASTE: u8 = 0b0001_0000;
|
||||
|
||||
/// The xterm mouse handling mode currently in use.
|
||||
-#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
+#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
|
||||
pub enum MouseProtocolMode {
|
||||
/// Mouse handling is disabled.
|
||||
+ #[default]
|
||||
None,
|
||||
|
||||
/// Mouse button events should be reported on button press. Also known as
|
||||
@@ -34,16 +35,11 @@ pub enum MouseProtocolMode {
|
||||
// DecLocator,
|
||||
}
|
||||
|
||||
-impl Default for MouseProtocolMode {
|
||||
- fn default() -> Self {
|
||||
- Self::None
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/// The encoding to use for the enabled `MouseProtocolMode`.
|
||||
-#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
+#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
|
||||
pub enum MouseProtocolEncoding {
|
||||
/// Default single-printable-byte encoding.
|
||||
+ #[default]
|
||||
Default,
|
||||
|
||||
/// UTF-8-based encoding.
|
||||
@@ -54,12 +50,6 @@ pub enum MouseProtocolEncoding {
|
||||
// Urxvt,
|
||||
}
|
||||
|
||||
-impl Default for MouseProtocolEncoding {
|
||||
- fn default() -> Self {
|
||||
- Self::Default
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/// Represents the overall terminal state.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Screen {
|
||||
diff --git a/packages/turbo-repository/scripts/build.sh b/packages/turbo-repository/scripts/build.sh
|
||||
index 3b646e39429b0..addfc8d4ab2e0 100755
|
||||
--- a/packages/turbo-repository/scripts/build.sh
|
||||
+++ b/packages/turbo-repository/scripts/build.sh
|
||||
@@ -13,7 +13,7 @@ script_provided_flags="\
|
||||
for flag in $user_provided_flags; do
|
||||
if [[ $flag == --target=* ]]; then
|
||||
target=${flag#*=}
|
||||
- rustup toolchain install nightly-2025-06-20 --target "$target"
|
||||
+ rustup toolchain install nightly-2025-09-12 --target "$target"
|
||||
|
||||
# For we need to cross-compile some targets with Zig
|
||||
# Fortunately, napi comes with a `--zig` flag
|
||||
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
|
||||
index a9117beca98fb..470f5c4d4836f 100644
|
||||
--- a/rust-toolchain.toml
|
||||
+++ b/rust-toolchain.toml
|
||||
@@ -1,5 +1,5 @@
|
||||
[toolchain]
|
||||
# Needs to be copied to `packages/turbo-repository/scripts/build.sh`
|
||||
-channel = "nightly-2025-06-20"
|
||||
+channel = "nightly-2025-09-12"
|
||||
components = ["rustfmt", "clippy"]
|
||||
profile = "minimal"
|
||||
Reference in New Issue
Block a user