-
Notifications
You must be signed in to change notification settings - Fork 98
Description
What version of @astrojs/compiler are you using?
0.1.5 (rust-compiler)
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
For our monorepo, we switched to the new rust compiler. But for one of our Astro pages, it returned a really random error. Long story short: it turns out, that the rust compiler is not able to return Astro components in a try/catch, in the body of an Astro page. Very specific, I know, but appearently we have such a case in our codebase. I was able to reproduce the issue in a clean Astro project.
The error reports something completely different than what is actually going wrong (usually pointing to a line that has nothing to do with the actual error). Comment line 15 and uncomment line 16 to see the error disappear in the reproduction.
Link to Minimal Reproducible Example
https://github.com/Raanelom/astro-rust-compiler-trycatch-reproduction
P.S.: I wasn't able to create an issue for the compiler-rs branch, that's why I am creating the issue here. If we need to move this issue, let me know