Semver and prerelease

96 views
Skip to first unread message

rdunklau

unread,
Oct 10, 2012, 5:08:34 AM10/10/12
to pgxn-...@googlegroups.com
Hello.

I'd like to upload a distribution named 1.0.0-beta for my extension Multicorn. However, it is rejected for not being a valid semver version.

The exact error message:

The multicorn-1.0.0-beta/META.json file does not adhere to the PGXN Meta Specification.
Errors:
• Field /version: "1.0.0-beta" is not a valid semantic version [Spec v1.0.0]
• Field /provides/multicorn/version: "1.0.0-beta" is not a valid semantic version [Spec v1.0.0]

Looking at http://semver.org/spec/v1.0.0.html, it looks perfectly valid to me. Did I miss something?

I noticed that you discussed the issue back in December 2011, and I wondered what you finally settled for.

--
Ronan Dunklau

Daniele Varrazzo

unread,
Oct 10, 2012, 6:30:46 AM10/10/12
to pgxn-...@googlegroups.com
On Wed, Oct 10, 2012 at 10:08 AM, rdunklau <rdun...@gmail.com> wrote:

> I'd like to upload a distribution named 1.0.0-beta for my extension
> Multicorn. However, it is rejected for not being a valid semver version.
>
> The exact error message:
>
> The multicorn-1.0.0-beta/META.json file does not adhere to the PGXN Meta
> Specification.
> Errors:
> • Field /version: "1.0.0-beta" is not a valid semantic version [Spec v1.0.0]
> • Field /provides/multicorn/version: "1.0.0-beta" is not a valid semantic
> version [Spec v1.0.0]
>
> Looking at http://semver.org/spec/v1.0.0.html, it looks perfectly valid to
> me. Did I miss something?

It looks valid to me, and my Python implementation for pgxn client
fails on it as well. I've implemented my version on David's semver
0.2.1. Seems we don't like the dash before the trailing part:
"1.0.0beta" is what expected.

> I noticed that you discussed the issue back in December 2011, and I wondered
> what you finally settled for.

I think it's an error on our side to advertise we adhere to semver: it
seems a "standard" too much tied to a single person's mood. I'd say we
should write down in the specs the pattern we expect without referring
to semver (if not in a "historical note", citing it was a preliminary
version).

-- Daniele

Joe Abbate

unread,
Oct 10, 2012, 8:15:03 AM10/10/12
to pgxn-...@googlegroups.com
On 10/10/12 06:30, Daniele Varrazzo wrote:
> On Wed, Oct 10, 2012 at 10:08 AM, rdunklau <rdun...@gmail.com> wrote:
>> Looking at http://semver.org/spec/v1.0.0.html, it looks perfectly valid to
>> me. Did I miss something?
>
> It looks valid to me, and my Python implementation for pgxn client
> fails on it as well. I've implemented my version on David's semver
> 0.2.1. Seems we don't like the dash before the trailing part:
> "1.0.0beta" is what expected.

Python's PEP 386 [*] also doesn't expect the dash and considers
"1.0.0-beta" as invalid, so I wouldn't say that semver is "too much tied
to a single person's mood."

Joe

* http://www.python.org/dev/peps/pep-0386/

Daniele Varrazzo

unread,
Oct 10, 2012, 8:30:10 AM10/10/12
to pgxn-...@googlegroups.com
No, the point is not whether or not he fancies a dash, a plus, a tilde
or a heart. I couldn't care less (actually I do, and I do prefer the
dash). The point is that the supposed spec has changed in time,
without warning and, amusingly, without respecting its own version and
its own semantic expectations. PGXN semvers take no dash because by
that time that was the format.

https://github.com/mojombo/semver.org/issues/49

-- Daniele

Daniele Varrazzo

unread,
Oct 10, 2012, 8:44:14 AM10/10/12
to Ronan Dunklau, pgxn-...@googlegroups.com
On Wed, Oct 10, 2012 at 1:36 PM, Ronan Dunklau <ronan....@kozea.fr> wrote:
> I understand the problem, and would just like to know: is PGXN likely to
> change its "prerelease" versioning scheme ? Or can I confidently release a
> 1.0.0beta and finally get over it ?
>
> I actually don't care at all, I just want to release a beta, and this proves
> much more difficult than expected !

We already have a few packages following our no-dash version scheme
(I've had pgmp 1.0.0b3 and similar). But I see none in the recent
history.

I would have said to stick to our scheme dropping the reference to the
semver, but I'd hear from David before. If the no-dash packages are
only a few and not important (mine were only testing ones that have
been superseded) we could purge pgxn from them and stick to e.g.
semver 1.0.0 as it is now known.

I would also tell you: don't bother with the issue and release
1.0.0beta. If we'll have a purge we can wait for you to release 1.0.0
before that.

-- Daniele

Joe Abbate

unread,
Oct 10, 2012, 8:46:58 AM10/10/12
to pgxn-...@googlegroups.com
On 10/10/12 08:30, Daniele Varrazzo wrote:
> No, the point is not whether or not he fancies a dash, a plus, a tilde
> or a heart. I couldn't care less (actually I do, and I do prefer the
> dash). The point is that the supposed spec has changed in time,
> without warning and, amusingly, without respecting its own version and
> its own semantic expectations. PGXN semvers take no dash because by
> that time that was the format.

OK Daniele, but my point was that, even if semver has changed, the
policy of not using a dash has been validated (if you'll excuse the pun)
by PEP 386. If Ronan wants to submit multicorn 1.0.0-beta to PyPI, I
think it will be rejected (I am aware that submitting betas to PyPI is
currently frowned upon).

Joe

Daniele Varrazzo

unread,
Oct 10, 2012, 8:59:56 AM10/10/12
to pgxn-...@googlegroups.com
AFAIK PEP 386 is not enforced by PyPI, and anyway it's not a semantic
versioning scheme: it only defines a syntax and an ordering. Releasing
beta on PyPI is frown upon exactly because being non-semantic you
can't ask a client "install the most recent stable": you get by
default the greatest version available.

PEP 386 and semver are different not only in syntax but in semantics
as well, I wouldn't use one to draw conclusions on the other. I'm fine
if we stay dashless: we only have the problem that our versioning
scheme refers to semver 1.0.0 and is instead this:
<https://github.com/mojombo/semver.org/blob/adb9c3af2508b3cc129baac217c45dd2e1d535e1/index.md>.


-- Daniele

Daniele Varrazzo

unread,
Oct 10, 2012, 9:03:16 AM10/10/12
to Ronan Dunklau, pgxn-...@googlegroups.com
On Wed, Oct 10, 2012 at 1:57 PM, Ronan Dunklau <ronan....@kozea.fr> wrote:
>> I would also tell you: don't bother with the issue and release
>> 1.0.0beta. If we'll have a purge we can wait for you to release 1.0.0
>> before that.
>
> That's all I wanted to read ! Thank you.
>
> However, I don't know if my file is malformed or anything else, but I get
> errors in the pgxn manager.
>
> Either a full perl traceback, or a message informing me that PGXN is not
> capable of parsing my JSON file due to an "illegal character".
>
> I've tested the JSON file directly from the zip file I want to upload, and it is
> parsable with the python json module.
>
> Is there any known problem on pgxn ?

Not a known one. I think posting your META.json would help David
debugging the issue.

-- Daniele

Ronan Dunklau

unread,
Oct 10, 2012, 9:15:39 AM10/10/12
to pgxn-...@googlegroups.com, Daniele Varrazzo
Sorry, I messed with my various email addresses, please forgive me for the
"double post".

I've attached the META.json.

--
Ronan
META.json

Daniele Varrazzo

unread,
Oct 10, 2012, 9:30:00 AM10/10/12
to Ronan Dunklau, pgxn-...@googlegroups.com
On Wed, Oct 10, 2012 at 2:15 PM, Ronan Dunklau <rdun...@gmail.com> wrote:
> Sorry, I messed with my various email addresses, please forgive me for the
> "double post".
>
> I've attached the META.json.

Waiting for David, have you tried installing your extension using pgxn
client from a local dir or zip? It may highlight you some problem with
the structure of the META file.

-- Daniele

Ronan Dunklau

unread,
Oct 10, 2012, 9:35:41 AM10/10/12
to Daniele Varrazzo, pgxn-...@googlegroups.com
I've just tested it with:

sudo pgxn-client install ./multicorn-1.0.0beta.zip

and it works as expected.

Daniele Varrazzo

unread,
Oct 10, 2012, 9:41:28 AM10/10/12
to Ronan Dunklau, pgxn-...@googlegroups.com
On Wed, Oct 10, 2012 at 2:35 PM, Ronan Dunklau <rdun...@gmail.com> wrote:
> I've just tested it with:
>
> sudo pgxn-client install ./multicorn-1.0.0beta.zip
>
> and it works as expected.

Ok, the ball is in David's field then :)

-- Daniele

David E. Wheeler

unread,
Oct 12, 2012, 12:40:44 PM10/12/12
to pgxn-...@googlegroups.com, Ronan Dunklau
On Oct 10, 2012, at 5:44 AM, Daniele Varrazzo <daniele....@gmail.com> wrote:

> I would have said to stick to our scheme dropping the reference to the
> semver, but I'd hear from David before. If the no-dash packages are
> only a few and not important (mine were only testing ones that have
> been superseded) we could purge pgxn from them and stick to e.g.
> semver 1.0.0 as it is now known.

At some point, I would like to update our semver parsers (Perl, Python, and PostgreSQL C extension) as follows:

* For v1-compatible semvers, the hyphen would be optional
* For v2-only semvers, the hyphen would be required

Alas, I do not have the time to work on this at the moment. If anyone else does, the code for the Perl and Pg semvers are here:

https://github.com/theory/semver
https://github.com/theory/pg-semver

Best,

David

David E. Wheeler

unread,
Oct 12, 2012, 12:42:19 PM10/12/12
to pgxn-...@googlegroups.com, Ronan Dunklau
On Oct 10, 2012, at 6:41 AM, Daniele Varrazzo <daniele....@gmail.com> wrote:

>> sudo pgxn-client install ./multicorn-1.0.0beta.zip
>>
>> and it works as expected.
>
> Ok, the ball is in David's field then :)

Yes, I will try to figure out what the problem is this weekend. It’s finding a bogus character *somewhere*, and then additionally dying on a localization lookup failure. :-(

David

Ronan Dunklau

unread,
Oct 10, 2012, 9:08:28 AM10/10/12
to pgxn-...@googlegroups.com, Daniele Varrazzo

> I would also tell you: don't bother with the issue and release

> 1.0.0beta. If we'll have a purge we can wait for you to release 1.0.0

> before that.

 

That's all I wanted to read ! Thank you.

 

However, I don't know if my file is malformed or anything else, but I get

errors in the pgxn manager.

 

The first time, the error was informing me that PGXN is not

capable of parsing my JSON file due to an "illegal character".

 

I've tested the JSON file directly from the zip file I want to upload, and it is

parsable with the python json module.

 

Now, it greets me with a perl traceback:

 

DBD::Pg::st execute failed: ERROR: server conn crashed?

    ERROR:  server conn crashed? at /var/virtuals/pgxn/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Plack/Middleware/StackTrace.pm line 2

It seems like I broke it, sorry :(

 

--

Ronan

 

Ronan Dunklau

unread,
Oct 10, 2012, 9:09:20 AM10/10/12
to pgxn-...@googlegroups.com, Joe Abbate
> OK Daniele, but my point was that, even if semver has changed, the
> policy of not using a dash has been validated (if you'll excuse the pun)
> by PEP 386. If Ronan wants to submit multicorn 1.0.0-beta to PyPI, I
> think it will be rejected (I am aware that submitting betas to PyPI is
> currently frowned upon).

I've never really considered it, do you think there would be any interest in
doing so ?

And when/if I submit it to PyPi, should I package only the python code or
include the postgresql-specific C-code as well ?

--
Ronan





Ronan Dunklau

unread,
Oct 10, 2012, 8:39:06 AM10/10/12
to pgxn-...@googlegroups.com, Daniele Varrazzo
Le mercredi 10 octobre 2012 13:30:10 Daniele Varrazzo a écrit :
I understand the problem, and would just like to know: is PGXN likely to
change its "prerelease" versioning scheme ? Or can I confidently release a
1.0.0beta and finally get over it ?

I actually don't care at all, I just want to release a beta, and this proves
to be more difficult than expected.


--
Ronan

David E. Wheeler

unread,
Oct 13, 2012, 2:36:02 AM10/13/12
to pgxn-...@googlegroups.com, Daniele Varrazzo
On Oct 10, 2012, at 5:39 AM, Ronan Dunklau <rdun...@gmail.com> wrote:

> I understand the problem, and would just like to know: is PGXN likely to
> change its "prerelease" versioning scheme ? Or can I confidently release a
> 1.0.0beta and finally get over it ?

If we change the scheme, it will be backwards compatible. So yes, you can release that confidently. :-)

> I actually don't care at all, I just want to release a beta, and this proves
> to be more difficult than expected.

Only because the semver format changed under us. Irritating.

David

Reply all
Reply to author
Forward
0 new messages