It didn’t add in @type?

I edited the wiki with the intention.

On Apr 21, 2016, at 2:57 PM, Christofer Dutz <christofer.d...@c-ware.de> wrote:

> I was hoping not to have to ... already wasted 3/4 of a day for this :-(
> 
> But I just ran the Ant build with your replacement ... the output is 
> identical ... the "var $ = jQuery;" line seems to pass unchanged. Perhaps 
> extending the description on the Wiki with the intention of the replacement 
> could help (I usually add a comment to the replacement to tell others what 
> the regexp does as I don't tend to be able to fluently read regexps).
> 
> Chris
> 
> ________________________________________
> Von: Harbs <harbs.li...@gmail.com>
> Gesendet: Donnerstag, 21. April 2016 13:49
> An: dev@flex.apache.org
> Betreff: Re: FlexJS, JQuery and FDT
> 
> I wish I knew. It’s probably going to have to be Alex or Josh that answers 
> this.
> 
> Good luck!
> 
> On Apr 21, 2016, at 2:44 PM, Christofer Dutz <christofer.d...@c-ware.de> 
> wrote:
> 
>> Taking this thread to develop ... :-)
>> 
>> Thanks for that ... I would have missed that one ;-)
>> 
>> Can you or someone else here explain why EXTERNC is commenting out tons of 
>> methods in the maven version? It's generating identical code, but it's 
>> commenting out a lot of methods (not all) and therefore I can't build the JS 
>> externs anymore :-(
>> 
>> This is sort of urgent, as I only have this and next week for working on 
>> this sort of stuff.
>> 
>> Chris
>> 
>> ________________________________________
>> Von: Harbs <harbs.li...@gmail.com>
>> Gesendet: Donnerstag, 21. April 2016 13:24
>> An: us...@flex.apache.org
>> Betreff: Re: FlexJS, JQuery and FDT
>> 
>> Here you go:
>> https://cwiki.apache.org/confluence/display/FLEX/@internal+changes+to+build+scripts
>> 
>> On Apr 21, 2016, at 1:43 PM, Christofer Dutz <christofer.d...@c-ware.de> 
>> wrote:
>> 
>>> That would be a better solution, but I am hoping to eliminate the need to 
>>> replicate those types of changes soon.
>>> But today I'm completely stuck with the JS externs no longer generating :-(
>>> 
>>> Chris
>>> 
>>> ________________________________________
>>> Von: Harbs <harbs.li...@gmail.com>
>>> Gesendet: Donnerstag, 21. April 2016 12:40
>>> An: us...@flex.apache.org
>>> Betreff: Re: FlexJS, JQuery and FDT
>>> 
>>> OK. Would it be easier to have a wiki page that we document build-related 
>>> changes in, so they are all in one place? We could send an email with a 
>>> link to the page when it’s edited.
>>> 
>>> On Apr 21, 2016, at 1:20 PM, Christofer Dutz <christofer.d...@c-ware.de> 
>>> wrote:
>>> 
>>>> If you change something ... write an email ... I'll replicate the changes.
>>>> I just replicated the nodejs changes ... was quite an effort, but now I'm 
>>>> back on track ... at least with that one ...
>>>> 
>>>> Chris
>>>> 
>>>> ________________________________________
>>>> Von: Harbs <harbs.li...@gmail.com>
>>>> Gesendet: Donnerstag, 21. April 2016 11:48
>>>> An: us...@flex.apache.org
>>>> Betreff: Re: FlexJS, JQuery and FDT
>>>> 
>>>> OK. Can you recommend a workflow so these changes are properly captured?
>>>> 
>>>> On Apr 21, 2016, at 12:40 PM, Christofer Dutz <christofer.d...@c-ware.de> 
>>>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> just a request from my side, If you adjust any of the 
>>>>> pre-/post-processing scripts or change javascript downloads, please 
>>>>> inform me about that cause these are impossible to auto-merge and even 
>>>>> harder to detect.
>>>>> 
>>>>> Chris
>>>>> 
>>>>> ________________________________________
>>>>> Von: Alex Harui <aha...@adobe.com>
>>>>> Gesendet: Donnerstag, 21. April 2016 09:07
>>>>> An: us...@flex.apache.org
>>>>> Betreff: Re: FlexJS, JQuery and FDT
>>>>> 
>>>>> We do these kinds of changes with Ant replace and replaceregex in the
>>>>> build.xml.  See the top-level build.xml and the externc.js.swc target.
>>>>> 
>>>>> -Alex
>>>>> 
>>>>> On 4/21/16, 12:04 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>>>>> 
>>>>>> Bah. .gitignore has this entry: externs/jquery/externs
>>>>>> 
>>>>>> Is there any way to make this change and have it “stick” in the repo?
>>>>>> 
>>>>>> On Apr 21, 2016, at 10:00 AM, Harbs <harbs.li...@gmail.com> wrote:
>>>>>> 
>>>>>>> OK. I’ll make that change. I don’t have time to test today, so I’ll see
>>>>>>> what happens in the next nightly…
>>>>>>> 
>>>>>>> On Apr 21, 2016, at 9:55 AM, Alex Harui <aha...@adobe.com> wrote:
>>>>>>> 
>>>>>>>> I think it should be:
>>>>>>>> 
>>>>>>>> /**
>>>>>>>> * @const
>>>>>>>> * @type {jQuery}
>>>>>>>> */
>>>>>>>> var $ = jQuery;
>>>>>>>> 
>>>>>>>> Look at other extern files for similar usage.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -Alex
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 4/20/16, 11:36 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>>> Yes. I was looking in asjs instead of falcon…
>>>>>>>>> 
>>>>>>>>> I’ve never done typdefs before. Does this look right?
>>>>>>>>> 
>>>>>>>>> /**
>>>>>>>>> * @const
>>>>>>>>> * @typedef {jQuery}
>>>>>>>>> */
>>>>>>>>> var $ = jQuery;
>>>>>>>>> 
>>>>>>>>> It’s currently:
>>>>>>>>> /**
>>>>>>>>> * @const
>>>>>>>>> */
>>>>>>>>> var $ = jQuery;
>>>>>>>>> 
>>>>>>>>> On Apr 21, 2016, at 9:25 AM, OmPrakash Muppirala
>>>>>>>>> <bigosma...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> I think this is what you are looking for?
>>>>>>>>>> : flex-falcon\externs\jquery\externs\jquery-1.9.js
>>>>>>>>>> 
>>>>>>>>>> Thanks,
>>>>>>>>>> Om
>>>>>>>>>> 
>>>>>>>>>> On Wed, Apr 20, 2016 at 11:21 PM, Harbs <harbs.li...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> I’m looking for where the jQuery definitions are and I can’t seem to
>>>>>>>>>>> find
>>>>>>>>>>> it.
>>>>>>>>>>> 
>>>>>>>>>>> On Apr 21, 2016, at 3:17 AM, Alex Harui <aha...@adobe.com> wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Looks like the externs file doesn't have an @type for the $
>>>>>>>>>>>> constant.
>>>>>>>>>>> You
>>>>>>>>>>>> can try adding it in the build script or see if Google will accept
>>>>>>>>>>>> a
>>>>>>>>>>> patch
>>>>>>>>>>>> for it.
>>>>>>>>>>>> 
>>>>>>>>>>>> -Alex
>>>>>>>>>>>> 
>>>>>>>>>>>> On 4/20/16, 4:13 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Replacing “$” with “jQuery” makes the warnings go away. Why would
>>>>>>>>>>>>> “$” be
>>>>>>>>>>>>> different than “jQuery”? It sounds to me like a bug in the
>>>>>>>>>>>>> definitions.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> jQuery always returns a JQuery object which has many defined
>>>>>>>>>>>>> methods.
>>>>>>>>>>> One
>>>>>>>>>>>>> of those is attr.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> On Apr 21, 2016, at 1:50 AM, Alex Harui <aha...@adobe.com> wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> IMO, this is why Jquery is painful for strong typing.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I think you may need to do casting:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> ($("#topcoat") as Whatever).attr(..)
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Where Whatever is a "type" that has an attr function.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> And you may need to use @flexjsignorecoercion or other compiler
>>>>>>>>>>>>>> options
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> not actually do the "as" test in the JS output.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Good luck,
>>>>>>>>>>>>>> -Alex
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On 4/20/16, 3:46 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Here’s an example:
>>>>>>>>>>>>>>> $("#topcoat").attr("href",
>>>>>>>>>>>>>>> "css/topcoat-desktop-lightlight.min.css");
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> It looks like “$” is defined as an object.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Here’s the exact warnings I’m getting:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Could not resolve variable (may be a dynamic member) 'attr' at
>>>>>>>>>>>>>>> line 43
>>>>>>>>>>>>>>> column 19. ThemeManager.as /MyExtension/src/com/unhurdle
>>>>>>>>>>>>>>> Unknown
>>>>>>>>>>> Flash
>>>>>>>>>>>>>>> Problem
>>>>>>>>>>>>>>> Maybe invoking a non function. Found
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> $("#topcoat").attr("href","css/topcoat-desktop-lightlight.min.css
>>>>>>>>>>>>>>> ");
>>>>>>>>>>> at
>>>>>>>>>>>>>>> line 43 column
>>>>>>>>>>>>>>> 5. ThemeManager.as /MyExtension/src/com/unhurdle   Unknown Flash
>>>>>>>>>>> Problem
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> And yes, js/libs/jquery.swc is included. If I remove it, I get
>>>>>>>>>>>>>>> an
>>>>>>>>>>> error
>>>>>>>>>>>>>>> that “$” is not defined instead of a warning.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On Apr 21, 2016, at 1:39 AM, Alex Harui <aha...@adobe.com>
>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On 4/20/16, 3:34 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Does anyone know if there’s a way to get FDT to not flag
>>>>>>>>>>>>>>>>> JQuery
>>>>>>>>>>>>>>>>> expressions with “could not resolve variable” and "Maybe
>>>>>>>>>>>>>>>>> invoke a
>>>>>>>>>>> non
>>>>>>>>>>>>>>>>> function” warnings?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> What kind of expressions result in this output?  Are you sure
>>>>>>>>>>>>>>>> you
>>>>>>>>>>> have
>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>> jquery.swc from the externs on the -external-library-path?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> -Alex
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 

Reply via email to