Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 34004 invoked from network); 22 Oct 2008 11:21:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2008 11:21:56 -0000 Received: (qmail 99343 invoked by uid 500); 22 Oct 2008 11:21:57 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 99051 invoked by uid 500); 22 Oct 2008 11:21:56 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 99042 invoked by uid 99); 22 Oct 2008 11:21:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 04:21:56 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dmsmith555@gmail.com designates 74.125.44.29 as permitted sender) Received: from [74.125.44.29] (HELO yx-out-2324.google.com) (74.125.44.29) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 11:20:46 +0000 Received: by yx-out-2324.google.com with SMTP id 3so491103yxj.5 for ; Wed, 22 Oct 2008 04:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=najouo0GodqnEUBCv+tu5E4B7D/X3NyME9w4BZXqwBI=; b=VedDY/wcvZOJwEYYcYExCJQnge3Y8UnpKH2jzgI3bW0gG7PyUm2rtKN9RNw6x/c/X2 R5FKO+/QVTaoBUUAmAWEknZ/dHrJzAU6Se5n1P58vSPn03KwqZAWnw33NL/jj14h7V/K nf7CY2R+LSFlOZtZPMuMHz2Abp06ANmewd2kI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=mKBUrWYMSafnYkZgMkT7td6oSWYec4eu+/yUv+ckJ1i/gLBghEFB38LfCPfTI1kCJ4 ENqy8XlMbL8brkCIOkvRYevc4IfSzHuA8rLan33XPjzRVNzjdvGm3y64U3kNEp3nM5vP zwNc22WUdc+r25bRlXPdyiXF8ZExhPrs18Uvo= Received: by 10.100.132.14 with SMTP id f14mr11384932and.107.1224674484728; Wed, 22 Oct 2008 04:21:24 -0700 (PDT) Received: from ?10.0.1.199? (cpe-24-210-174-243.woh.res.rr.com [24.210.174.243]) by mx.google.com with ESMTPS id c20sm24185276ana.21.2008.10.22.04.21.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Oct 2008 04:21:24 -0700 (PDT) Message-Id: From: DM Smith To: java-dev@lucene.apache.org In-Reply-To: <5E2DEA6D-FB4B-462D-91C5-091D72EEDA5C@mikemccandless.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: [VOTE] Relax backwards-compatibility policy for package-protected APIs Date: Wed, 22 Oct 2008 07:21:22 -0400 References: <48FE4D78.2070505@gmail.com> <48FE51DD.8090006@apache.org> <48FE5C78.6080908@gmail.com> <5E2DEA6D-FB4B-462D-91C5-091D72EEDA5C@mikemccandless.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org On Oct 22, 2008, at 5:27 AM, Michael McCandless wrote: > > I think *not* having to maintain back compat of the package private > APIs is very important to keeping our freedom (and sanity!) to > continue to improve Lucene. This is similar to marking a new API as > experimental and subject to suddenly change in the next release: it > reserves our future freedom. > > Still, I think it's OK if advanced sources want to tap into package > private APIs as long as we've made this policy clear. > > I agree we should explicitly call this out, clearly, in the > BackwardsCompatbility wiki -- Michael can you update it? A common practice in marking package private is to do the following: /* private */ int xxxx; That makes it abundantly clear that the API is logically private. > > > Mike > > Michael Busch wrote: > >> Doug Cutting wrote: >>> Michael Busch wrote: >>>> Currently Lucene's backwards compatibility policy states: "That's >>>> to say, any code developed against X.0 should continue to run >>>> without alteration against all X.N releases." In LUCENE-1422 the >>>> question came up if this statement should apply to public and >>>> protected APIs only or also to package-private APIs. >>>> >>>> I'm proposing to exempt the package-private APIs from this strict >>>> backwards compatibility rule and declare it as "expert methods". >>> >>> Package-private and expert are different categories. >>> >>> Expert methods are things that most folks can ignore when reading >>> the documentation. They're intended for advanced, unusual cases. >>> A public or protected expert method has all the back-compatibility >>> requirements of a non-expert method. >>> >>> But package-private methods are not for public consumption. Code >>> that relies on calling package-private methods may be broken by an >>> otherwise back-compatible upgrade. Package-private is not for >>> external use, where external means outside of Lucene Java source >>> tree. >>> >>>> Though, only deprecated package-private methods are allowed to be >>>> removed. This means that at least one X.Y-> X.Y+1 or X.Y->X+1.0 >>>> release must be shipped in which the APIs are marked as >>>> deprecated to give the users the chance to remove dependencies on >>>> these methods. If this vote passes we will add appropriate >>>> information to CHANGES.txt and the next release announcement. >>> >>> I don't think we should ever be required to deprecate package- >>> private stuff. It can be changed without notice. If someone >>> needs a feature to work across multiple releases, then they should >>> get a public, supported version of it. Package private is by >>> definition not public and hence not supported. >> >> Even better. That was actually my understanding before I >> encountered the deprecated Token members. So if this is the >> agreement already then there is no need for a vote, unless anybody >> has concerns with this? We should probably update http://wiki.apache.org/lucene-java/BackwardsCompatibility >> and make it clear that "complete API back-compatiblity" only >> includes public and protected APIs. >>> >>> That said, if there's a case where some particular package-private >>> feature is known to be widely used (a bad situation, mind you) >>> then it might be kind to deprecate it rather than remove it, but >>> folks should not rely on this in general as a policy. Otherwise >>> we can't freely use package private, and it's a nice way to break >>> internal implementations into multiple classes. >>> >> Agreed. >> >>> Doug >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-dev-help@lucene.apache.org >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-dev-help@lucene.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org