Closed paoloricciuti closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
hn | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 30, 2023 5:39pm |
I'll try to close and reopen to trigger the deploy on vercel
Ok apparently it doesn't work just by this...I'll try to close it and open a new one
closes #496
This issue is due to the fact that the array of the diagnostics get's out of sync with the actual code for a brief moment. This usually it's not a huge problem because it get's recomputed moments later but it can be a problem when the error falls outside of the max length of source code.
To avoid this issue i've added a bundling promise inside the context that get's reassigned whenever a bundling process starts and resolved immediately after the new bundle has been assigned to the store. The diagnostic has also been transformed from an array that get's recalculated dynamically to an async function that awaits the bundling process. Finally instead of simply passing the diagnostics to neocodemirror we create a
linter
extension passing the aforementioned async function. Codemirror will call and await this function at each modification.A couple of points: