janestreet / janestreet/ppx_stable

Renaming fields

Open
#2 5 comments 0 reactions 0 assignees View on GitHub
forwarded-to-js-devs not-clear-what-next-step-is
Dominant language
OCaml
Stars
23
Forks
4
PR merge metrics
No merged PRs in 30d

Description

It would be nice to be able to write something like this:
```ocaml
type person = {
first : string;
last : string;
age : int;
}
type individual = {
given : string;
family : string;
age : int;
} [@@deriving stable_record ~version:person ~rename:[(given, first); (family, last)])
```

Contributor guide

Open the contributing guide

Research direction

Use the OCaml example with [@@deriving stable_record ...] as the starting case. Locate the stable_record deriving implementation and existing version-handling behavior, then verify that the given/family to first/last mappings compile and conversions work as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.