Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CABD8200C4B for ; Mon, 20 Mar 2017 11:42:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C95FD160B81; Mon, 20 Mar 2017 10:42:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F935160B76 for ; Mon, 20 Mar 2017 11:42:55 +0100 (CET) Received: (qmail 52124 invoked by uid 500); 20 Mar 2017 10:42:55 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 52113 invoked by uid 99); 20 Mar 2017 10:42:55 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2017 10:42:55 +0000 Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D00CA1A0785 for ; Mon, 20 Mar 2017 10:42:54 +0000 (UTC) Received: by mail-oi0-f43.google.com with SMTP id q19so19990596oic.0 for ; Mon, 20 Mar 2017 03:42:54 -0700 (PDT) X-Gm-Message-State: AFeK/H071+I/6Y52SwVPjZyoZTmQjCmyBcHe+cznKeuaErJIP0ug0nr68DtKKLcB/L2BhH9ynrV8nqMVq5DmDQxb X-Received: by 10.202.207.146 with SMTP id f140mr14894838oig.178.1490006574167; Mon, 20 Mar 2017 03:42:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.10.198 with HTTP; Mon, 20 Mar 2017 03:42:13 -0700 (PDT) In-Reply-To: References: <86AB2F32-67EB-455E-98FB-41B431F7C11E@kth.se> From: Ufuk Celebi Date: Mon, 20 Mar 2017 11:42:13 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [DISCUSS] deprecated function need more detail To: dev@flink.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Mon, 20 Mar 2017 10:42:57 -0000 There is a related checkstyle rule: http://checkstyle.sourceforge.net/apidocs/com/puppycrawl/tools/checkstyle/c= hecks/annotation/MissingDeprecatedCheck.html Added a JIRA for adding it here: https://issues.apache.org/jira/browse/FLINK-6127 We actually wrote this down in our hidden Wiki at https://cwiki.apache.org/confluence/display/FLINK/Best+Practices+and+Lesson= s+Learned > - Always add comments when you deprecate something > * Add a @Deprecated annotation to the JavaDocs explaining why it was depr= ecated (removed, replaced, etc.) > * Create issues with target release version for deleting deprecated inter= faces > * https://docs.oracle.com/javase/1.5.0/docs/guide/javadoc/deprecation/dep= recation.html On Mon, Mar 20, 2017 at 11:33 AM, Stephan Ewen wrote: > +1 > > I think we actually had the same discussion already a while back. Let's > bring it back to everyone's awareness! > > > > On Wed, Nov 23, 2016 at 12:09 PM, Paris Carbone wrote: > >> +1 >> >> This should always be the norm, especially for user-facing code. >> >> While we are at it, perhaps when someone deprecates functionality the ne= w >> alternative should also be replaced right away. >> E.g. Checkpointed is deprecated but all state management tests are >> actually using this alternative. >> >> cheers >> Paris >> >> >> > On 23 Nov 2016, at 11:21, Kostas Kloudas >> wrote: >> > >> > +1 and we should apply the same to all deprecated interfaces/abstract >> classes. >> > >> >> On Nov 23, 2016, at 11:13 AM, Aljoscha Krettek >> wrote: >> >> >> >> +1 That sounds excellent. >> >> >> >> On Wed, 23 Nov 2016 at 11:04 Till Rohrmann >> wrote: >> >> >> >>> +1 for your proposal. >> >>> >> >>> Cheers, >> >>> Till >> >>> >> >>> On Wed, Nov 23, 2016 at 9:33 AM, Fabian Hueske >> wrote: >> >>> >> >>>> I agree on this one. >> >>>> Whenever we deprecate a method or a feature we should add a comment >> that >> >>>> explains the new API or why the feature was removed without >> replacement. >> >>>> >> >>>> Enforcing this information through checkstyle makes sense as well, >> IMO. >> >>>> >> >>>> Cheers, Fabian >> >>>> >> >>>> 2016-11-23 4:42 GMT+01:00 sjk : >> >>>> >> >>>>> Hi, all >> >>>>> >> >>>>> Let=E2=80=99s have look at Checkpointed interface below. It declar= ed >> deprecated >> >>>>> but have no detail for why, when and how replace this function. It= =E2=80=99s >> a >> >>>> big >> >>>>> trouble for the users. >> >>>>> >> >>>>> @Deprecated >> >>>>> @PublicEvolving >> >>>>> public interface Checkpointed extends >> >>>>> CheckpointedRestoring { >> >>>>> >> >>>>> >> >>>>> I think we should have more detail: when give up, who replace it, = why >> >>>>> deprecated. >> >>>>> >> >>>>> For Java code, add detail deprecated reason in code annotations. >> >>>>> For Scala code, replace Java annotation @Deprecated(,,) with Scal= a >> >>>>> annotation @deprecated, such as >> >>>>> @deprecated(message =3D "the reason", since =3D "when fully give u= p=E2=80=9D) >> >>>>> >> >>>>> Add this rule to customized checkstyle plugin of maven and SBT. >> >>>>> >> >>>>> Best regard >> >>>>> -Jinkui Shi >> >>>> >> >>> >> > >> >>