Skip to content

atdml: support <ocaml attr=...> on record fields, variant constructors, and payloads#498

Open
pedrobslisboa wants to merge 1 commit intoahrefs:masterfrom
pedrobslisboa:pedrolisboa/attr
Open

atdml: support <ocaml attr=...> on record fields, variant constructors, and payloads#498
pedrobslisboa wants to merge 1 commit intoahrefs:masterfrom
pedrobslisboa:pedrolisboa/attr

Conversation

@pedrobslisboa
Copy link
Copy Markdown

Add support for the ocaml attr annotation in three new positions in atdml: record fields, variant constructors, and variant payload types.

Type-definition-level attr ([@@attr]) was already supported; this extends it to the three remaining ATD positions.

Test plan:

  • New variant attr snapshot test covering constructor-level and payload-level attr
  • Existing attr snapshot test updated with a field-level attr example
  • Docs updated in doc/atdml-reference.rst and CHANGES.md

🤖 Generated with Claude Code

@mjambon
Copy link
Copy Markdown
Collaborator

mjambon commented Apr 16, 2026

Looks good to me, thanks! I fixed the merge conflict on the changelog.

@mjambon
Copy link
Copy Markdown
Collaborator

mjambon commented Apr 16, 2026

dlang.org is down, giving us an error on these lines:

# To get latest ldc version
source $(curl https://dlang.org/install.sh | bash -s ldc -a)
echo "source $(~/dlang/install.sh ldc -a)" >> "$BASH_ENV"

Looking into using the ubuntu package instead (#499)

@mjambon
Copy link
Copy Markdown
Collaborator

mjambon commented Apr 16, 2026

Hmm. I'll let you rebase against the master branch. It should solve the source: filename argument required error.

@pedrobslisboa pedrobslisboa force-pushed the pedrolisboa/attr branch 2 times, most recently from 8e3e781 to 1240e3a Compare April 22, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants