You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Carlos Rovira <ca...@apache.org> on 2017/02/21 19:12:12 UTC

[FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Hi,

the problem arised by Chris in SpriteFlexJS branch shows that there's no
COMPILE::JS or COMPILE::SWF. Since SpriteFlexJS is only JS, seems Lizhi
doesn't need SWF platform.

So I think he compiles in a way that only target JS platform and compiler
doesn't fail when COMPILE::JS is not found. How does he make that? Or how
could I do something like this?

If we want to have SpriteFlexJS with us, I think one of the things to do is
add those COMPILE::JS to the code.

What do you think?

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Alex,

That sounds very promising ☺ Looking forward to it.

Chris

Am 22.02.17, 17:13 schrieb "Alex Harui" <ah...@adobe.com>:

    
    
    On 2/22/17, 2:43 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:
    
    >Well I guess the thing is that you are building a SWC.
    >
    >Till now we were expecting to build SWCs to be usable in SWF and JS.
    >Therefore we don’t have the concept of “pure JS swcs”.
    >If this is a thing, eventually it would be good to define different
    >naming:
    >- swc (pure flash)
    >- js (pure js)
    >- jswc (both js and flash)
    
    In the dual branch, I am changing things around to generate a SWC that has
    SWF code compiled based on playerglobal/airglobal + js (which is what our
    SWCs contain now), and -js.SWC which contain APIs compiled based on js.swc
    and also contain the .js files needed.
    Once that lands, I'll just have to make it possible to skip generation of
    one or the other.
    
    -Alex
    
    


Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Alex Harui <ah...@adobe.com>.

On 2/22/17, 2:43 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:

>Well I guess the thing is that you are building a SWC.
>
>Till now we were expecting to build SWCs to be usable in SWF and JS.
>Therefore we don’t have the concept of “pure JS swcs”.
>If this is a thing, eventually it would be good to define different
>naming:
>- swc (pure flash)
>- js (pure js)
>- jswc (both js and flash)

In the dual branch, I am changing things around to generate a SWC that has
SWF code compiled based on playerglobal/airglobal + js (which is what our
SWCs contain now), and -js.SWC which contain APIs compiled based on js.swc
and also contain the .js files needed.
Once that lands, I'll just have to make it possible to skip generation of
one or the other.

-Alex


Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Carlos Rovira <ca...@codeoscopic.com>.
Thanks Chris, as I state in the other thread fix works now and I can now
follow up with my duties in that library
thanks!

2017-02-22 13:24 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:

> It should be:
>
>    <configuration>
>       <skipAS>true</skipAS>
>     </configuration>
>
> But as I wrote in the other thread … seems to be broken atm and I’ll fix
> it as soon as possible. But still I think this would produce output which
> isn’t usable in normal flash projects so I think they should be
> distinguishable.
>
> Chris
>
> Am 22.02.17, 13:03 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos
> Rovira" <carlos.rovira@gmail.com im Auftrag von
> carlos.rovira@codeoscopic.com>:
>
>     Hi Chris,
>
>     thanks, but I tried "skipAS=true” with
>
>     <configuration>
>               <additionalCompilerOptions>skipAS=true</
> additionalCompilerOptions>
>
>     and compilation fails in the same way
>
>
>
>
>
>     2017-02-22 12:13 GMT+01:00 Christofer Dutz <christofer.dutz@c-ware.de
> >:
>
>     > Hi,
>     >
>     > I just had another look at the mojo and you can suppress the AS
>     > compilation by setting “skipAS=true” … then you should probably be
> able to
>     > build without the defines.
>     >
>     > Chris
>     >
>     > Am 22.02.17, 11:43 schrieb "Christofer Dutz" <
> christofer.dutz@c-ware.de>:
>     >
>     >     Well I guess the thing is that you are building a SWC.
>     >
>     >     Till now we were expecting to build SWCs to be usable in SWF and
> JS.
>     > Therefore we don’t have the concept of “pure JS swcs”.
>     >     If this is a thing, eventually it would be good to define
> different
>     > naming:
>     >     - swc (pure flash)
>     >     - js (pure js)
>     >     - jswc (both js and flash)
>     >
>     >     This could make things easier with the externs/typedefs as these
> would
>     > be “js” type with scope “provided” …
>     >
>     >     What do the others think? Would require quite a major
> refactoring of
>     > the poms and a slight adjustement of the maven plugin. But I think
> it would
>     > make things clearer.
>     >
>     >     Chris
>     >
>     >     Am 22.02.17, 08:51 schrieb "Alex Harui" <ah...@adobe.com>:
>     >
>     >
>     >
>     >         On 2/21/17, 11:40 AM, "Josh Tynjala" <jo...@gmail.com>
>     > wrote:
>     >
>     >         >COMPILE::JS and COMPILE:SWC are just regular compile-time
>     > constants. As
>     >         >far
>     >         >as I know, they receive no special treatment from the
> compiler.
>     > It's just
>     >         >a
>     >         >convention used by the FlexJS framework projects to make the
>     > components
>     >         >exclude certain code on some platforms. If you're targeting
> one
>     > platform,
>     >         >there shouldn't be any need to exclude anything, so this
> project
>     > shouldn't
>     >         >need COMPILE::JS at all.
>     >         >
>     >         >Why do you feel that COMPILE::JS is needed?
>     >
>     >         I think because Maven automatically plugs in playerglobal or
>     > airglobal for
>     >         the SWF build of a SWC.  I think Maven has some skip options
> that
>     > can go
>     >         in the POM?
>     >
>     >         -Alex
>     >
>     >
>     >
>     >
>     >
>     >
>
>
>     --
>
>     Carlos Rovira
>     Director General
>     M: +34 607 22 60 05
>     http://www.codeoscopic.com
>     http://www.avant2.es
>
>     Este mensaje se dirige exclusivamente a su destinatario y puede
> contener
>     información privilegiada o confidencial. Si ha recibido este mensaje
> por
>     error, le rogamos que nos lo comunique inmediatamente por esta misma
> vía y
>     proceda a su destrucción.
>
>     De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> comunicamos
>     que sus datos forman parte de un fichero cuyo responsable es
> CODEOSCOPIC
>     S.A. La finalidad de dicho tratamiento es facilitar la prestación del
>     servicio o información solicitados, teniendo usted derecho de acceso,
>     rectificación, cancelación y oposición de sus datos dirigiéndose a
> nuestras
>     oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
>     necesaria.
>
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.

Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Christofer Dutz <ch...@c-ware.de>.
It should be:
 
   <configuration>
      <skipAS>true</skipAS>
    </configuration>

But as I wrote in the other thread … seems to be broken atm and I’ll fix it as soon as possible. But still I think this would produce output which isn’t usable in normal flash projects so I think they should be distinguishable.

Chris

Am 22.02.17, 13:03 schrieb "carlos.rovira@gmail.com im Auftrag von Carlos Rovira" <carlos.rovira@gmail.com im Auftrag von carlos.rovira@codeoscopic.com>:

    Hi Chris,
    
    thanks, but I tried "skipAS=true” with
    
    <configuration>
              <additionalCompilerOptions>skipAS=true</additionalCompilerOptions>
    
    and compilation fails in the same way
    
    
    
    
    
    2017-02-22 12:13 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:
    
    > Hi,
    >
    > I just had another look at the mojo and you can suppress the AS
    > compilation by setting “skipAS=true” … then you should probably be able to
    > build without the defines.
    >
    > Chris
    >
    > Am 22.02.17, 11:43 schrieb "Christofer Dutz" <ch...@c-ware.de>:
    >
    >     Well I guess the thing is that you are building a SWC.
    >
    >     Till now we were expecting to build SWCs to be usable in SWF and JS.
    > Therefore we don’t have the concept of “pure JS swcs”.
    >     If this is a thing, eventually it would be good to define different
    > naming:
    >     - swc (pure flash)
    >     - js (pure js)
    >     - jswc (both js and flash)
    >
    >     This could make things easier with the externs/typedefs as these would
    > be “js” type with scope “provided” …
    >
    >     What do the others think? Would require quite a major refactoring of
    > the poms and a slight adjustement of the maven plugin. But I think it would
    > make things clearer.
    >
    >     Chris
    >
    >     Am 22.02.17, 08:51 schrieb "Alex Harui" <ah...@adobe.com>:
    >
    >
    >
    >         On 2/21/17, 11:40 AM, "Josh Tynjala" <jo...@gmail.com>
    > wrote:
    >
    >         >COMPILE::JS and COMPILE:SWC are just regular compile-time
    > constants. As
    >         >far
    >         >as I know, they receive no special treatment from the compiler.
    > It's just
    >         >a
    >         >convention used by the FlexJS framework projects to make the
    > components
    >         >exclude certain code on some platforms. If you're targeting one
    > platform,
    >         >there shouldn't be any need to exclude anything, so this project
    > shouldn't
    >         >need COMPILE::JS at all.
    >         >
    >         >Why do you feel that COMPILE::JS is needed?
    >
    >         I think because Maven automatically plugs in playerglobal or
    > airglobal for
    >         the SWF build of a SWC.  I think Maven has some skip options that
    > can go
    >         in the POM?
    >
    >         -Alex
    >
    >
    >
    >
    >
    >
    
    
    -- 
    
    Carlos Rovira
    Director General
    M: +34 607 22 60 05
    http://www.codeoscopic.com
    http://www.avant2.es
    
    Este mensaje se dirige exclusivamente a su destinatario y puede contener
    información privilegiada o confidencial. Si ha recibido este mensaje por
    error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
    proceda a su destrucción.
    
    De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
    que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
    S.A. La finalidad de dicho tratamiento es facilitar la prestación del
    servicio o información solicitados, teniendo usted derecho de acceso,
    rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
    oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
    necesaria.
    


Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Chris,

thanks, but I tried "skipAS=true” with

<configuration>
          <additionalCompilerOptions>skipAS=true</additionalCompilerOptions>

and compilation fails in the same way





2017-02-22 12:13 GMT+01:00 Christofer Dutz <ch...@c-ware.de>:

> Hi,
>
> I just had another look at the mojo and you can suppress the AS
> compilation by setting “skipAS=true” … then you should probably be able to
> build without the defines.
>
> Chris
>
> Am 22.02.17, 11:43 schrieb "Christofer Dutz" <ch...@c-ware.de>:
>
>     Well I guess the thing is that you are building a SWC.
>
>     Till now we were expecting to build SWCs to be usable in SWF and JS.
> Therefore we don’t have the concept of “pure JS swcs”.
>     If this is a thing, eventually it would be good to define different
> naming:
>     - swc (pure flash)
>     - js (pure js)
>     - jswc (both js and flash)
>
>     This could make things easier with the externs/typedefs as these would
> be “js” type with scope “provided” …
>
>     What do the others think? Would require quite a major refactoring of
> the poms and a slight adjustement of the maven plugin. But I think it would
> make things clearer.
>
>     Chris
>
>     Am 22.02.17, 08:51 schrieb "Alex Harui" <ah...@adobe.com>:
>
>
>
>         On 2/21/17, 11:40 AM, "Josh Tynjala" <jo...@gmail.com>
> wrote:
>
>         >COMPILE::JS and COMPILE:SWC are just regular compile-time
> constants. As
>         >far
>         >as I know, they receive no special treatment from the compiler.
> It's just
>         >a
>         >convention used by the FlexJS framework projects to make the
> components
>         >exclude certain code on some platforms. If you're targeting one
> platform,
>         >there shouldn't be any need to exclude anything, so this project
> shouldn't
>         >need COMPILE::JS at all.
>         >
>         >Why do you feel that COMPILE::JS is needed?
>
>         I think because Maven automatically plugs in playerglobal or
> airglobal for
>         the SWF build of a SWC.  I think Maven has some skip options that
> can go
>         in the POM?
>
>         -Alex
>
>
>
>
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.

Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi,

I just had another look at the mojo and you can suppress the AS compilation by setting “skipAS=true” … then you should probably be able to build without the defines.

Chris

Am 22.02.17, 11:43 schrieb "Christofer Dutz" <ch...@c-ware.de>:

    Well I guess the thing is that you are building a SWC.
    
    Till now we were expecting to build SWCs to be usable in SWF and JS. Therefore we don’t have the concept of “pure JS swcs”.
    If this is a thing, eventually it would be good to define different naming:
    - swc (pure flash)
    - js (pure js)
    - jswc (both js and flash)
    
    This could make things easier with the externs/typedefs as these would be “js” type with scope “provided” …
    
    What do the others think? Would require quite a major refactoring of the poms and a slight adjustement of the maven plugin. But I think it would make things clearer.
    
    Chris
    
    Am 22.02.17, 08:51 schrieb "Alex Harui" <ah...@adobe.com>:
    
        
        
        On 2/21/17, 11:40 AM, "Josh Tynjala" <jo...@gmail.com> wrote:
        
        >COMPILE::JS and COMPILE:SWC are just regular compile-time constants. As
        >far
        >as I know, they receive no special treatment from the compiler. It's just
        >a
        >convention used by the FlexJS framework projects to make the components
        >exclude certain code on some platforms. If you're targeting one platform,
        >there shouldn't be any need to exclude anything, so this project shouldn't
        >need COMPILE::JS at all.
        >
        >Why do you feel that COMPILE::JS is needed?
        
        I think because Maven automatically plugs in playerglobal or airglobal for
        the SWF build of a SWC.  I think Maven has some skip options that can go
        in the POM?
        
        -Alex
        
        
    
    


Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Christofer Dutz <ch...@c-ware.de>.
Well I guess the thing is that you are building a SWC.

Till now we were expecting to build SWCs to be usable in SWF and JS. Therefore we don’t have the concept of “pure JS swcs”.
If this is a thing, eventually it would be good to define different naming:
- swc (pure flash)
- js (pure js)
- jswc (both js and flash)

This could make things easier with the externs/typedefs as these would be “js” type with scope “provided” …

What do the others think? Would require quite a major refactoring of the poms and a slight adjustement of the maven plugin. But I think it would make things clearer.

Chris

Am 22.02.17, 08:51 schrieb "Alex Harui" <ah...@adobe.com>:

    
    
    On 2/21/17, 11:40 AM, "Josh Tynjala" <jo...@gmail.com> wrote:
    
    >COMPILE::JS and COMPILE:SWC are just regular compile-time constants. As
    >far
    >as I know, they receive no special treatment from the compiler. It's just
    >a
    >convention used by the FlexJS framework projects to make the components
    >exclude certain code on some platforms. If you're targeting one platform,
    >there shouldn't be any need to exclude anything, so this project shouldn't
    >need COMPILE::JS at all.
    >
    >Why do you feel that COMPILE::JS is needed?
    
    I think because Maven automatically plugs in playerglobal or airglobal for
    the SWF build of a SWC.  I think Maven has some skip options that can go
    in the POM?
    
    -Alex
    
    


Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Alex Harui <ah...@adobe.com>.

On 2/21/17, 11:40 AM, "Josh Tynjala" <jo...@gmail.com> wrote:

>COMPILE::JS and COMPILE:SWC are just regular compile-time constants. As
>far
>as I know, they receive no special treatment from the compiler. It's just
>a
>convention used by the FlexJS framework projects to make the components
>exclude certain code on some platforms. If you're targeting one platform,
>there shouldn't be any need to exclude anything, so this project shouldn't
>need COMPILE::JS at all.
>
>Why do you feel that COMPILE::JS is needed?

I think because Maven automatically plugs in playerglobal or airglobal for
the SWF build of a SWC.  I think Maven has some skip options that can go
in the POM?

-Alex


Re: [FlexJS][SpriteFlexJS] DEFINES not in SpriteJS

Posted by Josh Tynjala <jo...@gmail.com>.
COMPILE::JS and COMPILE:SWC are just regular compile-time constants. As far
as I know, they receive no special treatment from the compiler. It's just a
convention used by the FlexJS framework projects to make the components
exclude certain code on some platforms. If you're targeting one platform,
there shouldn't be any need to exclude anything, so this project shouldn't
need COMPILE::JS at all.

Why do you feel that COMPILE::JS is needed?

- Josh

On Tue, Feb 21, 2017 at 11:12 AM, Carlos Rovira <ca...@apache.org>
wrote:

> Hi,
>
> the problem arised by Chris in SpriteFlexJS branch shows that there's no
> COMPILE::JS or COMPILE::SWF. Since SpriteFlexJS is only JS, seems Lizhi
> doesn't need SWF platform.
>
> So I think he compiles in a way that only target JS platform and compiler
> doesn't fail when COMPILE::JS is not found. How does he make that? Or how
> could I do something like this?
>
> If we want to have SpriteFlexJS with us, I think one of the things to do is
> add those COMPILE::JS to the code.
>
> What do you think?
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>