Re: Avoiding goog renaming

2016-12-14 Thread Harbs
I personally don’t like the convention to use comments. It feels more like a hack than a language feature. But it’s not a show-stopper. I would vote for [Externs] or @externs rather than /*@externs*/ On Dec 14, 2016, at 1:19 AM, Alex Harui wrote: > As an ASDoc tag, so /** @externs */ > > On 1

Re: Avoiding goog renaming

2016-12-13 Thread Alex Harui
As an ASDoc tag, so /** @externs */ On 12/13/16, 1:23 PM, "Harbs" wrote: >Do you mean /*@externs*/ or @externs (which is currently not valid code)? > >On Dec 13, 2016, at 6:19 PM, Alex Harui wrote: > >> >> >> On 12/13/16, 12:48 AM, "Harbs" wrote: >> >>> What I’d really like to do would be t

Re: Avoiding goog renaming

2016-12-13 Thread Harbs
Do you mean /*@externs*/ or @externs (which is currently not valid code)? On Dec 13, 2016, at 6:19 PM, Alex Harui wrote: > > > On 12/13/16, 12:48 AM, "Harbs" wrote: > >> What I’d really like to do would be to define a class like this: >> >> package >> { >> import stream.Stream; >> >>

Re: Avoiding goog renaming

2016-12-13 Thread Alex Harui
On 12/13/16, 10:41 AM, "omup...@gmail.com on behalf of OmPrakash Muppirala" wrote: >(Possible unrelated to the current discussion) > >For what it's worth, Typescript is pushing the metadata (decorators) >concept forward [1] >Angular2 is fully utilizing this concept in the form of annotations [2

Re: Avoiding goog renaming

2016-12-13 Thread OmPrakash Muppirala
(Possible unrelated to the current discussion) For what it's worth, Typescript is pushing the metadata (decorators) concept forward [1] Angular2 is fully utilizing this concept in the form of annotations [2] There is also a proposal to add metadata/decorators in Javascript directly [3] Looks lik

Re: Avoiding goog renaming

2016-12-13 Thread Alex Harui
On 12/13/16, 12:48 AM, "Harbs" wrote: >What I’d really like to do would be to define a class like this: > >package >{ > import stream.Stream; > >[Extern] >public class JSZip > { > public function generateNodeStream(nsp:NodeStreamParam):Stream{ >

Re: Avoiding goog renaming

2016-12-13 Thread Alex Harui
On 12/13/16, 12:44 AM, "Harbs" wrote: >I’m in the same boat. > >I think metadata tags feel much better as well. Well, IMO, metadata is additional byte code or JS output. There is no reason for @externs or @flexjsignorecoercion to be in the output. In fact, if we used metadata for these direc

Re: Avoiding goog renaming

2016-12-13 Thread Harbs
What I’d really like to do would be to define a class like this: package { import stream.Stream; [Extern] public class JSZip { public function generateNodeStream(nsp:NodeStreamParam):Stream{ return null; } }

Re: Avoiding goog renaming

2016-12-13 Thread Harbs
I’m in the same boat. I think metadata tags feel much better as well. If tools can help with validating metadata tags it would be even better. On Dec 12, 2016, at 7:13 PM, Josh Tynjala wrote: > I notice that you seem to have a preference for custom ASDoc tags, like > @externs or @flexjsignorec

Re: Avoiding goog renaming

2016-12-12 Thread Alex Harui
On 12/12/16, 9:50 AM, "Josh Tynjala" wrote: >Off the top of my head, [Frame] and [SWF] are also used to change compiler >output. I can see how it's a little weird that some metadata is used at >compile-time and some at runtime, but as a developer, I think it's really >useful. I forgot about th

Re: Avoiding goog renaming

2016-12-12 Thread Josh Tynjala
Off the top of my head, [Frame] and [SWF] are also used to change compiler output. I can see how it's a little weird that some metadata is used at compile-time and some at runtime, but as a developer, I think it's really useful. Anyway, if it's an asdoc tag that FalconJX will preserve to configure

Re: Avoiding goog renaming

2016-12-12 Thread Alex Harui
On 12/12/16, 9:13 AM, "Josh Tynjala" wrote: >Yeah, if we could make it work without creating a SWC, I think that would >be ideal. The fewer steps it takes to add third-party libraries to a >project, the better. > >I notice that you seem to have a preference for custom ASDoc tags, like >@externs

Re: Avoiding goog renaming

2016-12-12 Thread Josh Tynjala
Yeah, if we could make it work without creating a SWC, I think that would be ideal. The fewer steps it takes to add third-party libraries to a project, the better. I notice that you seem to have a preference for custom ASDoc tags, like @externs or @flexjsignorecoercion for changing the compiler's

Re: Avoiding goog renaming

2016-12-12 Thread Alex Harui
On 12/12/16, 8:37 AM, "Josh Tynjala" wrote: >I think most developers would be >more comfortable writing a few classes in ActionScript for a third-party >library, Agreed, because not only do you get type-checking, but you also get to "bullet-proof" the API. For these JS libraries that you pass

Re: Avoiding goog renaming

2016-12-12 Thread Josh Tynjala
Yes, it should be that simple. If we could make the compc compiler able to (optionally) generate externs from ActionScript files somehow, that would make using third-party libraries easier. I think most developers would be more comfortable writing a few classes in ActionScript for a third-party lib

Re: Avoiding goog renaming

2016-12-12 Thread Alex Harui
On 12/11/16, 11:56 PM, "Harbs" wrote: >I thought I tried something similar and declaring the types did not help >(i.e. the externs were not generated), but maybe I did something wrong. > >I’ll try again. > >> The reason to create an AS API for a 3rd party library is more than just >> preventing

Re: Avoiding goog renaming

2016-12-12 Thread Alex Harui
On 12/12/16, 12:28 AM, "Harbs" wrote: >Yup. It’s not working as I thought. > >I just did this: What did NodeStreamParams.js and JSZip.js look like, and did you include them as externs in a typedefs SWC and/or via compiler options? The steps required to do so are the steps I think the compiler

Re: Avoiding goog renaming

2016-12-12 Thread Harbs
Yup. It’s not working as I thought. I just did this: NodeStreamParams.as: package com.printui.utils { public class NodeStreamParam { public function NodeStreamParam(type:String,streamFiles:Boolean) { this.type = type; this.streamFiles = stre

Re: Avoiding goog renaming

2016-12-11 Thread Harbs
I thought I tried something similar and declaring the types did not help (i.e. the externs were not generated), but maybe I did something wrong. I’ll try again. > The reason to create an AS API for a 3rd party library is more than just > preventing renaming. It is to allow the compiler to check

Re: Avoiding goog renaming

2016-12-11 Thread Alex Harui
On 12/11/16, 10:48 PM, "Harbs" wrote: > >On Dec 12, 2016, at 7:52 AM, Alex Harui wrote: > >> >> >> On 12/11/16, 10:28 AM, "Harbs" wrote: >> >>> I DO want renaming. >>> >>> My point is that we really need to have an option to disable renaming >>>in >>> specific places in the code. >>> >>>

Re: Avoiding goog renaming

2016-12-11 Thread Harbs
On Dec 12, 2016, at 7:52 AM, Alex Harui wrote: > > > On 12/11/16, 10:28 AM, "Harbs" wrote: > >> I DO want renaming. >> >> My point is that we really need to have an option to disable renaming in >> specific places in the code. >> >> My example is a very classic case when interop between ou

Re: Avoiding goog renaming

2016-12-11 Thread Alex Harui
On 12/11/16, 10:28 AM, "Harbs" wrote: >I DO want renaming. > >My point is that we really need to have an option to disable renaming in >specific places in the code. > >My example is a very classic case when interop between outside code is >going to cause problems. I CAN’T use class definitions

Re: Avoiding goog renaming

2016-12-11 Thread Harbs
I DO want renaming. My point is that we really need to have an option to disable renaming in specific places in the code. My example is a very classic case when interop between outside code is going to cause problems. I CAN’T use class definitions everywhere. There needs to be a method to prop

Re: Avoiding goog renaming

2016-12-11 Thread Alex Harui
There is a compiler option to turn off renaming in the release build if you don't care about size. IMO, use of * and plain Object is going to result in renaming issues. Use class definitions everywhere. I've mentioned in the past about a compiler warning on use of * and Object to help. For Obje

Re: Avoiding goog renaming

2016-12-11 Thread Harbs
I’ve been spending WAY too much time dealing with goog renaming. I have a good example of the kind of issues I’ve been dealing with. I think this is an area where Falcon needs to do a better job. I have some code which looks like this: var JSZip:* = require("jszip");

Re: Avoiding goog renaming

2016-12-06 Thread Alex Harui
On 12/5/16, 11:47 PM, "Harbs" wrote: >OK. I guess I’ll rework the definitions into extern js files when I have >time. In theory, if you use FalconJX to cross-compile those AS files, you should get the right set of JS files to stick a folder called externs (instead of js/out). The build script

Re: Avoiding goog renaming

2016-12-05 Thread Harbs
OK. I guess I’ll rework the definitions into extern js files when I have time. For now, using brackets seems to work. On Dec 6, 2016, at 9:31 AM, Alex Harui wrote: > > > On 12/5/16, 11:12 PM, "Harbs" wrote: > >> I created a swc library[1] which relies on some typedefs which I created >> usi

Re: Avoiding goog renaming

2016-12-05 Thread Alex Harui
On 12/5/16, 11:12 PM, "Harbs" wrote: >I created a swc library[1] which relies on some typedefs which I created >using ActionScript[2]. > >This all works well when I debug. However, when I compile a release >build, the “cep global” methods are being renamed and when executed, I >get “function un

Avoiding goog renaming

2016-12-05 Thread Harbs
I created a swc library[1] which relies on some typedefs which I created using ActionScript[2]. This all works well when I debug. However, when I compile a release build, the “cep global” methods are being renamed and when executed, I get “function undefined” errors. I’m not sure what I’m doin