apache / apache/royale-asjs

-module-output seems not work

Open
#429 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
ActionScript
Stars
380
Forks
120
PR merge metrics
No merged PRs in 30d

Description

Hi,

I discover yesterday the -module-output compiler option describe in module docs page here

https://apache.github.io/royale-docs/create-an-application/modules.html

One thing scared me is that this option is not used in ModuleExample, then I tried to use it in the new BE0013 blog example about modules like this:

-module-output=../../../../../MainJewelApp/target/javascript/bin/js-release/modules

in addtionalCompilerOptions in the JewelModule project

The result is:

```
[INFO] --- royale-maven-plugin:0.9.6-SNAPSHOT:compile-app (default-compile-app) @ JewelModule ---
[INFO] Executing MXMLC in tool group Royale with args: [-load-config=/Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/target/compile-app-config.xml, -module-output=../../../../../MainJewelApp/target/javascript/bin/js-release/modules, -source-map=true, -js-compiler-option=--variable_map_input_file ../../../../../MainJewelApp/target/javascript/bin/js-release/gccvars.txt, -js-compiler-option+=--property_map_input_file ../../../../../MainJewelApp/target/javascript/bin/js-release/gccprops.txt, -js-output=/Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/target/javascript, -compiler.targets=JSRoyale, /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/src/main/royale/JewelModule.mxml]
Internal error: java.io.FileNotFoundException: /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/blog/BE0013_Dividing_an_Apache_Royale_application_with_modules/JewelModule/target/javascript/bin/js-debug/../../../../../MainJewelApp/target/javascript/bin/js-release/modules/JewelModule.js (No such file or directory) java.io.FileOutputStream.open0(Native Method)java.io.FileOutputStream.open(FileOutputStream.java:270)java.io.FileOutputStream.(FileOutputStream.java:213)java.io.FileOutputStream.(FileOutputStream.java:162)org.apache.royale.compiler.clients.MXMLJSCRoyale.compile(MXMLJSCRoyale.java:401)org.apache.royale.compiler.clients.MXMLJSCRoyale._mainNoExit(MXMLJSCRoyale.java:265)org.apache.royale.compiler.clients.MXMLJSCRoyale.mainNoExit(MXMLJSCRoyale.java:222)org.apache.royale.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:369)org.apache.royale.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:304)org.apache.royale.compiler.clients.MXMLJSC.execute(MXMLJSC.java:234)org.apache.royale.maven.BaseMojo.execute(BaseMojo.java:308)org.apache.royale.maven.CompileAppMojo.execute(CompileAppMojo.java:107)org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)org.apache.maven.cli.MavenCli.main(MavenCli.java:192)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:498)org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Royale: Examples: Blog: 0013: Dividing an Apache Royale application with modules 0.9.6-SNAPSHOT:
[INFO]
[INFO] Apache Royale: Examples: Blog: 0013: Dividing an Apache Royale application with modules SUCCESS [ 1.441 s]
[INFO] BE0013_Dividing_an_Apache_Royale_application_with_modules: MainJewelApp SUCCESS [ 8.275 s]
[INFO] BE0013_Dividing_an_Apache_Royale_application_with_modules: JewelModule FAILURE [ 0.591 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
```

maybe I missing something or not applying the option in the right way?

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the BE0013 module build using the additionalCompilerOptions shown in the report and compare it with the module documentation page. Start at MXMLJSCRoyale.java, the failing entry point named in the stack trace; done means the documented -module-output option produces the module file at the intended output location without a build failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.