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 6E25D200CC1 for ; Mon, 10 Jul 2017 18:28:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6C9B1163E64; Mon, 10 Jul 2017 16:28:42 +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 B0F8B163E56 for ; Mon, 10 Jul 2017 18:28:41 +0200 (CEST) Received: (qmail 92400 invoked by uid 500); 10 Jul 2017 16:28:40 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 92061 invoked by uid 99); 10 Jul 2017 16:28:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2017 16:28:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B05D1193C23 for ; Mon, 10 Jul 2017 16:28:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.897 X-Spam-Level: X-Spam-Status: No, score=-0.897 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, RCVD_IN_SORBS_WEB=1.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id HVlJt225HCZg for ; Mon, 10 Jul 2017 16:28:38 +0000 (UTC) Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A841D62647 for ; Mon, 10 Jul 2017 16:22:36 +0000 (UTC) Received: by mail-wr0-f172.google.com with SMTP id c11so145397357wrc.3 for ; Mon, 10 Jul 2017 09:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=Zx/CUk7zTJHHzuSqugdsJaUOISL/Aw0nFFr39zOvfpg=; b=FM+m+NGJVAtR+FP0pttGRlTAWVd/XR6NiGayRr2arkAYY/ApQllj/HRhEEtwXyY5xp TRvM/8NYyG3Urem9xfnUewIo5sa8HMYokjl0zPVfd4ty1ArZsQ/Yhlq6Dq5XsckJ5z4Z NIv/ngk7OkqQngZ52His3esEbUpjGH4qsVHXgnB20UjVJsECyb7MREhTF5iSvRDYlSKJ T9bFdYXn2ESHHaa1l9XOUeENepcdGBLoMjlr8/MBFljNM4pl74J7VT0fUvGVPAougZ8m GXUbKJDFkJKl4XvpR5Itq9aFdIMMq1e8XDMB/3ehE8uyXOfYkL6AsLBpNza1KS7PzrXs TFbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=Zx/CUk7zTJHHzuSqugdsJaUOISL/Aw0nFFr39zOvfpg=; b=ntorQ/DjEhmQ3hBgeYgk5slIG/iP+aVE+hdoBfsxGlxd5wwKVrMsyPygr1L0BxbZto 41TMMsflQir30kO+XsUr6NtwSaC17+3VqUB6vSJPOr66m/YB1f1YluOcSOAbvUgh1Q22 v0WVkE5uyjGvBAm1E4f6kvLB0qNrDt1B4AsjnEBLPnlQAsPNnwzUK1TIT+kG2n21ZEBB jkeF9P09SidzdgEohYDKolD/mcS1+Xlt8/IGezD3NAHBBQOYr1Mmhmep2mOW9MklhA6g HlOVHcd+SiOOV8Sn8G3CxXGFUmRviwwcdip1m8braG25DbZk3eBxDVXDkmBzb5vC28H5 LAQQ== X-Gm-Message-State: AIVw1129bQkDCodctOjC6kJ9DSHxg5CergDjnYywxARgoaWnnNOOOdX8 +C39mUbBE7jR1DJsstQ= X-Received: by 10.28.136.129 with SMTP id k123mr8416058wmd.14.1499703749818; Mon, 10 Jul 2017 09:22:29 -0700 (PDT) Received: from [10.0.0.7] ([185.120.124.1]) by smtp.gmail.com with ESMTPSA id y9sm13400548wry.32.2017.07.10.09.22.28 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 09:22:29 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: [FlexJS] Bindable and consts From: Harbs In-Reply-To: Date: Mon, 10 Jul 2017 19:22:26 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <258842C4-6DBC-4F23-9B17-50B600F3489E@gmail.com> References: <8C4C1CD1-C4D6-404B-9113-520532B44BA9@gmail.com> To: dev@flex.apache.org X-Mailer: Apple Mail (2.2104) archived-at: Mon, 10 Jul 2017 16:28:42 -0000 Not urgent right now. Once I figured out what the problem was, I removed = the Bindable tag. It was not strictly necessary. In my case the public static const was not exported. Not sure why. I=E2=80=99m not sure that we always want to export these things either, = but that=E2=80=99s a whole =E2=80=98nother discussion that I keep = putting off until we=E2=80=99re in a better place. Harbs > On Jul 10, 2017, at 6:54 PM, Alex Harui = wrote: >=20 > How urgent is this? I'm trying to figure out why the compiler did not > respond properly to bad MXML. >=20 > I thought public APIs were all exported so they would survive getting > renamed. In the minified JS, the code will often access the renamed > variable, but a tree of objects with properties also gets created. >=20 > -Alex >=20 > On 7/10/17, 2:12 AM, "Harbs" wrote: >=20 >> It appears that this is the case with any public static getter. >>=20 >> public static function get FOO():String{return =E2=80=9Cfoo=E2=80=9D} >> or >> public static function get FOO():Foo{return _foo} >>=20 >> I don=E2=80=99t see any reason why bracket notation would be needed. = Is this a >> throwback from before we had the get__ functions? >>=20 >> Thanks, >> Harbs >>=20 >>> On Jul 9, 2017, at 11:27 PM, Harbs wrote: >>>=20 >>> I just discovered something: >>>=20 >>> Foo.as: >>> package com.acme.foobaz.model{ >>> [Bindable]public class Foo{ >>> static public const BAZ:String =3D =E2=80=9Cbaz=E2=80=9D; >>> } >>> } >>>=20 >>> In some other class: >>>=20 >>> if(baz =3D=3D Foo.BAZ){//do something} >>>=20 >>> compiles to: >>> if(baz =3D=3D com.acme.foobaz.model.Foo[=E2=80=9CBAZ=E2=80=9D]) >>>=20 >>> If you remove the [Bindable] meta tag on the Foo class, it compiles = to: >>> if(baz =3D=3D com.acme.foobaz.model.Foo.BAZ) >>>=20 >>> In the debug build, these two are functionally identical. However, = when >>> Google minifies the file, it has no way of knowing that Foo.BAZ is = used. >>> This results in calling (assuming com.acme.foobaz.model.Foo becomes = k) >>> k.BAZ even though k.BAZ was optimized away and k.BAZ is undefined. >>>=20 >>> Why does [Bindable] on a class cause the bracket notation to be = used? >>>=20 >>> Harbs >>=20 >=20