Subject: [Tools-discuss] Error in kramdown-rfc2629 appearing suddenly?

From: Spencer Dawkins at IETF <[email-masked]>
Date: Fri, 21 May 2021 11:42:30 -0500

My apologies for asking here, and if there's a better place to ask (or even
to report problems), please let me know.

I'm running a new installation of Ubuntu 20.04 LTS, and I installed

   - XML2RFC using sudo apt install python3 python3-pip, then sudo pip3
   install xml2rfc
   - kramdown-rfc2629 using apt install ruby ruby-dev gem make, then sudo
   gem install kramdown-rfc2629

I am now getting this error using make from
https://github.com/martinthomson/i-d-template (in a couple of local repos,
so I don't think it's specific to my local repo).

cat draft-ietf-mops-streaming-opcons.md  | kramdown-rfc2629 --v3 |
lib/add-note.py | xml2rfc -q --cache=/home/spencer/.cache/xml2rfc --v2v3
/dev/stdin -o draft-ietf-mops-streaming-opcons.xml
 Traceback (most recent call last):

                      5: from /usr/local/bin/kramdown-rfc2629:23:in
`<main>'
                      4: from /usr/local/bin/kramdown-rfc2629:23:in `load'

                      3: from
/var/lib/gems/2.7.0/gems/kramdown-rfc2629-1.4.12/bin/kramdown-rfc2629:394:in
`<top (required)>'
                      2: from
/var/lib/gems/2.7.0/gems/kramdown-rfc2629-1.4.12/bin/kramdown-rfc2629:125:in
`xml_from_sections'
                      1: from
/var/lib/gems/2.7.0/gems/kramdown-rfc2629-1.4.12/bin/kramdown-rfc2629:94:in
`yaml_load'
/var/lib/gems/2.7.0/gems/psych-4.0.0/lib/psych.rb:322:in `safe_load': wrong
number of arguments (given 4, expected 1) (ArgumentError)

Error: Unable to parse the XML document: /dev/stdin

make: *** [lib/main.mk:69: draft-ietf-mops-streaming-opcons.xml] Error 1

I think it's coming from kramdown-rfc2629, so that's why I'm asking here.

I've deleted and re-cloned my repo, so any problems there would be visible
at

I'm sure I'm doing something obviously wrong, but I've been doing pretty
much the same thing for a couple of years, so ...

Best,

Spencer

---

From: Spencer Dawkins at IETF <[email-masked]>
Date: Fri, 21 May 2021 12:16:37 -0500

And actually, I now see that this probably goes to ietf-action - sorry for
intruding!

Spencer

On Fri, May 21, 2021 at 11:42 AM Spencer Dawkins at IETF <
[email-masked]> wrote:

> My apologies for asking here, and if there's a better place to ask (or
> even to report problems), please let me know.
>
> https://github.com/martinthomson/i-d-template (in a couple of local
> repos, so I don't think it's specific to my local repo).
>
> /var/lib/gems/2.7.0/gems/psych-4.0.0/lib/psych.rb:322:in `safe_load':
> wrong number of arguments (given 4, expected 1) (ArgumentError)
>

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 21 May 2021 20:24:05 +0200

On 21. May 2021, at 18:42, Spencer Dawkins at IETF <[email-masked]> wrote:
> 
>                       1: from /var/lib/gems/2.7.0/gems/kramdown-rfc2629-1.4.12/bin/kramdown-rfc2629:94:in `yaml_load'      
> /var/lib/gems/2.7.0/gems/psych-4.0.0/lib/psych.rb:322:in `safe_load': wrong number of arguments (given 4, expected 1) (ArgumentError)                                                                  

This is a bit weird.

Kramdown-rfc tries to be compatible with a range of Ruby versions, which sometimes means that it uses older platform APIs.

8 days ago a change was pushed that removes the older API in the newest version of the psych gem (4.0.0).
You seem to have picked up this newest version…

I may be able to push a 1.4.13 later today that cooperates with this newest version (I need to write code that detects this change but still supports the Ruby versions found on, say, High Sierra).

Grüße, Carsten

---

From: Spencer Dawkins at IETF <[email-masked]>
Date: Fri, 21 May 2021 13:34:34 -0500

Carsten,

On Fri, May 21, 2021 at 1:24 PM Carsten Bormann <[email-masked]> wrote:

> Kramdown-rfc tries to be compatible with a range of Ruby versions, which
> sometimes means that it uses older platform APIs.
>
> I may be able to push a 1.4.13 later today that cooperates with this
> newest version (I need to write code that detects this change but still
> supports the Ruby versions found on, say, High Sierra).
>

Thank you a LOT for this, and for letting me know. I'm glad that I included
enough detail to be helpful.

 I'm still not sure if this is the right place for me to have asked (and
I'm happy to be pointed to the right place, if it's not), but I also
entered this case at ietf-action. It's ticket {37514336}, if that gets
routed to the tools team.

Best,

Spencer

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 21 May 2021 21:00:37 +0200

Fixed.  (Not extensively tested on High Sierra, though — I’m sure I’ll hear if I goofed :-).

Please just

	gem update

Grüße, Carsten

> On 21. May 2021, at 20:24, Carsten Bormann <[email-masked]> wrote:
>

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 21 May 2021 21:19:02 +0200

On 21. May 2021, at 20:34, Spencer Dawkins at IETF <[email-masked]> wrote:
> 
>  I'm still not sure if this is the right place for me to have asked (and I'm happy to be pointed to the right place, if it's not), but I also entered this case at ietf-action. It's ticket {37514336}, if that gets routed to the tools team.

This is user-supported software, so the secretariat can’t help — tools-discuss is the right address (or rfc-markdown, if you already know it’s a kramdown-rfc problem).

Grüße, Carsten