Unverified Commit 3e1bdb42 authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

[turbopack] Remove the `issue_path` feature and related functionality (#83920)

This has been disabled for a long time and is superceeded by ImportTraces
parent 7cc4990f
......@@ -16,7 +16,8 @@ use turbo_tasks_fs::FileContent;
use turbopack_core::{
diagnostics::{Diagnostic, DiagnosticContextExt, PlainDiagnostic},
issue::{
IssueDescriptionExt, IssueSeverity, PlainIssue, PlainIssueSource, PlainSource, StyledString,
CollectibleIssuesExt, IssueSeverity, PlainIssue, PlainIssueSource, PlainSource,
StyledString,
},
source_pos::SourcePos,
};
......@@ -101,7 +102,7 @@ pub fn root_task_dispose(
}
pub async fn get_issues<T: Send>(source: OperationVc<T>) -> Result<Arc<Vec<ReadRef<PlainIssue>>>> {
let issues = source.peek_issues_with_path().await?;
let issues = source.peek_issues().await?;
Ok(Arc::new(issues.get_plain_issues().await?))
}
......
......@@ -5,7 +5,7 @@ use turbo_tasks::{
CollectiblesSource, FxIndexMap, NonLocalValue, OperationValue, OperationVc, ResolvedVc,
TaskInput, Vc, debug::ValueDebugFormat, get_effects, trace::TraceRawVcs,
};
use turbopack_core::{diagnostics::Diagnostic, issue::IssueDescriptionExt};
use turbopack_core::{diagnostics::Diagnostic, issue::CollectibleIssuesExt};
use crate::{
entrypoints::Entrypoints,
......@@ -38,7 +38,7 @@ async fn entrypoints_without_collectibles_operation(
) -> Result<Vc<Entrypoints>> {
let _ = entrypoints.resolve_strongly_consistent().await?;
let _ = entrypoints.take_collectibles::<Box<dyn Diagnostic>>();
let _ = entrypoints.take_issues_with_path().await?;
let _ = entrypoints.take_issues().await?;
let _ = get_effects(entrypoints).await?;
Ok(entrypoints.connect())
}
......
......@@ -58,7 +58,7 @@ use turbopack_core::{
file_source::FileSource,
ident::Layer,
issue::{
Issue, IssueDescriptionExt, IssueExt, IssueSeverity, IssueStage, OptionStyledString,
CollectibleIssuesExt, Issue, IssueExt, IssueSeverity, IssueStage, OptionStyledString,
StyledString,
},
module::Module,
......@@ -960,7 +960,7 @@ impl Project {
async move {
let module_graphs_op = whole_app_module_graph_operation(self);
let module_graphs_vc = module_graphs_op.resolve_strongly_consistent().await?;
let _ = module_graphs_op.take_issues_with_path().await?;
let _ = module_graphs_op.take_issues().await?;
// At this point all modules have been computed and we can get rid of the node.js
// process pools
......
......@@ -12,11 +12,11 @@ use crossterm::style::{StyledContent, Stylize};
use owo_colors::{OwoColorize as _, Style};
use rustc_hash::{FxHashMap, FxHashSet};
use turbo_rcstr::RcStr;
use turbo_tasks::{RawVc, ReadRef, TransientInstance, TransientValue, Vc};
use turbo_tasks::{RawVc, TransientInstance, TransientValue, Vc};
use turbo_tasks_fs::{FileLinesContent, source_context::get_source_context};
use turbopack_core::issue::{
CapturedIssues, IssueReporter, IssueSeverity, PlainIssue, PlainIssueProcessingPathItem,
PlainIssueSource, PlainTraceItem, StyledString,
CapturedIssues, IssueReporter, IssueSeverity, PlainIssue, PlainIssueSource, PlainTraceItem,
StyledString,
};
use crate::source_context::format_source_context_lines;
......@@ -44,39 +44,6 @@ fn format_source_content(source: &PlainIssueSource, formatted_issue: &mut String
}
}
fn format_optional_path(
path: &Option<Vec<ReadRef<PlainIssueProcessingPathItem>>>,
formatted_issue: &mut String,
) -> Result<()> {
if let Some(path) = path {
let mut last_context = None;
for item in path.iter().rev() {
let PlainIssueProcessingPathItem {
file_path: ref context,
ref description,
} = **item;
if let Some(context) = context {
let option_context = Some(context.clone());
if last_context == option_context {
writeln!(formatted_issue, " at {description}")?;
} else {
writeln!(
formatted_issue,
" at {} ({})",
context.to_string().bright_blue(),
description
)?;
last_context = option_context;
}
} else {
writeln!(formatted_issue, " at {description}")?;
last_context = None;
}
}
}
Ok(())
}
pub fn format_issue(
plain_issue: &PlainIssue,
path: Option<String>,
......@@ -435,7 +402,6 @@ impl IssueReporter for ConsoleUi {
let context_path =
make_relative_to_cwd(&plain_issue.file_path, project_dir, current_dir);
let stage = plain_issue.stage.to_string();
let processing_path = &*plain_issue.processing_path;
let severity_map = grouped_issues.entry(severity).or_default();
let category_map = severity_map.entry(stage.clone()).or_default();
let issues = category_map.entry(context_path.to_string()).or_default();
......@@ -462,7 +428,6 @@ impl IssueReporter for ConsoleUi {
if !documentation_link.is_empty() {
writeln!(&mut styled_issue, "\ndocumentation: {documentation_link}")?;
}
format_optional_path(processing_path, &mut styled_issue)?;
}
issues.push(styled_issue);
}
......
......@@ -54,4 +54,3 @@ turbo-tasks-backend = { workspace = true }
[features]
default = []
issue_path = []
......@@ -4,7 +4,7 @@ pub mod module;
pub mod resolve;
use std::{
cmp::{Ordering, min},
cmp::min,
fmt::{Display, Formatter},
};
......@@ -196,154 +196,6 @@ impl ValueDefault for ImportTraces {
}
}
#[turbo_tasks::value_trait]
trait IssueProcessingPath {
#[turbo_tasks::function]
fn shortest_path(
self: Vc<Self>,
issue: Vc<Box<dyn Issue>>,
) -> Vc<OptionIssueProcessingPathItems>;
}
#[turbo_tasks::value]
pub struct IssueProcessingPathItem {
pub file_path: Option<FileSystemPath>,
pub description: ResolvedVc<RcStr>,
}
#[turbo_tasks::value_impl]
impl ValueToString for IssueProcessingPathItem {
#[turbo_tasks::function]
async fn to_string(&self) -> Result<Vc<RcStr>> {
if let Some(context) = &self.file_path {
let description_str = self.description.await?;
Ok(Vc::cell(
format!("{} ({})", context.value_to_string().await?, description_str).into(),
))
} else {
Ok(*self.description)
}
}
}
#[turbo_tasks::value_impl]
impl IssueProcessingPathItem {
#[turbo_tasks::function]
pub async fn into_plain(&self) -> Result<Vc<PlainIssueProcessingPathItem>> {
Ok(PlainIssueProcessingPathItem {
file_path: if let Some(context) = &self.file_path {
Some(context.value_to_string().await?)
} else {
None
},
description: self.description.await?,
}
.cell())
}
}
#[turbo_tasks::value(transparent)]
pub struct OptionIssueProcessingPathItems(Option<Vec<ResolvedVc<IssueProcessingPathItem>>>);
#[turbo_tasks::value_impl]
impl OptionIssueProcessingPathItems {
#[turbo_tasks::function]
pub fn none() -> Vc<Self> {
Vc::cell(None)
}
#[turbo_tasks::function]
pub async fn into_plain(self: Vc<Self>) -> Result<Vc<PlainIssueProcessingPath>> {
Ok(Vc::cell(if let Some(items) = &*self.await? {
Some(
items
.iter()
.map(|item| item.into_plain())
.try_join()
.await?,
)
} else {
None
}))
}
}
#[turbo_tasks::value]
struct RootIssueProcessingPath(ResolvedVc<Box<dyn Issue>>);
#[turbo_tasks::value_impl]
impl IssueProcessingPath for RootIssueProcessingPath {
#[turbo_tasks::function]
fn shortest_path(
&self,
issue: ResolvedVc<Box<dyn Issue>>,
) -> Vc<OptionIssueProcessingPathItems> {
if self.0 == issue {
Vc::cell(Some(Vec::new()))
} else {
Vc::cell(None)
}
}
}
#[turbo_tasks::value]
struct ItemIssueProcessingPath(
Option<ResolvedVc<IssueProcessingPathItem>>,
AutoSet<ResolvedVc<Box<dyn IssueProcessingPath>>>,
);
#[turbo_tasks::value_impl]
impl IssueProcessingPath for ItemIssueProcessingPath {
/// Returns the shortest path from the root issue to the given issue.
#[turbo_tasks::function]
async fn shortest_path(
&self,
issue: Vc<Box<dyn Issue>>,
) -> Result<Vc<OptionIssueProcessingPathItems>> {
assert!(!self.1.is_empty());
let paths = self
.1
.iter()
.map(|child| child.shortest_path(issue))
.collect::<Vec<_>>();
let paths = paths.iter().try_join().await?;
let mut shortest: Option<&Vec<_>> = None;
for path in paths.iter().filter_map(|p| p.as_ref()) {
if let Some(old) = shortest {
match old.len().cmp(&path.len()) {
Ordering::Greater => {
shortest = Some(path);
}
Ordering::Equal => {
let (mut a, mut b) = (old.iter(), path.iter());
while let (Some(a), Some(b)) = (a.next(), b.next()) {
let (a, b) = (a.to_string().await?, b.to_string().await?);
match RcStr::cmp(&*a, &*b) {
Ordering::Less => break,
Ordering::Greater => {
shortest = Some(path);
break;
}
Ordering::Equal => {}
}
}
}
Ordering::Less => {}
}
} else {
shortest = Some(path);
}
}
Ok(Vc::cell(shortest.map(|path| {
if let Some(item) = self.0 {
std::iter::once(item).chain(path.iter().copied()).collect()
} else {
path.clone()
}
})))
}
}
pub trait IssueExt {
fn emit(self);
}
......@@ -353,11 +205,7 @@ where
T: Upcast<Box<dyn Issue>>,
{
fn emit(self) {
let issue = ResolvedVc::upcast_non_strict::<Box<dyn Issue>>(self);
emit(issue);
emit(ResolvedVc::upcast::<Box<dyn IssueProcessingPath>>(
RootIssueProcessingPath::resolved_cell(RootIssueProcessingPath(issue)),
))
emit(ResolvedVc::upcast_non_strict::<Box<dyn Issue>>(self));
}
}
......@@ -365,13 +213,11 @@ where
pub struct Issues(Vec<ResolvedVc<Box<dyn Issue>>>);
/// A list of issues captured with [`Issue::peek_issues_with_path`] and
/// [`Issue::take_issues_with_path`].
/// [`Issue::take_issues`].
#[turbo_tasks::value(shared)]
#[derive(Debug)]
pub struct CapturedIssues {
issues: AutoSet<ResolvedVc<Box<dyn Issue>>>,
#[cfg(feature = "issue_path")]
processing_path: ResolvedVc<ItemIssueProcessingPath>,
tracer: ResolvedVc<DelegatingImportTracer>,
}
......@@ -405,13 +251,7 @@ impl CapturedIssues {
let mut list = self
.issues
.iter()
.map(|issue| async move {
#[cfg(feature = "issue_path")]
let processing_path = self.processing_path.shortest_path(**issue);
#[cfg(not(feature = "issue_path"))]
let processing_path = OptionIssueProcessingPathItems::none();
PlainIssue::from_issue(**issue, Some(*self.tracer), processing_path).await
})
.map(|issue| async move { PlainIssue::from_issue(**issue, Some(*self.tracer)).await })
.try_join()
.await?;
list.sort();
......@@ -823,7 +663,6 @@ pub struct PlainIssue {
pub documentation_link: RcStr,
pub source: Option<PlainIssueSource>,
pub processing_path: ReadRef<PlainIssueProcessingPath>,
pub import_traces: Vec<PlainTrace>,
}
......@@ -846,7 +685,6 @@ fn hash_plain_issue(issue: &PlainIssue, hasher: &mut Xxh3Hash64Hasher, full: boo
}
if full {
hasher.write_ref(&issue.processing_path);
hasher.write_ref(&issue.import_traces);
}
}
......@@ -875,7 +713,6 @@ impl PlainIssue {
pub async fn from_issue(
issue: ResolvedVc<Box<dyn Issue>>,
import_tracer: Option<ResolvedVc<DelegatingImportTracer>>,
processing_path: Vc<OptionIssueProcessingPathItems>,
) -> Result<Vc<Self>> {
let description: Option<StyledString> = match *issue.description().await? {
Some(description) => Some(description.owned().await?),
......@@ -904,7 +741,6 @@ impl PlainIssue {
None
}
},
processing_path: processing_path.into_plain().await?,
import_traces: match import_tracer {
Some(tracer) => {
into_plain_trace(
......@@ -954,17 +790,6 @@ impl PlainSource {
}
}
#[turbo_tasks::value(transparent, serialization = "none")]
#[derive(Clone, Debug, DeterministicHash, PartialOrd, Ord)]
pub struct PlainIssueProcessingPath(Option<Vec<ReadRef<PlainIssueProcessingPathItem>>>);
#[turbo_tasks::value(serialization = "none")]
#[derive(Clone, Debug, DeterministicHash, PartialOrd, Ord)]
pub struct PlainIssueProcessingPathItem {
pub file_path: Option<ReadRef<RcStr>>,
pub description: ReadRef<RcStr>,
}
#[turbo_tasks::value_trait]
pub trait IssueReporter {
/// Reports issues to the user (e.g. to stdio). Returns whether fatal
......@@ -973,7 +798,7 @@ pub trait IssueReporter {
/// # Arguments:
///
/// * `issues` - A [ReadRef] of [CapturedIssues]. Typically obtained with
/// `source.peek_issues_with_path()`.
/// `source.peek_issues()`.
/// * `source` - The root [Vc] from which issues are traced. Can be used by implementers to
/// determine which issues are new.
/// * `min_failing_severity` - The minimum Vc<[IssueSeverity]>
......@@ -988,129 +813,40 @@ pub trait IssueReporter {
}
#[async_trait]
pub trait IssueDescriptionExt
pub trait CollectibleIssuesExt
where
Self: Sized,
{
#[allow(unused_variables, reason = "behind feature flag")]
async fn attach_file_path(
self,
file_path: impl Into<Option<FileSystemPath>> + Send,
description: impl Into<String> + Send,
) -> Result<Self>;
#[allow(unused_variables, reason = "behind feature flag")]
async fn attach_description(self, description: impl Into<String> + Send) -> Result<Self>;
async fn issue_file_path(
self,
file_path: impl Into<Option<FileSystemPath>> + Send,
description: impl Into<String> + Send,
) -> Result<Self>;
async fn issue_description(self, description: impl Into<String> + Send) -> Result<Self>;
/// Returns all issues from `source` in a list with their associated
/// processing path.
async fn peek_issues_with_path(self) -> Result<CapturedIssues>;
async fn peek_issues(self) -> Result<CapturedIssues>;
/// Returns all issues from `source` in a list with their associated
/// processing path.
///
/// This unemits the issues. They will not propagate up.
async fn take_issues_with_path(self) -> Result<CapturedIssues>;
async fn take_issues(self) -> Result<CapturedIssues>;
}
#[async_trait]
impl<T> IssueDescriptionExt for T
impl<T> CollectibleIssuesExt for T
where
T: CollectiblesSource + Copy + Send,
{
#[allow(unused_variables, reason = "behind feature flag")]
async fn attach_file_path(
self,
file_path: impl Into<Option<FileSystemPath>> + Send,
description: impl Into<String> + Send,
) -> Result<Self> {
#[cfg(feature = "issue_path")]
{
let children = self.take_collectibles();
if !children.is_empty() {
emit(ResolvedVc::upcast::<Box<dyn IssueProcessingPath>>(
ItemIssueProcessingPath::resolved_cell(ItemIssueProcessingPath(
Some(IssueProcessingPathItem::resolved_cell(
IssueProcessingPathItem {
file_path: file_path.into(),
description: ResolvedVc::cell(RcStr::from(description.into())),
},
)),
children,
)),
));
}
}
Ok(self)
}
#[allow(unused_variables, reason = "behind feature flag")]
async fn attach_description(self, description: impl Into<String> + Send) -> Result<T> {
self.attach_file_path(None, description).await
}
async fn issue_file_path(
self,
file_path: impl Into<Option<FileSystemPath>> + Send,
description: impl Into<String> + Send,
) -> Result<Self> {
#[cfg(feature = "issue_path")]
{
let children = self.take_collectibles();
if !children.is_empty() {
emit(ResolvedVc::upcast::<Box<dyn IssueProcessingPath>>(
ItemIssueProcessingPath::resolved_cell(ItemIssueProcessingPath(
Some(IssueProcessingPathItem::resolved_cell(
IssueProcessingPathItem {
file_path: file_path.into(),
description: ResolvedVc::cell(RcStr::from(description.into())),
},
)),
children,
)),
));
}
}
#[cfg(not(feature = "issue_path"))]
{
let _ = (file_path, description);
}
Ok(self)
}
async fn issue_description(self, description: impl Into<String> + Send) -> Result<Self> {
self.issue_file_path(None, description).await
}
async fn peek_issues_with_path(self) -> Result<CapturedIssues> {
async fn peek_issues(self) -> Result<CapturedIssues> {
Ok(CapturedIssues {
issues: self.peek_collectibles(),
#[cfg(feature = "issue_path")]
processing_path: ItemIssueProcessingPath::resolved_cell(ItemIssueProcessingPath(
None,
self.peek_collectibles(),
)),
tracer: DelegatingImportTracer::resolved_cell(DelegatingImportTracer {
delegates: self.peek_collectibles(),
}),
})
}
async fn take_issues_with_path(self) -> Result<CapturedIssues> {
async fn take_issues(self) -> Result<CapturedIssues> {
Ok(CapturedIssues {
issues: self.take_collectibles(),
#[cfg(feature = "issue_path")]
processing_path: ItemIssueProcessingPath::resolved_cell(ItemIssueProcessingPath(
None,
self.take_collectibles(),
)),
tracer: DelegatingImportTracer::resolved_cell(DelegatingImportTracer {
delegates: self.take_collectibles(),
}),
......@@ -1127,7 +863,7 @@ pub async fn handle_issues<T: Send>(
) -> Result<()> {
let source_vc = source_op.connect();
let _ = source_op.resolve_strongly_consistent().await?;
let issues = source_op.peek_issues_with_path().await?;
let issues = source_op.peek_issues().await?;
let has_fatal = issue_reporter.report_issues(
TransientInstance::new(issues),
......
......@@ -2,10 +2,7 @@ use anyhow::Result;
use turbo_rcstr::{RcStr, rcstr};
use turbo_tasks::{ResolvedVc, Vc};
use turbo_tasks_fs::FileSystemPath;
use turbopack_core::{
introspect::{Introspectable, IntrospectableChildren},
issue::IssueDescriptionExt,
};
use turbopack_core::introspect::{Introspectable, IntrospectableChildren};
use super::{
ContentSource, ContentSourceContent, ContentSourceData, ContentSourceDataVary, ContentSources,
......@@ -55,10 +52,7 @@ impl ContentSource for IssueFilePathContentSource {
#[turbo_tasks::function]
async fn get_routes(self: ResolvedVc<Self>) -> Result<Vc<RouteTree>> {
let this = self.await?;
let routes = content_source_get_routes_operation(this.source)
.issue_file_path(this.file_path.clone(), &*this.description)
.await?
.connect();
let routes = this.source.get_routes();
Ok(routes.map_routes(Vc::upcast(
IssueContextContentSourceMapper { source: self }.cell(),
)))
......@@ -70,13 +64,6 @@ impl ContentSource for IssueFilePathContentSource {
}
}
#[turbo_tasks::function(operation)]
fn content_source_get_routes_operation(
source: ResolvedVc<Box<dyn ContentSource>>,
) -> Vc<RouteTree> {
source.get_routes()
}
#[turbo_tasks::value]
struct IssueContextContentSourceMapper {
source: ResolvedVc<IssueFilePathContentSource>,
......@@ -109,41 +96,15 @@ struct IssueContextGetContentSourceContent {
impl GetContentSourceContent for IssueContextGetContentSourceContent {
#[turbo_tasks::function]
async fn vary(&self) -> Result<Vc<ContentSourceDataVary>> {
let source = self.source.await?;
Ok(get_content_source_vary_operation(self.get_content)
.issue_file_path(source.file_path.clone(), &*source.description)
.await?
.connect())
Ok(self.get_content.vary())
}
#[turbo_tasks::function]
async fn get(&self, path: RcStr, data: ContentSourceData) -> Result<Vc<ContentSourceContent>> {
let source = self.source.await?;
Ok(
get_content_source_get_operation(self.get_content, path, data)
.issue_file_path(source.file_path.clone(), &*source.description)
.await?
.connect(),
)
Ok(self.get_content.get(path, data))
}
}
#[turbo_tasks::function(operation)]
fn get_content_source_vary_operation(
get_content: ResolvedVc<Box<dyn GetContentSourceContent>>,
) -> Vc<ContentSourceDataVary> {
get_content.vary()
}
#[turbo_tasks::function(operation)]
fn get_content_source_get_operation(
get_content: ResolvedVc<Box<dyn GetContentSourceContent>>,
path: RcStr,
data: ContentSourceData,
) -> Vc<ContentSourceContent> {
get_content.get(path, data)
}
#[turbo_tasks::value_impl]
impl Introspectable for IssueFilePathContentSource {
#[turbo_tasks::function]
......
......@@ -14,8 +14,8 @@ use turbo_tasks_fs::{FileSystem, FileSystemPath};
use turbopack_core::{
error::PrettyPrintError,
issue::{
Issue, IssueDescriptionExt, IssueSeverity, IssueStage, OptionIssueProcessingPathItems,
OptionStyledString, PlainIssue, StyledString,
CollectibleIssuesExt, Issue, IssueSeverity, IssueStage, OptionStyledString, PlainIssue,
StyledString,
},
server_fs::ServerFileSystem,
version::{
......@@ -88,7 +88,7 @@ impl GetContentFn {
}
async fn peek_issues<T: Send>(source: OperationVc<T>) -> Result<Vec<ReadRef<PlainIssue>>> {
let captured = source.peek_issues_with_path().await?;
let captured = source.peek_issues().await?;
captured.get_plain_issues().await
}
......@@ -137,7 +137,6 @@ async fn get_update_stream_item_operation(
.cell(),
),
None,
OptionIssueProcessingPathItems::none(),
)
.await?,
);
......
......@@ -11,8 +11,8 @@ use turbopack_core::{
asset::{Asset, AssetContent},
ident::AssetIdent,
issue::{
Issue, IssueDescriptionExt, IssueExt, IssueSource, IssueStage, OptionIssueSource,
OptionStyledString, StyledString,
Issue, IssueExt, IssueSource, IssueStage, OptionIssueSource, OptionStyledString,
StyledString,
},
source::Source,
source_pos::SourcePos,
......@@ -117,22 +117,11 @@ impl Source for MdxTransformedAsset {
#[turbo_tasks::value_impl]
impl Asset for MdxTransformedAsset {
#[turbo_tasks::function]
async fn content(self: ResolvedVc<Self>) -> Result<Vc<AssetContent>> {
let this = self.await?;
Ok(*transform_process_operation(self)
.issue_file_path(this.source.ident().path().owned().await?, "MDX processing")
.await?
.connect()
.await?
.content)
async fn content(self: Vc<Self>) -> Result<Vc<AssetContent>> {
Ok(*self.process().await?.content)
}
}
#[turbo_tasks::function(operation)]
fn transform_process_operation(asset: ResolvedVc<MdxTransformedAsset>) -> Vc<MdxTransformResult> {
asset.process()
}
#[turbo_tasks::value_impl]
impl MdxTransformedAsset {
#[turbo_tasks::function]
......
......@@ -16,7 +16,6 @@ use turbopack_core::{
context::{AssetContext, ProcessResult},
file_source::FileSource,
ident::AssetIdent,
issue::IssueDescriptionExt,
reference_type::{EntryReferenceSubType, InnerAssets, ReferenceType},
resolve::{FindContextFileResult, find_context_file_or_package_key, options::ImportMapping},
source::Source,
......@@ -165,27 +164,11 @@ impl Source for PostCssTransformedAsset {
#[turbo_tasks::value_impl]
impl Asset for PostCssTransformedAsset {
#[turbo_tasks::function]
async fn content(self: ResolvedVc<Self>) -> Result<Vc<AssetContent>> {
let this = self.await?;
Ok(*transform_process_operation(self)
.issue_file_path(
this.source.ident().path().owned().await?,
"PostCSS processing",
)
.await?
.connect()
.await?
.content)
async fn content(self: Vc<Self>) -> Result<Vc<AssetContent>> {
Ok(*self.process().await?.content)
}
}
#[turbo_tasks::function(operation)]
fn transform_process_operation(
asset: ResolvedVc<PostCssTransformedAsset>,
) -> Vc<ProcessPostCssResult> {
asset.process()
}
#[turbo_tasks::value]
struct ProcessPostCssResult {
content: ResolvedVc<AssetContent>,
......
......@@ -33,7 +33,7 @@ turbo-tasks-fs = { workspace = true }
turbo-tasks-backend = { workspace = true }
turbo-unix-path = { workspace = true }
turbopack-browser = { workspace = true, features = ["test"] }
turbopack-core = { workspace = true, features = ["issue_path"] }
turbopack-core = { workspace = true }
turbopack-ecmascript-plugins = { workspace = true, features = [
"transform_emotion",
] }
......
......@@ -39,7 +39,7 @@ use turbopack_core::{
environment::{Environment, ExecutionEnvironment, NodeJsEnvironment},
file_source::FileSource,
ident::Layer,
issue::IssueDescriptionExt,
issue::CollectibleIssuesExt,
module_graph::{
ModuleGraph, chunk_group_info::ChunkGroupEntry, export_usage::compute_export_usage_info,
},
......@@ -563,7 +563,7 @@ async fn snapshot_issues(
let PreparedTest { path, .. } = &*prepared_test.await?;
let _ = run_result_op.resolve_strongly_consistent().await;
let captured_issues = run_result_op.peek_issues_with_path().await?;
let captured_issues = run_result_op.peek_issues().await?;
let plain_issues = captured_issues.get_plain_issues().await?;
......
......@@ -41,7 +41,7 @@ use turbopack_core::{
file_source::FileSource,
free_var_references,
ident::Layer,
issue::IssueDescriptionExt,
issue::CollectibleIssuesExt,
module::Module,
module_graph::{
ModuleGraph,
......@@ -217,7 +217,7 @@ async fn run(resource: PathBuf) -> Result<()> {
async fn run_inner_operation(resource: RcStr) -> Result<()> {
let out_op = run_test_operation(resource);
let out_vc = out_op.resolve_strongly_consistent().await?.owned().await?;
let captured_issues = out_op.peek_issues_with_path().await?;
let captured_issues = out_op.peek_issues().await?;
let plain_issues = captured_issues.get_plain_issues().await?;
......
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