apache / apache/royale-compiler

SWC builds appear to add all files to 'definition stores', which includes (in some cases) files with no actual definitions.

Open
#116 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
113
Forks
54
PR merge metrics
No merged PRs in 30d

Description

A good example of this seems to be the XML swc build for SWF.

It correctly generates an empty swc with no definitions other than an internal swf with the container 'XMLClasses' class which has no content and no dependencies.
But all files in the local project seem to be scanned, despite 'include-classes' only specifying XMLClasses as the root for determining dependencies.

While building the **swf** swc, it lists the following warning(s) for XMLList and also for XML:

Warning: The definition XMLList depended on by __AS3__.vec.Vector$object in the SWC C:\Users\Greg\.m2\repository\com\adobe\air\framework\airglobal\20.0\airglobal-20.0.swc could not be found

What is happening here?
As best I can tell it is like this:
The local XML.as and XMLList.as files are added as DefinitionPromises in the SWF build, even though they are not actually supposed to be included.

These DefinitionPromises for XML.as and XMLList.as 'shadow' the original definitions from the airglobal (or playerglobal) swc.

The DefinitionPromises don't resolve to actual definitions, because (from a COMPILE::SWF perspective) the XML.as and XMLList.as files are 'empty'

__AS3__.vec.Vector$object has some dependency on the original definitions in the airglobal.swc and these definitions from elsewhere within the swc are now hidden by the invalid DefinitionPromises from the local files... hence the warning.

I was able to tweak some of the code in ASProjectScope to avoid this warning, but I was not at all confident that it is a correct 'solution'. Just noting that down here as the main location that seems important to work in for anyone else who might give attention to this. Otherwise it is probably not high priority, because it is a warning only.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.