Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A19C410D0F for ; Tue, 28 Jan 2014 00:10:23 +0000 (UTC) Received: (qmail 79809 invoked by uid 500); 28 Jan 2014 00:10:22 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 79739 invoked by uid 500); 28 Jan 2014 00:10:22 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 79731 invoked by uid 99); 28 Jan 2014 00:10:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 00:10:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-wg0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 00:10:13 +0000 Received: by mail-wg0-f52.google.com with SMTP id b13so6583755wgh.19 for ; Mon, 27 Jan 2014 16:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JiaORpycGnJf4gnWrDLskzwiX84fT0InVVtw3KdsQCE=; b=rD6xpPpIa21MNH+S4Zw5jSi1UBg2MKxxu8IsdZ7//66GbN/jB2z3bLDIx1Kzf0MQDp PAPnP4mVCJFrtb5PBB4a7nDWOau49R2fjspFj7NOrUHUY0UeyhedzcgtwD2tREdkQLfD Mt9AwynFRVgODkjlpLLEPSTbYevKPJQ41u+AjYNg+P5n0Z6yT/HXQfUqf2lLIZDuu2vp feLhZW7g7WDsqWnlF+lIPJ9MxvAclwW1fvVF3/WIjGXV6U5kr3zN2QngFT956IcRyvfv kMC4c0iRyvj/CeCuIGE7JsmyV7E7f1+yC3r80JnFka00vmQfhUalo4gxJFXF3Yg76Oks rzSQ== MIME-Version: 1.0 X-Received: by 10.194.92.7 with SMTP id ci7mr3279598wjb.58.1390867793531; Mon, 27 Jan 2014 16:09:53 -0800 (PST) Received: by 10.194.86.198 with HTTP; Mon, 27 Jan 2014 16:09:53 -0800 (PST) In-Reply-To: <1390855184.10865.8.camel@ubuntu> References: <883s4hfbauquoc5096ffv1td.1390847083767@email.android.com> <1390848872.8989.3.camel@ubuntu> <1390851832.8989.7.camel@ubuntu> <1390855184.10865.8.camel@ubuntu> Date: Tue, 28 Jan 2014 00:09:53 +0000 Message-ID: Subject: Re: [Request for comments] HttpClient re-spin for Android From: sebb To: HttpComponents Project Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 27 January 2014 20:39, Oleg Kalnichevski wrote: > On Mon, 2014-01-27 at 20:14 +0000, sebb wrote: >> On 27 January 2014 19:43, Oleg Kalnichevski wrote: >> > On Mon, 2014-01-27 at 19:33 +0000, sebb wrote: >> >> On 27 January 2014 18:54, Oleg Kalnichevski wrote: >> >> > On Mon, 2014-01-27 at 13:24 -0500, Gary Gregory wrote: >> >> >> Wow this is confusing! Why not repackage the classes instead of renaming each one with an HC4 postfix? >> >> >> >> >> > >> >> > That was my initial plan, too. But try re-writing the sources using >> >> > regex when you have multiple classes with the same name. I had to give >> >> > up after a full day of wasted efforts. My regex skills are very basic, >> >> > though. So, improvements are highly welcome >> >> > >> >> > http://svn.apache.org/repos/asf/httpcomponents/httpclient-android/trunk/build.gradle >> >> >> >> How do you decide which classes need renaming, and which ones don't? >> >> >> > >> > By comparing different versions using reflection. It is in the script. >> >> The script contains lots of special ("magic") package and class names, >> so presumably a simple comparison is not sufficient. >> How are these exceptions determined? >> > > There are several differences between version 4.0-beta1 used by the > script and some arbitrary snapshot taken by Google. Some things > unfortunately have to be adjusted manually. If they took a snapshot, there must be a corresponding revision. It would be trivial to create a tag once the revision has been established. >> >> == >> >> >> >> Are there likely to be many developers who need to provide an >> >> application that runs unmodified on both Android and Java? >> >> If not, then it would surely be sufficient to just provide a shaded >> >> version for Android which uses a different package name? >> >> >> > >> > Maybe not. But there are enough applications that are compiled against >> > Android APIs that cannot be used with repackaged code. >> >> Not sure I follow. >> >> If an app is compiled against the Android APIs, I don't see how it can >> take advantage of any new classes without changing the source and >> recompiling. > > How about multiple implementations of the same abstract API, one being > newer and containing fewer bugs? If the implementation class name is the same, I don't see how the two versions can co-exist without classpath issues. If the implementation is a new class, I'm not sure how the existing binary code can take advantage of the new implementation. What would cause the existing code to find the newer class? >> In which case, would it not make sense to convert the code to use all >> new class names? >> >> Maybe I'm missing something, but I'm not seeing any great advantage to >> the proposed Android build. >> > > If you are familiar with Spring, think of Spring Rest template. No, I'm afraid I have no experience of Spring. > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > For additional commands, e-mail: dev-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org