metanorma / metanorma-ogc

Metanorma processor for OGC documents
https://www.metanorma.com
BSD 2-Clause "Simplified" License
2 stars 3 forks source link

Fontist is possibly causing automated builds on GitHub Actions to crash #651

Closed ghobona closed 7 months ago

ghobona commented 7 months ago

Fontist appears to be causing automated builds on GitHub Actions to crash.

An example Actions log is https://github.com/opengeospatial/ogcna-auto-review/actions/runs/8521643842/job/23340220916

The Action script is https://github.com/opengeospatial/ogcna-auto-review/blob/main/.github/workflows/generate_20-058.yml

The following error message is reported each time the crash occurs:

/usr/local/bundle/gems/fontist-1.20.0/lib/fontist/font.rb:220:in `request_formula_installation': undefined method `each' for nil:NilClass (NoMethodError)

      paths.each do |path|
           ^^^^^
    from /usr/local/bundle/gems/fontist-1.20.0/lib/fontist/font.rb:207:in `block in download_font'
    from /usr/local/bundle/gems/fontist-1.20.0/lib/fontist/font.rb:206:in `each'

and also this error message:

/usr/local/bundle/gems/fontist-1.20.0/lib/fontist/indexes/base_index.rb:9:in `from_yaml': Please fetch formulas with `fontist update`. (Fontist::Errors::MainRepoNotFoundError)
    from /usr/local/bundle/gems/fontist-1.20.0/lib/fontist/formula.rb:82:in `find_by_font_file'
    from /usr/local/bundle/gems/fontist-1.20.0/lib/fontist/system_index.rb:217:in `override_font_props'
    from /usr/local/bundle/gems/fontist-1.20.0/lib/fontist/system_index.rb:213:in `parse_font'

Cc: @gbuehler

alexeymorozov commented 7 months ago

This particular build should work now (the Space Mono font is fixed) but the issue persists in general since Google Fonts changed its API significantly. I'm working on it here.

ghobona commented 7 months ago

I can confirm that the automated builds are now completing without the fontist issue.

Thanks @alexeymorozov and @ronaldtse for the fix.

@ronaldtse This Issue may now be closed.

ronaldtse commented 7 months ago

Thanks @ghobona for the report and the confirmation!