From fa5934d4909fbb1401e5fa8f4171e6910e5f3fdd Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 22 Mar 2023 22:05:44 +0000 Subject: [PATCH] update issue snapshotting --- .../next-dev-tests/tests/integration.rs | 14 +++++++++++-- .../Issue while running loader-714e8e.txt | 21 +++++++++++++++++++ .../Issue while running loader-8a9f82.txt | 21 +++++++++++++++++++ .../Issue while running loader-bc2d59.txt | 21 ------------------- .../Issue while running loader-f3d1e2.txt | 21 ------------------- 5 files changed, 54 insertions(+), 44 deletions(-) create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-714e8e.txt create mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-8a9f82.txt delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-bc2d59.txt delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-f3d1e2.txt diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration.rs b/packages/next-swc/crates/next-dev-tests/tests/integration.rs index 489a3e4311105..320bacad66262 100644 --- a/packages/next-swc/crates/next-dev-tests/tests/integration.rs +++ b/packages/next-swc/crates/next-dev-tests/tests/integration.rs @@ -564,9 +564,19 @@ impl Issue for NormalizedIssue { #[turbo_tasks::function] async fn description(&self) -> Result { let str = self.0.description().await?; - let regex = Regex::new(r"\n at (.+) \((.+)\)").unwrap(); + let regex1 = Regex::new(r"\n +at (.+) \((.+)\)(?: \[.+\])?").unwrap(); + let regex2 = Regex::new(r"\n +at ()(.+) \[.+\]").unwrap(); + let regex3 = Regex::new(r"\n +\[at .+\]").unwrap(); Ok(StringVc::cell( - regex.replace_all(&str, StackTraceReplacer).to_string(), + regex3 + .replace_all( + ®ex2.replace_all( + ®ex1.replace_all(&str, StackTraceReplacer), + StackTraceReplacer, + ), + "", + ) + .to_string(), )) } diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-714e8e.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-714e8e.txt new file mode 100644 index 0000000000000..e41880ad3ff52 --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-714e8e.txt @@ -0,0 +1,21 @@ +PlainIssue { + severity: Warning, + context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit", + category: "loaders", + title: "Issue while running loader", + description: "Error: Warning!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:45:31)", + detail: "", + documentation_link: "", + source: None, + sub_issues: [], + processing_path: Some( + [ + PlainIssueProcessingPathItem { + context: Some( + "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js", + ), + description: "Next.js pages directory", + }, + ], + ), +} \ No newline at end of file diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-8a9f82.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-8a9f82.txt new file mode 100644 index 0000000000000..af59834991732 --- /dev/null +++ b/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-8a9f82.txt @@ -0,0 +1,21 @@ +PlainIssue { + severity: Error, + context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit", + category: "loaders", + title: "Issue while running loader", + description: "Error: Error!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:45:31)", + detail: "", + documentation_link: "", + source: None, + sub_issues: [], + processing_path: Some( + [ + PlainIssueProcessingPathItem { + context: Some( + "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js", + ), + description: "Next.js pages directory", + }, + ], + ), +} \ No newline at end of file diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-bc2d59.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-bc2d59.txt deleted file mode 100644 index 457d39320c6e0..0000000000000 --- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-bc2d59.txt +++ /dev/null @@ -1,21 +0,0 @@ -PlainIssue { - severity: Warning, - context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit", - category: "loaders", - title: "Issue while running loader", - description: "Error: Warning!\n [at module.exports (WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/node_modules/emit-loader/index.js:2:20)]\n [at LOADER_EXECUTION (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4134)]\n [at runSyncOrAsync (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4145)]\n [at iterateNormalLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782)]\n [at /workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:5426]\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11) [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_transforms_webpack-loaders.ts_59baa9._.js:55:17]\n [at /workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:6160]\n [at processResource (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)]\n [at iteratePitchingLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)]\n [at iteratePitchingLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4764)]\n [at /workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4896]\n [at handleResult (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:1424)]\n [at loadLoader (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:963)]\n [at iteratePitchingLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4794)]\n [at runLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)]\n at /turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5 [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_transforms_webpack-loaders.ts_59baa9._.js:35:9]\n [at ]\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10) [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_transforms_webpack-loaders.ts_59baa9._.js:28:12]\n at /turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74 [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]__6b13f0._.js:13:230]\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:45:31) [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_ipc_evaluate.ts_7910c7._.js:174:45]\n [at process.processTicksAndRejections (node:internal/process/task_queues:95:5)]", - detail: "", - documentation_link: "", - source: None, - sub_issues: [], - processing_path: Some( - [ - PlainIssueProcessingPathItem { - context: Some( - "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js", - ), - description: "Next.js pages directory", - }, - ], - ), -} \ No newline at end of file diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-f3d1e2.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-f3d1e2.txt deleted file mode 100644 index 9a2f4346a2007..0000000000000 --- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/issues/Issue while running loader-f3d1e2.txt +++ /dev/null @@ -1,21 +0,0 @@ -PlainIssue { - severity: Error, - context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit", - category: "loaders", - title: "Issue while running loader", - description: "Error: Error!\n [at module.exports (WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/node_modules/emit-loader/index.js:4:18)]\n [at LOADER_EXECUTION (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4134)]\n [at runSyncOrAsync (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4145)]\n [at iterateNormalLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782)]\n [at /workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:5426]\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11) [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_transforms_webpack-loaders.ts_59baa9._.js:55:17]\n [at /workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:6160]\n [at processResource (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)]\n [at iteratePitchingLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)]\n [at iteratePitchingLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4764)]\n [at /workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4896]\n [at handleResult (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:1424)]\n [at loadLoader (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:963)]\n [at iteratePitchingLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:4794)]\n [at runLoaders (/workspaces/nextpack/next.js/packages/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)]\n at /turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5 [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_transforms_webpack-loaders.ts_59baa9._.js:35:9]\n [at ]\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10) [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_transforms_webpack-loaders.ts_59baa9._.js:28:12]\n at /turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74 [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]__6b13f0._.js:13:230]\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:45:31) [WORKSPACE_ROOT/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/chunks/webpack_loaders/[turbopack-node]_ipc_evaluate.ts_7910c7._.js:174:45]\n [at process.processTicksAndRejections (node:internal/process/task_queues:95:5)]", - detail: "", - documentation_link: "", - source: None, - sub_issues: [], - processing_path: Some( - [ - PlainIssueProcessingPathItem { - context: Some( - "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js", - ), - description: "Next.js pages directory", - }, - ], - ), -} \ No newline at end of file