bitprophet / releases

A powerful Sphinx changelog-generating extension.
http://releases.readthedocs.io/
BSD 2-Clause "Simplified" License
176 stars 41 forks source link

'Initial' bugs (vs features) break newer release-line-oriented achitecture #53

Closed bitprophet closed 8 years ago

bitprophet commented 8 years ago

Description

Bugs (explicit or implicit-because-no-issue-role, doesn't matter) listed at the beginning of time before any release entries, break after Releases 1.1.x because the new "derive default version spec for issues" functionality assumes there will always be more than zero line buckets.

This doesn't break for features because their branch in default_spec() is more generic, just taking the major number only (which is filled in by the pre-seeking functionality). But the bug branch looks inside the major-version structures and tries to find out what the latest minor release bucket is. When there are none, kaboom:

Exception occurred:
  File "/Users/jforcier/Code/oss/releases/releases/models.py", line 88, in default_spec
    key for key, value in six.iteritems(lines)
ValueError: max() arg is an empty sequence

Solutions

bitprophet commented 8 years ago

FTR went the route of making all bugs major bugs before a release; felt like only applying it to implicit bugs would a) be inconsistent and b) still cause explosions for anyone being silly with an explicit bug in this location. Better to just do it this way than have some "hey I am showing you an error but still not doing what you probably wanted" special exception.