Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix postcss nitpicks #3077

Merged
merged 4 commits into from
Dec 19, 2022
Merged

Fix postcss nitpicks #3077

merged 4 commits into from
Dec 19, 2022

Conversation

jridgewell
Copy link
Contributor

@jridgewell jridgewell commented Dec 19, 2022

Re: #3065

It also fixes the gnarly stack trace error whenever the node code throws, but it doesn't look very pretty. Not sure how to handle it:

Screen Shot 2022-12-19 at 3 46 56 PM

@jridgewell jridgewell requested a review from a team as a code owner December 19, 2022 20:43
@vercel
Copy link

vercel bot commented Dec 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
examples-cra-web 🔄 Building (Inspect) Dec 19, 2022 at 9:25PM (UTC)
7 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Dec 19, 2022 at 9:25PM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Dec 19, 2022 at 9:25PM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Dec 19, 2022 at 9:25PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Dec 19, 2022 at 9:25PM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Dec 19, 2022 at 9:25PM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Dec 19, 2022 at 9:25PM (UTC)
turbo-site ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2022 at 9:25PM (UTC)

@@ -186,12 +186,11 @@ impl Asset for PostCssTransformedAsset {
)
.await?;
let JavaScriptValue::Value(val) = &*config_value else {
bail!("Expected a value from PostCSS transform");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't want this error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will lead to the same Rust stacktrace leaking out. I figure it's better to use the original CSS to allow the dev server to start up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-12-19 at 4 06 07 PM

@jridgewell jridgewell added the pr: automerge Kodiak will merge these automatically after checks pass label Dec 19, 2022
@@ -191,8 +191,7 @@
// an external module we don't provide a shim for (e.g. querystring, url).
// For now, we fail semi-silently, but in the future this should be a
// compilation error.
console.error(`Failed to load external module ${id}: ${err}`);
return undefined;
throw new Error(`Failed to load external module ${id}: ${err}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a reason behind that. See comment. Maybe @alexkirsz knows more?
If we remove that we should also remove the comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the comment is about providing a better UX during compilation?

As for the runtime UX, it "semi-silently" fails meaning that as soon as you try to use the return value, you lose the real reason for the error happening. I think loudly failing provides a better experience.

@github-actions
Copy link
Contributor

🟢 CI successful 🟢

Thanks

@kodiakhq kodiakhq bot merged commit eb69e7d into main Dec 19, 2022
@kodiakhq kodiakhq bot deleted the jrl-postcss-nitpicks branch December 19, 2022 22:29
@github-actions
Copy link
Contributor

Benchmark for d5e0379

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack RSC/1000 modules 834.00ms ± 12.89ms 785.74ms ± 9.67ms -5.79% -0.39%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 7916.86µs ± 55.40µs 7878.90µs ± 44.94µs -0.48%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8136.48µs ± 55.84µs 8147.01µs ± 39.83µs +0.13%
bench_hmr_to_commit/Turbopack RSC/1000 modules 834.00ms ± 12.89ms 785.74ms ± 9.67ms -5.79% -0.39%
bench_hmr_to_commit/Turbopack SSR/1000 modules 7980.40µs ± 33.26µs 7894.36µs ± 63.71µs -1.08%
bench_hmr_to_eval/Turbopack CSR/1000 modules 6927.08µs ± 34.94µs 6958.10µs ± 54.69µs +0.45%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7042.83µs ± 57.67µs 7058.94µs ± 55.00µs +0.23%
bench_hmr_to_eval/Turbopack SSR/1000 modules 6981.79µs ± 91.18µs 6964.14µs ± 82.14µs -0.25%
bench_hydration/Turbopack RCC/1000 modules 3781.57ms ± 39.92ms 3820.38ms ± 20.13ms +1.03%
bench_hydration/Turbopack RSC/1000 modules 2940.95ms ± 33.36ms 2957.50ms ± 50.68ms +0.56%
bench_hydration/Turbopack SSR/1000 modules 3212.92ms ± 17.42ms 3239.49ms ± 16.67ms +0.83%
bench_startup/Turbopack CSR/1000 modules 1752.89ms ± 10.93ms 1744.45ms ± 10.84ms -0.48%
bench_startup/Turbopack RCC/1000 modules 2977.94ms ± 21.05ms 3024.63ms ± 14.70ms +1.57%
bench_startup/Turbopack RSC/1000 modules 2654.19ms ± 45.55ms 2543.96ms ± 37.22ms -4.15%
bench_startup/Turbopack SSR/1000 modules 2629.98ms ± 22.44ms 2668.44ms ± 18.71ms +1.46%

jridgewell added a commit to vercel/next.js that referenced this pull request Mar 10, 2023
Re: vercel/turbo#3065

It also fixes the gnarly stack trace error whenever the node code throws, but it doesn't look very pretty. Not sure how to handle it:

<img width="1280" alt="Screen Shot 2022-12-19 at 3 46 56 PM" src="https://user-images.githubusercontent.com/112982/208519095-ec7ad539-5c23-4b95-bcc1-71ba30381e60.png">
sokra pushed a commit to vercel/next.js that referenced this pull request Mar 13, 2023
Re: vercel/turbo#3065

It also fixes the gnarly stack trace error whenever the node code throws, but it doesn't look very pretty. Not sure how to handle it:

<img width="1280" alt="Screen Shot 2022-12-19 at 3 46 56 PM" src="https://user-images.githubusercontent.com/112982/208519095-ec7ad539-5c23-4b95-bcc1-71ba30381e60.png">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants