rust-sourcemap icon indicating copy to clipboard operation
rust-sourcemap copied to clipboard

Turn `debug_id` field to `debugId`

Open lforst opened this issue 1 year ago • 2 comments

The relevant TC39 proposal proposes debug IDs to be in camelCase (debugId): https://github.com/tc39/source-map/blob/8be0fe10ad042e13f4196d17b44ddedfd6a9df58/proposals/debug-id.md?plain=1#L111

We probably need to figure out some sort of migration path or cut a major for this?

lforst avatar Nov 05 '24 08:11 lforst

At least for parsing/deserialization this shouldn't be a problem—we can change the serialized field name to debugId and keep debug_id as a serde::alias so it can still be read. But I guess it would still count as a breaking change because serialization behavior changes.

loewenheim avatar Nov 05 '24 09:11 loewenheim

At least for parsing/deserialization this shouldn't be a problem—we can change the serialized field name to debugId and keep debug_id as a serde::alias so it can still be read. But I guess it would still count as a breaking change because serialization behavior changes.

Fully agree. Versions are free so we should just be careful and do a major if we change it.

lforst avatar Nov 05 '24 09:11 lforst