Open javeiga-iest opened 3 years ago
Hi Javier, probably this is related to the changes we are doing in the maven distribution (if you're using it) We are still working on it. You probably need to update to this commit: 3aa93d41d54c44c5cbb84e3950980b8eaa002931 Since we are now working on the swf side
I have my development branch updated https://github.com/apache/royale-asjs/commit/c2a7d5e4761c37d1baddeb6b0cb2d897f45a28db but i still have the same problem.
Is there a temporary solution to be able to continue working?
Hi Javier,
I build all today (without latest Josh changes about player global generation). Then build todomvc-crux-jewel example with maven and with maven sdk distribution in vscode and all worked fine.
Then I added this to Beans.mxml:
<crux:Bean id="dynamicChannels">
<crux:source>
<fx:Array>
<fx:Object/>
</fx:Array>
</crux:source>
</crux:Bean>
And still build ok. So can't find any issue. How you're building?
It seems that the problem only appears with "libraries". Let's see if I have time later and try to pass todomvc-crux-jewel to the library and app ... I'll tell you how it looks.
Hiedra
ok, so the problem is to have an mxml in a library that uses a fx:Array (and I guess any other fx:Object), right? This was working before latest changes in Royale?
Yes, as additional information we have these classes in a separate project as a library. In fact, if I move the class to the main project, it compiles correctly.
Hi @javeiga-iest, @chrisdutz asked about issues with current maven distro and I want to ask you if this problem still remains. I saw an email from Maria Jose yesterday that I didn't understand completely and could mean that problem is solved. Please let us know.
By adding the following line to the additionalCompilerOptions statement apparently solves the problem:
-compiler.js-namespaces.namespace+=http://ns.adobe.com/mxml/2009,${env.ROYALE_HOME}/frameworks/mxml-2009-manifest.xml;
What we do not know if it is the correct solution, because before the changes of the SDK, our library took the reference correctly.
For now, i leave this answer as a solution and close the issue
Ok Thanks. I think we need to add something to a royale-config in maven probably
Reopening because that's a workaround and not the solution. Using classes like <fx:Array>
in MXML should "just work" without any extra configuration.
The truth is that I do not know if it is "the correct patch". I have applied it to 2 projects and in one it works perfectly and in the other it causes an error in runtime when loading App:
I don't think this is a "valid patch"
Hiedra.
Sorry, I forgot to point out that the error occurs when loading the BeanProvider in App.mxml (the code is in Jose's first email). This Beanprovider is where
Hiedra
Hi, probably the problem with one lib project working and the other not was a hidden problem that was not shown with the older config. The patch seems valid to me, but we need to solve at SDK level so you can remove it.
Is there a demo application I your use to replicate the problem?
The strange thing is that the royale-config lists the manifest you manually added ... so not quite sure why this has any effect at all.
Chris, I got this email and it spammed me “apache/royale-asjs reply@reply.github.commailto:reply@reply.github.com>” , sorry, I didn't read it ...
Yes, there is an example application that Carlos has created and I have made some changes ... https://github.com/mjesteve/royale-asjs/tree/Example_AppWithLib
Hope this can help you Hiedra
De: Christofer Dutz notifications@github.com Enviado el: domingo, 28 de febrero de 2021 12:25 Para: apache/royale-asjs royale-asjs@noreply.github.com CC: Maria Jose Esteve mjesteve@iest.com; Comment comment@noreply.github.com Asunto: Re: [apache/royale-asjs] fx:Array tag could not be resolved to an ActionScript class. (#1083)
Is there a demo application I your use to replicate the problem?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/apache/royale-asjs/issues/1083#issuecomment-787436545, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANJL3U45HTJ33MZTZ5YQJZDTBIRXDANCNFSM4YA34VEQ.
Compiling the previous version of the SDK we still have problems, can it have something to do with the artifacts that are downloaded regardless of the version compiled locally? Is there a way to properly compile the old version?
I'm currently actually completely rewriting the distribution process for maven. It turned out a lot of the static resources in the maven distribution were out of sync with the ones in the ANT distribtion. In order to prevent that, I'm going to take the ANT versions and convert them to be compatible with the Maven version ... hopefully I'll also be able to add the project sources so you don't need to double add the SDKs for debugging ... however with is going to take a few more days (As I can only work on this in my free time)
@chrisdutz please do this on the branch, so we could test it with our projects. Thanks!
It's all on the branch: "feature/distribution-alignment" (Now that I know that the Maven distribution is being used .. I'm a bit more careful ;-) ) ... but a lot of not committed stuff right now ... gotta get the time to reach a checkpoint first or I'll just be pushing broken stuff.
Chris, I can't generate the maven distribution with your branch (There are so many emails that I don't know where to reply ...):
[INFO] mxmlc .............................................. SUCCESS [ 0.336 s] [INFO] Apache Royale: Distribution ........................ FAILURE [ 0.684 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:33 min [INFO] Finished at: 2021-03-02T17:21:32+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project distribution: Could not resolve dependencies for project org.apache.royale.framework:distribution:pom:0.9.8-SNAPSHOT: Could not find artifact org.apache.royale.compiler:compiler:jar:scripts:0.9.8-SNAPSHOT in apache.snapshots (https://repository.apache.org/snapshots) -> [Help 1]
Does it work for any of you?
Hi
Have you also checked out and built the same branch in compiler and typedef repo? It needs changes in those too.
Chris
I don't think she need to do that. In general all the stuff should be reachable from maven central. Above issue is well known to me, I cannot in 100% that this is the case, but in general - there 100% reproducibility on my PC and several other one with Windows.
Sometimes build needs 3 attempts to have all artifacts downloaded and reach real building. @mjesteve please try again.
But she said in my branch ... I created an additional artifact in the compiler module to pack up all the scripts. As it's only in a branch it's not available from the Apache repo. Same with the ACE typedef ... that should only be available in my feature-branch. And both are needed for my updated distribution.
It is true Piotr, there are times that I have to launch the compilation several times for it to be successful, this time I did not have the precaution to do it ... With the synced branches of royale-compiler and royale-typedefs, without touching anything else, it compiled me ok. Now I'm going to test the SampleLib sample project and tell you about it. Hiedra.
But please ... it's still a work in progress ;-) ... of course I would be super happy for feedback that everything is working ... but please don't expect it to :-) But always happy for feedback.
Hahahaha, Of course Chris, I do it to give you feedback, to help a little. You tell me the tests that you need that I do.
Hiedra.
Ööööhm ... well right now: Use the new distribution and tell me what doesn't work ;-)
The swc's are created in the js/libs folder:
But in royale-config.xml you reference libs directly:
Hiedra.
I just compared the version generated by the maven distribution and the ant distribution and they are effectively equal (Except little naming cleanups I added to the maven version)
However I just pushed some changes and I was working on exactly the "path-element" cleaning ... so perhaps what you reported is already fixed. Could you please update (just need asjs) and give it another try?
Right now I also would say that I have finished all the things I knew needed doing.
In the config files there should be two entries ... one for the JS libd in js-library-path with "js/libs" and here every lib should have the suffix "JS" and the normal libs in library-path with "libs" and no JS suffix.
I could not compile the SDK ... I had to add the license text to the files% ROYALE_ASJS_HOME%\distribution\src\main\resources\frameworks[localfonts.ser | macfonts.ser | winfonts.ser] and everything is perfect.
The IDE keeps showing me the errors I mentioned before and "if I ignore them" and I compile my app with maven, it throws me the following error:
[ERROR] Failed to execute goal org.apache.royale.compiler: royale-maven-plugin: 0.9.8-SNAPSHOT: compile-js (default-compile-js) on project royalecommons: Could not resolve dependencies for project com.mjesteve .examples: royalecommons: swc: 1.0.0-SNAPSHOT: Failure to find com.mjesteve.examples: royalearq: swc: swf: 1.0.0-SNAPSHOT in https://repository.apache.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of apache-snapshots has elapsed or updates are forced
royalearq.swc is one of my libraries and royalecommons another. royalecommons depends on royalearq.swc. When royalecommons is compiled, royalearq has already been compiled and is in .m2, I don't know why it gives an error ...
I understand the js-library-path and library-path parameters (I have also read Josh's messages) but I don't know if I am understanding you... do I have to configure them now somewhere else? (they only appear in my asconfig.json files for MXRoyale)
Hiedra
Aaahh ... yeah ... those empty files ... guess I was hoping that rat actually doesn't require headers on empty files ... and it seems on my machine it didn't fail. Perhaps this is one of the situations where RAT behaves differently on windows and non-windows machines. I'll add exclusions to the rat-config.
But the problems you are having with maven definitely have nothing to do with my changes as these only have an effect on the distribution, not on the maven build. Nothing should have changed here and the libraries you mention (com.mjesteve.examples: royalearq: swc: swf: 1.0.0-SNAPSHOT) aren't part of the Royale project.
Everything you say "I see" BUT if I compile the same project, with the SDK compiled with ANT or with MAVEN-ANT, the error does not occur and the compilation succeeds. Maybe there's something else I'm not seeing ... I'll do more tests this afternoon.
Hiedra.
Well ... if you see dependency-resolution problems, you're using Maven to build and if you're using Maven you're not using the distribution (The artifacts are taken from the maven local repo and not the distribution directory).
What might be happening, is that if you switch to the branch and build & install everything with maven. Then there might be issues, but if there are, they have nothing to do with the distribution itself.
But nevertheless, we still should address them.
If you want, we could probably do a quick Zoom session and then you can show me what you're doing and I might be able to help and understand better.
Sure, but let me check what you say ... "I don't want to waste your time." I'll tell you things ...
Hiedra
Since this morning, I cannot compile my Apache Royale projects, the error is located when trying to use the Array class from the adobe fx package ...
Console log: