linebender / linebender/norad

Serialization of Designspaces mangles lib

Open
#338 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
61
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I noticed that code like

serde_json::to_value(norad::designspace::DesignSpaceDocument::load(path).unwrap()).unwrap()

returned mangled libs, that look like

{array: {string: "_typoquote"}, dict: {dict: {key: "tH", string: "67"}, key: "F333AEC5-BB61-4D5E-9EDD-6124322D28F2"}, key: "public.skipExportGlyphs"}

when it should instead be https://gitlab.gnome.org/GNOME/cantarell-fonts/-/blob/cd2155cf5696082cc14706e0f93a9ad7a1b4dab1/src/Cantarell.designspace#L74-156. As in, it seems to mirror the verbatim plist structure of separate key and value elements. I don't understand why that happens...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the serde_json::to_value call on DesignSpaceDocument::load(path), using the Cantarell.designspace example linked in the report as the expected structure. Trace how the plist data is represented during serialization and compare the resulting value with the source; done means the serialized library metadata no longer mirrors separate key and value elements.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.