Return-Path: X-Original-To: apmail-buildr-users-archive@www.apache.org Delivered-To: apmail-buildr-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4335B77AB for ; Tue, 15 Nov 2011 11:17:13 +0000 (UTC) Received: (qmail 17897 invoked by uid 500); 15 Nov 2011 11:17:13 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 17853 invoked by uid 500); 15 Nov 2011 11:17:13 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Received: (qmail 17845 invoked by uid 99); 15 Nov 2011 11:17:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 11:17:13 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex.boisvert@gmail.com designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-ww0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 11:17:06 +0000 Received: by wwf4 with SMTP id 4so4080339wwf.17 for ; Tue, 15 Nov 2011 03:16:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=t4w3UCuehh8weoF+6FOrcBh7BHkM3T+DnZ4mpuIqSmw=; b=muxw3qFyUMeyHMHXKeyTg3d2FIzDq2NyLRFQ186OjYSt8Xu7aJA1QBxzAQ0/JGGj1J l2kHkj8VDaeI3FGofa/CHPLxe77t77BcyQhyrL5tD3BAHVRqmdmVvlEjnYQGQ5zMv4TP 33qUft54/WnkMdOdVpgCYW1y1VjcDJejWAGu0= MIME-Version: 1.0 Received: by 10.216.5.18 with SMTP id 18mr253732wek.0.1321355806449; Tue, 15 Nov 2011 03:16:46 -0800 (PST) Received: by 10.216.183.202 with HTTP; Tue, 15 Nov 2011 03:16:46 -0800 (PST) In-Reply-To: References: Date: Tue, 15 Nov 2011 06:16:46 -0500 Message-ID: Subject: Re: Invalid Version error when spec contains a version like r09 From: Alex Boisvert To: users@buildr.apache.org Content-Type: multipart/alternative; boundary=0016364d1bc777232004b1c41f36 X-Virus-Checked: Checked by ClamAV on apache.org --0016364d1bc777232004b1c41f36 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 15, 2011 at 6:13 AM, Alex Boisvert wrote: > On Mon, Nov 14, 2011 at 3:18 PM, Russ Teabeault wrote: > >> Consider the following namespace code: >> >> REQUIRES = ArtifactNamespace.for(self) do |ns| >> ns.guava! "com.google.guava:guava:jar:r09" >> ns.javassist! "javassist:javassist:jar:3.8.0.GA" >> ns.reflections! "org.reflections:reflections:jar:0.9.5-RC1" >> end >> >> The guava spec here causes the following error to be raised >> >> Invalid version: "r09" >> >> This is a result of VersionRequirement.version? which checks the version >> string against the regex >> >> /^\s*\d[#{VER_CHARS}]*\s*$/ >> >> This regex is checked here >> >> raise "Invalid version: #{version.inspect}" unless >> self.class.version?(version) >> >> So it seems that maybe this regex could be expanded to include versions >> like 'r09'. And for that matter what denotes a valid version and what is >> this check trying to protect against. Can that check just be removed? >> > > Yes, the check should be removed to maintain full Maven interoperability. > I'll commit a fix when I get time. > Created a tracker: https://issues.apache.org/jira/browse/BUILDR-615 alex --0016364d1bc777232004b1c41f36--