29 Dec 2023 |
octylfractal | i'm not sure how it would help with that, streams don't expose any kind of pointer (because many streams aren't memory, e.g. files or sockets) | 02:29:54 |
kekronbekron | hmm, okie doke | 02:30:08 |
| // THIS IS AUTOGENERATED PERSON. joined the room. | 10:40:05 |
30 Dec 2023 |
| maddox09y joined the room. | 01:32:51 |
| iamipanda joined the room. | 07:44:24 |
| iamipanda changed their display name from _discord_252592497929224195 to iamipanda. | 07:44:24 |
iamipanda | Redacted or Malformed Event | 07:44:24 |
iamipanda | Redacted or Malformed Event | 07:45:40 |
1 Jan 2024 |
| maya changed their display name from maya#3516@37C3 to maya. | 21:42:37 |
4 Jan 2024 |
| brian_4242 joined the room. | 05:20:18 |
5 Jan 2024 |
octylfractal | uh, it shouldn't create a new decoder in the parent I think? but it will restart decoding each enum variant, that's just how enums work right now | 19:29:40 |
brind5461 | I add log in the record_decoder function and i confirm a new parent decoder is created for each sub enum try... | 19:31:34 |
octylfractal | oh, it might be because of NoSeek | 19:32:04 |
octylfractal | since it won't be able to reset back for the next variant | 19:32:17 |
octylfractal | can you make the record_decoder impl Seek ? | 19:32:32 |
brind5461 | Ok understood. I'll try to implement Seek. Not an easy task... | 19:33:10 |
brind5461 | Thanks for the tips, i'll let you know if this was the issue | 19:33:52 |
brind5461 | octylfractal it works! thanks | 21:33:04 |
7 Jan 2024 |
scanmountgoat | Is there a way to get the file and line number from the proc macro input on stable? binrw seems to do this using span for the backtraces, but I just get 0's for the line and column when I try it in my code. | 05:05:10 |
scanmountgoat | Is that what enables the output like "while parsing field in src/file.rs:42"? | 05:34:55 |
octylfractal | iirc yes | 05:35:38 |
snover | iirc binrw uses a specific version of proc-macro2 because those methods were stubbed out in later ones | 05:35:53 |
snover | but i think that was a nightly thing | 05:36:43 |
snover | but i see that is not in master so i think i forgot that something changed again | 05:38:16 |
snover | oh right i ended up hacking in some thing | 05:39:45 |
snover | scanmountgoat: https://github.com/jam1garner/binrw/blob/master/binrw_derive/src/binrw/backtrace/mod.rs#L202-L225 🥴 | 05:41:46 |
snover | * scanmountgoat: https://github.com/jam1garner/binrw/blob/master/binrw_derive/src/binrw/backtrace/mod.rs#L183-L225 🥴 | 05:42:19 |
snover | this could maybe do proc_macro_span check now instead or something i dunno whatever. but anyway, i dunno why dtolnay is ignoring the PRs to restore this | 05:43:41 |
scanmountgoat | Is the span only used for verbose-backtrace? | 05:45:33 |
snover | i mean spans are used in a lot of places but getting the line/column of span happens only here and when someone uses dbg directive | 05:47:43 |