perlun / perlun.eu.org

Personal blog site
http://perlun.eu.org
0 stars 0 forks source link

Make site be buildable with Python 3 #45

Open perlun opened 6 months ago

perlun commented 6 months ago

Quoting https://github.com/perlun/perlun.eu.org/issues/26#issuecomment-1879585426, which in turn takes this from https://github.com/perlun/perlun.eu.org/commit/81254d8116a105cacb7ad7e84f36dfbd25be3a05:

There is an annoying problem here:

  • The site depends on pygments.rb
  • Pygments.rb in turn, communicates with a Python process using a pipe (reading and writing to stdin/stdout from Python running as a child process)
  • The version of Pygments.rb we use (?) do not work with Python 3. Only Python 2 works.

Ubuntu 22.04 uses Python 3 by default (and this is perhaps the case with Ubuntu 20.04 also), which causes errors like the one seen in https://github.com/perlun/perlun.eu.org/actions/runs/5913115348/job/16037183000. Copying it here into the git commit log, since Github Actions logs are unfortunately not retained forever.

bundle exec jekyll build
      Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.
Configuration file: /home/runner/work/perlun.eu.org/perlun.eu.org/_config.yml
           Source: /home/runner/work/perlun.eu.org/perlun.eu.org
      Destination: /home/runner/work/perlun.eu.org/perlun.eu.org/_site
Incremental build: disabled. Enable with --incremental
     Generating...
Building site for default language: "xx" to: /home/runner/work/perlun.eu.org/perlun.eu.org/_site
Building site for language: "sv" to: /home/runner/work/perlun.eu.org/perlun.eu.org/_site/sv
Loading translation from file /home/runner/work/perlun.eu.org/perlun.eu.org/_i18n/sv.yml
Building site for language: "en" to: /home/runner/work/perlun.eu.org/perlun.eu.org/_site/en
  Conversion error: Jekyll::Converters::Markdown encountered an error while converting '_i18n/en/_posts/2017-03-17-new-features-in-c-sharp-6-0-and-7-0.md':
                    No header received back.
jekyll 3.9.2 | Error:  No header received back.

We need to make this work, by the next year at the very latest, since Ubuntu 20.04 is going EOL then. It's unclear if/when GitHub will drop support for it, but let's rest assured that it will happen sooner or later.

perlun commented 6 months ago

See these GitHub issues for some more details: