typst / hayagriva

Rusty bibliography management.
Apache License 2.0
347 stars 54 forks source link

Hayagriva 0.7 breaks due to MaybeTyped #227

Closed ironupiwada closed 1 month ago

ironupiwada commented 1 month ago

The latest main release of typst, featuring Hayagriva 0.7, encounters errors whenever it attempts to load unused YAML entries. This issue did not occur in Hayagriva 0.6, suggesting a strong likelihood that the bug is related to the recent update in Hayagriva.

image

PgBiel commented 1 month ago

Hi, can you provide a minimal example? Thank you

ironupiwada commented 1 month ago

MWE test.typ

#lorem(3)@Aarseth_Badanie_2010

#bibliography("test.yaml", style: "uj.csl", title: none)

MWE test.yaml

Aarseth_Badanie_2010:
  type: chapter
  title: 'Badanie zabawy: metodologia analizy gier'
  author: Aarseth, Espen
  date: 2010
  editor: Filiciak, Mirosław
  affiliated:
    names: Filiciak, Mirosław
    role: translator
  page-range: 13–37
  parent:
    type: book
    title: Światy z pikseli. Antologia studiów nad grami komputerowymi
    publisher: Wydawnictwo SWPS Academica
    location: Warszawa
Aarseth_Cybertekst_2014:
  type: book
  title: 'Cybertekst. Spojrzenie na literaturę ergodyczną'
  author: Aarseth, Espen
  date: 2014
  affiliated:
    names:
    - Pisarski, Mateusz
    - Sikora, Dorota
    - Schreiber, Paweł
    - Tabaczyński, Michał
    role: translator
  publisher: Korporacja Ha!art – Miejskie Centrum Kultury w Bydgoszczy
  location: Kraków – Bydgoszcz
AAAnonymous_AventureMortevielle_1987:
  type: article
  title: 'Aventure: Le Manoir de Mortevielle'
  date: 1987-10
  page-range: 100
  parent:
    type: periodical
    title: Génération 4
    issue: 1

image

But if I remove page-range from the third entry (article), the MWE compiles correctly:

image

It appears that the problem lies with individual values of page-range.

reknih commented 1 month ago

Minimal example is this:

AAAnonymous_AventureMortevielle_1987:
  type: Book
  page-range: 100

Fix for Typst 0.12 inbound in #231