You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I read somewhere, that Spans can work with arbitrary file formats and it is not limited to rust code. It would be cool to have an error, that when displayed does include the relevant code;
error: the file has to start with #EXTM3U
--> tests/example.m3u8:1:1
|
1 | #EXTM2U
| ^^^^^^^
|
The text was updated successfully, but these errors were encountered:
This is not possible afaik, because we do not want to emit the span as a compiler error and instead as a Spannable<String> that is attached to an error.
Therefore I started reimplementing the spanning as a separate crate, that will ideally be no_std and that supports to_string.
I would personally love to have span metadata (optionally?) for all parsed elements, not just from errors.
Motivation would be enabling code using this crate to support rendering diagnostics like:
error: the referenced media segment could not be retrieved
--> http://media.example.com/example.m3u8:7:1
|
7 | second.ts
| ^^^^^^^^^ HTTP 404
= note: 404 for URL http://media.example.com/second.ts
or
error: media segment duration descrepancy
--> tests/example.m3u8:7:1
|
6 | #EXTINF:9.009,
^^^^^ manifest declared duration is 9.009
7 | second.ts
| ^^^^^^^^^ but this segment's actual duration is 18.018
I think I read somewhere, that
Span
s can work with arbitrary file formats and it is not limited to rust code. It would be cool to have an error, that when displayed does include the relevant code;The text was updated successfully, but these errors were encountered: