Unverified Commit 3d3311b1 authored by Will Binns-Smith's avatar Will Binns-Smith Committed by GitHub

Update rust-toolchain to `nightly-2024-04-03` (#64048)

Depends on https://github.com/vercel/turbo/pull/7874, which should be
merged first.

Test Plan: `cargo check`


Closes PACK-2903
parent 710cf7c2
......@@ -230,11 +230,15 @@ jobs:
test-next-swc-napi-wasi:
name: test next-swc wasi
needs: ['changes', 'build-next']
if: ${{ needs.changes.outputs.docs-only == 'false' }}
# TODO: Re-enable this when https://github.com/napi-rs/napi-rs/issues/2009 is addressed.
# Specifically, the `platform` value is now `threads` in
# https://github.com/napi-rs/napi-rs/blob/e4ad4767efaf093fdff3dc768856f6100a6e3f72/cli/src/api/build.ts#L530
if: false
# if: ${{ needs.changes.outputs.docs-only == 'false' }}
uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: rustup target add wasm32-wasi-preview1-threads && turbo run build-native-wasi
afterBuild: rustup target add wasm32-wasip1-threads && turbo run build-native-wasi
stepName: 'test-next-swc-napi-wasi'
secrets: inherit
......
This diff is collapsed.
......@@ -37,11 +37,11 @@ swc_core = { version = "0.90.24", features = [
testing = { version = "0.35.21" }
# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240329.2" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240404.2" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240329.2" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240404.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240329.2" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240404.2" }
# General Deps
......@@ -105,6 +105,8 @@ owo-colors = "3.5.0"
parcel_selectors = "0.26.0"
parking_lot = "0.12.1"
pathdiff = "0.2.1"
# Temporary: Reference the latest git minor version of pathfinder_simd until it's published.
pathfinder_simd = "0.5.3"
pin-project-lite = "0.2.9"
postcard = "1.0.4"
predicates = "2.1.5"
......@@ -137,3 +139,6 @@ urlencoding = "2.1.2"
webbrowser = "0.8.7"
dhat = { version = "0.3.2" }
# Sync with the entries in turbo's Cargo.toml
[patch.crates-io]
pathfinder_simd = { git = "https://github.com/servo/pathfinder", rev = "30419d" }
......@@ -116,7 +116,7 @@ turbopack-binding = { workspace = true, features = [
] }
# wasi-only dependencies.
[target.wasm32-wasi-preview1-threads.dependencies]
[target.wasm32-wasip1-threads.dependencies]
# this requires tokio_unstable currently.
tokio = { workspace = true, features = ["full"] }
......
use std::{convert::TryFrom, path::PathBuf};
use std::path::PathBuf;
use anyhow::Context;
use napi::bindgen_prelude::*;
......
// TODO(alexkirsz) Remove once the diagnostic is fixed.
#![allow(rustc::untranslatable_diagnostic_trivial)]
#![feature(async_closure)]
#![feature(str_split_remainder)]
#![feature(impl_trait_in_assoc_type)]
......
use core::result::Result::Ok;
use anyhow::Result;
use indexmap::IndexMap;
use turbo_tasks::{Value, Vc};
......
......@@ -85,7 +85,6 @@ pub struct NextConfig {
pub output: Option<OutputType>,
pub analytics_id: Option<String>,
///
#[serde(rename = "_originalRedirects")]
pub original_redirects: Option<Vec<Redirect>>,
......@@ -864,10 +863,8 @@ impl NextConfig {
"{}/_next/",
if let Some(asset_prefix) = &this.asset_prefix {
asset_prefix
} else if let Some(base_path) = &this.base_path {
base_path
} else {
""
this.base_path.as_ref().map_or("", |b| b.as_str())
}
.trim_end_matches('/')
))))
......
......@@ -111,7 +111,7 @@ pub struct TransformOptions {
pub optimize_server_react: Option<crate::transforms::optimize_server_react::Config>,
}
pub fn custom_before_pass<'a, C: Comments + 'a>(
pub fn custom_before_pass<'a, C>(
cm: Arc<SourceMap>,
file: Arc<SourceFile>,
opts: &'a TransformOptions,
......@@ -120,7 +120,7 @@ pub fn custom_before_pass<'a, C: Comments + 'a>(
unresolved_mark: Mark,
) -> impl Fold + 'a
where
C: Clone,
C: Clone + Comments + 'a,
{
#[cfg(target_arch = "wasm32")]
let relay_plugin = noop();
......
......@@ -26,8 +26,6 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// TODO(alexkirsz) Remove once the diagnostic is fixed.
#![allow(rustc::untranslatable_diagnostic_trivial)]
#![recursion_limit = "2048"]
#![deny(clippy::all)]
#![feature(box_patterns)]
......
......@@ -13,12 +13,11 @@ impl<'a> Visit for FindFunctionsOutsideModuleScope<'a> {
noop_visit_type!();
fn visit_ident(&mut self, ident: &Ident) {
if self.state.font_functions.get(&ident.to_id()).is_some()
&& self
if self.state.font_functions.contains_key(&ident.to_id())
&& !self
.state
.font_functions_in_allowed_scope
.get(&ident.span.lo)
.is_none()
.contains(&ident.span.lo)
{
HANDLER.with(|handler| {
handler
......
......@@ -16,7 +16,7 @@ use turbopack_binding::swc::core::{
},
ecma::transforms::base::pass::noop,
};
use wasm_bindgen::{prelude::*, JsCast};
use wasm_bindgen::prelude::*;
use wasm_bindgen_futures::future_to_promise;
pub mod mdx;
......
......@@ -9,7 +9,7 @@
"build-native-no-plugin": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features image-webp --js false native",
"build-native-no-plugin-woa": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --cargo-flags=--no-default-features --features image-webp --js false native",
"build-native-no-plugin-woa-release": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --cargo-flags=--no-default-features --features image-webp,tracing/release_max_level_info --js false native",
"build-native-wasi": "npx --package=@napi-rs/cli@3.0.0-alpha.36 napi build --platform --target wasm32-wasi-preview1-threads -p next-swc-napi --cwd ../../ --output-dir packages/next-swc/native",
"build-native-wasi": "npx --package=@napi-rs/cli@3.0.0-alpha.45 napi build --platform --target wasm32-wasip1-threads -p next-swc-napi --cwd ../../ --output-dir packages/next-swc/native",
"build-wasm": "wasm-pack build crates/wasm --scope=next",
"cache-build-native": "echo $(ls native)",
"rust-check-fmt": "cd ../..; cargo fmt -- --check",
......@@ -28,7 +28,7 @@
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc",
"wasm32-wasi-preview1-threads"
"wasm32-wasip1-threads"
]
}
},
......
nightly-2023-11-16
nightly-2024-04-03
......@@ -68,7 +68,7 @@ fn main() {
let first_arg = args().nth(1).expect("Please provide a file name");
if let Ok(lines) = read_lines(first_arg) {
for json_to_parse in lines.flatten() {
for json_to_parse in lines.map_while(Result::ok) {
let v = match serde_json::from_str::<Vec<Value>>(&json_to_parse) {
Ok(v) => v
.into_iter()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment