turbo: update to 2.5.8 (#25681)
This commit is contained in:
parent
48a70a7404
commit
cddfbf4547
@ -3,7 +3,7 @@
|
||||
_realname=turbo
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2.5.6
|
||||
pkgver=2.5.8
|
||||
pkgrel=1
|
||||
pkgdesc="Incremental bundler and build system optimized for JavaScript and TypeScript (mingw-w64)"
|
||||
arch=('any')
|
||||
@ -25,14 +25,17 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-rust"
|
||||
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")
|
||||
sha256sums=('dc5e3f12ed6d49cb3ea6cbfc765a86fdc71bd89a8a0f8aefce51cf69b8f06d3f'
|
||||
"zstd-sys-remove-statik.patch"
|
||||
"turbo-support-rust-1.90.patch")
|
||||
sha256sums=('98dedd7a1e6d99ce92346a74ec425ba375a6a08837553f3d2202deaab9ca4003'
|
||||
'c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa'
|
||||
'48f4900ceb02d3aaf9a1020f33d56629156e96759f456c0e7ca18bfcf910767b')
|
||||
'48f4900ceb02d3aaf9a1020f33d56629156e96759f456c0e7ca18bfcf910767b'
|
||||
'77f253b42353c299afa13bfbcd7d9a3a0832bc27533cd74a1d6ee98af40d62e7')
|
||||
|
||||
prepare() {
|
||||
cd turborepo
|
||||
|
||||
patch -Np1 -i ../turbo-support-rust-1.90.patch
|
||||
patch -d ../zstd-sys-2.0.10+zstd.1.5.6 -i ../zstd-sys-remove-statik.patch
|
||||
cat >> Cargo.toml <<END
|
||||
|
||||
|
||||
92
mingw-w64-turbo/turbo-support-rust-1.90.patch
Normal file
92
mingw-w64-turbo/turbo-support-rust-1.90.patch
Normal file
@ -0,0 +1,92 @@
|
||||
--- 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 {
|
||||
--- 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)]
|
||||
--- 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
|
||||
Loading…
x
Reference in New Issue
Block a user