I'm fine with starting with your example.  Are other versions in Royale 
including the build number?  Are you expecting the build systems to update that 
file on each build?  That might be trickier.  The Maven builds check for 
uncommitted files.

Regarding your other response, I'm not sure that grep worked with Ant on 
Windows.  It would be best to either have Ant generate the entire file or use 
its replaceregex task on a known pattern.

My 2 cents,
-Alex

On 4/30/19, 4:02 PM, "Mark Kessler" <kesslerconsult...@gmail.com> wrote:

    Don't need every SWC with a version.  Just one for the whole SDK would
    be fine.  I proposed just a single one stored in the core.  We can
    modify the build file to just point to the single file instead of
    doing a path search.  See the start of my example [1].
    
    
    [1] 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKesslerConsulting%2Froyale-asjs%2Fcommit%2F84262f3a2e56cc6b58ccdf283d039c94fb10cafb&amp;data=02%7C01%7Caharui%40adobe.com%7Cd74e4fe942624e46e11708d6cdbfdac8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636922621260197257&amp;sdata=9UFENmZCH%2BwoK3OJHx1e%2B85bu%2FhIeIr%2F94QS4NYO5xA%3D&amp;reserved=0
    
    -Mark K
    
    
    On Tue, Apr 30, 2019 at 6:42 PM Alex Harui <aha...@adobe.com.invalid> wrote:
    >
    > To be more specific:
    >
    > Version.as in Flex was included into every class.  I do not recommend 
doing that in Royale.  It didn't have enough value for the cost.
    >
    > FlexVersion.as in Flex was used for runtime versioning.  Code could use 
it to take different paths.  I hope we don't need that in Royale.
    >
    > The Flex and Royale compilers will put the compiler version in SWFs but 
do not put any string in JS output.  Someday, the Royale compiler may be 
released separately from the SWCs.  Royale may stop releasing certain SWCs in 
the future if there is no interest in maintaining them.  Then we will have to 
decide whether to update the version of those SWCs after they are frozen.  
Royale SWCs do not carry version information on a per-SWC basis.  But in some 
future, you could be using some version of the Royale compiler to compile with 
SWCs from different versions of the Royale SDKs.
    >
    > This version information is defined in the pom for folks using Maven.  It 
is not defined at all for other build mechanisms (Ant, command-line, IDEs) 
because the non-Maven artifacts do not have versions in the file names.  That's 
on purpose.  We want to make it easy for non-Maven users to swap versions of 
SDKs.  Maven users prioritize explicit dependency information over swapping of 
SDK versions.
    >
    > In summary, Royale may not be released like Flex where all SWCs are 
updated for each release along with a compiler.  So I'm not exactly sure what 
problem is trying to be solved, but it won't hurt to have a version bead or 
version constant.  And if someone wants to propose a way to get the compiler to 
inject a version string in JS output, that's fine too, but keep in mind that 
all of these verions strings might get removed during minification so they will 
probably need to be an exported public variable/constant.
    >
    > It would be great to have the version automatically updated for each 
release, but I think the number of places we currently change are small so 
having one more place probably is ok.  All it takes is a volunteer to create 
the PRs or commit the code.
    >
    > My 2 cents,
    > -Alex
    >
    >
    

Reply via email to