lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5850) Constants#LUCENE_MAIN_VERSION can have broken values
Date Tue, 29 Jul 2014 08:09:39 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-5850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14077505#comment-14077505
] 

Uwe Schindler commented on LUCENE-5850:
---------------------------------------

bq. I think we should

Then we have to change this code: After the problems with the minor versions appearing in
LUCENE_MAIN_VERSION, this test was added - which enforces what the Javadocs about LUCENE_MAIN_VERSION
tells:

{code}
  public void testLuceneMainVersionConstant() {
    assertTrue("LUCENE_MAIN_VERSION does not follow pattern: 'x.y' (stable release) or 'x.y.0.z'
(alpha/beta version)" + getVersionDetails(),
        Constants.LUCENE_MAIN_VERSION.matches("\\d+\\.\\d+(|\\.0\\.\\d+)"));
    assertTrue("LUCENE_VERSION does not start with LUCENE_MAIN_VERSION (without alpha/beta
marker)" + getVersionDetails(),
        Constants.LUCENE_VERSION.startsWith(Constants.mainVersionWithoutAlphaBeta()));
  }
{code}

If we now use the full version number in the segmentinfos, we have to make LUCENE_MAIN_VERSION
be identical to common-build's {{dev.version.base}}. I would then change this test to enforce
identical values and remove the regexp and replace by a had check on the common-build sysprop
in the test (see above). I can provide a patch doing this.

> Constants#LUCENE_MAIN_VERSION can have broken values 
> -----------------------------------------------------
>
>                 Key: LUCENE-5850
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5850
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: general/build
>    Affects Versions: 4.3.1, 4.5.1
>            Reporter: Simon Willnauer
>             Fix For: 5.0, 4.10
>
>         Attachments: LUCENE-5850.patch, LUCENE-5850_bomb.patch, LUCENE-5850_smoketester.patch
>
>
> Constants#LUCENE_MAIN_VERSION is set to the Lucene Main version and should not contain
minor versions. Well this is at least what I thought and to my knowledge what the comments
say too. Yet in for instance 4.3.1 and 4.5.1 we broke this such that the version from SegmentsInfo
can not be parsed with Version#parseLeniently. IMO we should really add an assertion that
this constant doesn't throw an error and / or make the smoketester catch this. to me this
is actually a index BWC break. Note that 4.8.1 doesn't have this problem...



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message