Subject: [xml2rfc] dependency error

From: Niels ten Oever <[email-masked]>
Date: Fri, 13 Oct 2017 10:57:04 +0200

Hi all,

Not sure whether I should file this bug here or in the debian
bugtracker, but I thought I'd first try it here.

Am running make on my Debian Testing instance and getting the following:

$ make
kramdown-rfc2629 draft-association.md > association.staging.xml
/usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not
find 'kramdown' (~> 1.14.0) - did find: [kramdown-1.15.0] (Gem::LoadError)
Checked in
'GEM_PATH=/home/lem/.gem/ruby/2.3.0:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all',
execute `gem env` for more information
	from /usr/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
	from /usr/lib/ruby/vendor_ruby/kramdown-rfc2629.rb:14:in `<top (required)>'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in
`require'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in
`rescue in require'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in
`require'
	from /usr/bin/kramdown-rfc2629:3:in `<main>'
Makefile:14: recipe for target 'draft-association.xml' failed
make: *** [draft-association.xml] Error 1

Seems like kramdown-rfc2629 is dependent on kramdown 1.14.0 whereas the
newest version is 1.15.0. I think that is something that should be fixed
in the kramdown-rfc2629 and then pushed downstream.

But happy to be told otherwise!

Cheers,

Niels

-- 
Niels ten Oever
Head of Digital

Article 19
www.article19.org

PGP fingerprint    8D9F C567 BEE4 A431 56C4
                     678B 08B5 A0F2 636D 68E9

---

From: Niels ten Oever <[email-masked]>
Date: Fri, 13 Oct 2017 14:17:19 +0200

Hmmm, just changing :

gem 'kramdown', '~> 1.14.0'

to:

gem 'kramdown', '~> 1.15.0'

in kramdown-rfc2629.rb did also not really yield the result I was hoping
for:

$ make
kramdown-rfc2629 draft-association.md > association.staging.xml
*** Input contains HT ("tab") characters. Undefined behavior will ensue.
** Configuration problem with OpenSSL certificate store at
/usr/lib/ssl/cert.pem.
**   workaround using 'certified' gem disabled on Debian.
/usr/lib/ruby/2.3.0/psych.rb:379:in `parse': (<unknown>): could not find
expected ':' while scanning a simple key at line 268 column 6
(Psych::SyntaxError)
	from /usr/lib/ruby/2.3.0/psych.rb:379:in `parse_stream'
	from /usr/lib/ruby/2.3.0/psych.rb:327:in `parse'
	from /usr/lib/ruby/2.3.0/psych.rb:293:in `safe_load'
	from /usr/bin/kramdown-rfc2629:44:in `xml_from_sections'
	from /usr/bin/kramdown-rfc2629:264:in `<main>'
Makefile:14: recipe for target 'draft-association.xml' failed
make: *** [draft-association.xml] Error 1

:((

Cheers,

Niels

PS Attached the markdown file I am trying to convert.

-- 
Niels ten Oever
Head of Digital

Article 19
www.article19.org

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 13 Oct 2017 14:22:45 +0200

> expected ':' while scanning a simple key at line 268 column 6

You have

     date 2017

Where you probably intended a

     date: 2017

Grüße, Carsten

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 13 Oct 2017 14:34:41 +0200

> find 'kramdown' (~> 1.14.0) - did find: [kramdown-1.15.0] (Gem::LoadError)

Hmm, that is a “cannot happen” — you cannot install (a recent version of) kramdown-rfc2629 without also installing kramdown 1.14.0.

Obviously, it did happen, so I’m curious:
How did you install kramdown-rfc2629?
(And what is the output of "gem search -l kramdown”?)

Background on the versions involved:
Kramdown-rfc2629 depends on kramdown, a commonly used implementation of the markdown languages.
Kramdown-rfc2629 always specifies the minor version (semantic versioning) of kramdown that it uses.  So, here kramdown-rfc2629 wants to use 1.14.  But only 1.15 seems to be installed on the system, which cannot happen, because “gem install”-ing kramdown-rfc2629 also installs the right version of kramdown (along other versions that may be installed).

Why is kramdown-rfc2629 using an older version of kramdown?  Kramdown turned off support for ancient Ruby 1.9 in 1.15.0 (A current Ruby would be 2.4.2 or 2.4.1).  Requiring kramdown 1.15 would therefore also remove support for ancient Ruby 1.9 in kramdown-rfc2629. This shouldn’t be a problem, as Ruby 1.9 really is obsolete.  Unfortunately, some older versions of Linux distributions such as Debian include just that obsolete version and provide no easy way to upgrade into the present.  (As a datapoint, until a few weeks ago the tools.ietf.org servers were running 1.9!).  So I saw a slightly greater downside in upgrading to 1.15 than in sticking to a slightly older version of the markdown base — that inequality may move to the other side quite soon, though.

The problem you ran into seems to add another downside, so let’s diagnose it.

Grüße, Carsten

---

From: Niels ten Oever <[email-masked]>
Date: Fri, 13 Oct 2017 14:54:49 +0200

Hi Carsten,

> How did you install kramdown-rfc2629?

I installed both kramdown and kramdown-rfc2629 with:

# apt install kramdown kramdown-rfc2629

What I think happened is that kramdown got upgraded after install.

> (And what is the output of "gem search -l kramdown”?)

$ gem search -l kramdown

*** LOCAL GEMS ***

kramdown (1.15.0)
kramdown-rfc2629 (1.2.6)

> The problem you ran into seems to add another downside, so let’s diagnose it.

Happy to help. Maybe things will change with the new Debian Stable,
which I think is the standard reference, no?

Thanks for the support for this piece of software!

Cheers,

Niels

-- 
Niels ten Oever
Head of Digital

Article 19
www.article19.org

---

From: Niels ten Oever <[email-masked]>
Date: Fri, 13 Oct 2017 14:55:21 +0200

> Where you probably intended a

Oops, I should have caught that, thanks!

Regards,

Niels