Hi, my name’s Dave. This will likely sound backwards, but I’m migrating an Air
game with a node/js back-end from a heavier Jenkins/hudson/ant/svn build
process to a lighter-weight bash/git process in order to streamline devops for
a small team managing multiple game forks. I’m a Jenkins, ant, hudson,
ActionScript, and java newb, but I’m learning as fast as I can. Thanks in
advance for your patience!
I’m hitting some really hard to understand behaviour from the mxmlc compiler
that makes me think I am passing it arguments in a violently bad way. It seems
that my -define arguments on the command line are not surviving the transition
to source. It’s spitting out a ton of errors about how CONFIG::THIS or
CONFIG::THAT is not defined when it gets to their use in various parts of the
source code, but I’m starting to think that might be a side-effect of a deeper
issue I’m not understanding, because I’m also getting this error:
/Users/davetaylor/ddt/redacted/wf/redacted/clients/build/config.as:1
Syntax error: ':' is not allowed here
There is no config.as file in that directory. There is a CONFIG.as file in a
completely different directory, but there is no colon anywhere in it. The only
thing in it is “package { public namespace CONFIG ; }” spaced over about 4
lines. I can remove that other CONFIG.as file with no effect on the behaviour.
I’ve also tried watching that build directory to see whether mxmlc generates a
config.as file. If it does, its lifespan is less than one second, because I
don’t see it appear.
I am also getting a couple of Internal Errors that look like this:
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:115
Internal error: Unable to generate code for '?'
case "dev":
^
It’s the first case of a pretty mundane switch statement. It doesn’t complain
about other case statements in that switch, and it hasn’t changed from the one
that the Jenkins/ant-driven mxmlc compiles successfully. The fact that it’s an
“internal error” along with that previous error about the file that doesn’t
exist is what makes me think I’ve done something particularly awful to put
mxmlc in something of a state.
I’ve tried to very meticulously copy the ant-based mxmlc parameters to the bash
mxmlc command line, which currently looks like this:
../../servers/jenkins/flex_sdk_4.6/bin/mxmlc -target-player=28 -swf-version=29
-compiler.debug=false -compiler.actionscript-file-encoding=UTF-8
-compiler.show-actionscript-warnings=true -compiler.strict=true
-incremental=true -keep-generated-actionscript=false -output
../android/redacted-73ef2/redacted.swf -use-network=true -compiler.as3=true
-compiler.optimize=true -static-link-runtime-shared-libraries=true
-compiler.external-library-path+=../../servers/jenkins/flex_sdk_4.6/frameworks/libs/air/airglobal.swc
-compiler.library-path+=../../src/client-flash/lib
-load-config+=../../servers/jenkins/flex_sdk_4.6/frameworks/air-config.xml
-compiler.source-path+=../../src/client-flash/as
-compiler.source-path+=../android/generated -default-size 1024 768
-define=CONFIG::BUILD_ENV,env -define=CONFIG::GAME,redacted
'-define=CONFIG::GAME_NAME,A Name With Spaces In It'
-define=CONFIG::LOADBALANCER_IP,0.0.0.0 -define=CONFIG::LOADBALANCER_PORT,5222
-define=CONFIG::FILESERVER_URL,http://0.0.0.0
-define=CONFIG::FILESERVER_PORT,8082 -define=CONFIG::CHATSERVER_IP,0.0.0.0
-define=CONFIG::CHATSERVER_PORT,5223 -define=CONFIG::PAYMENTSERVER_PORT,8081
-define=CONFIG::PAYMENTSERVER_URL,https://payment.redacted.com:8081
-define=CONFIG::BUILD_PLATFORM,phone -define=CONFIG::AIR,true
-define=CONFIG::LOCAL_MODE,false -define=CONFIG::SAFE_VALUES_ENABLE,true
-define=CONFIG::ENCODE_REMOTE,true
-define=CONFIG::ENABLE_ENCODED_DESCRIPTIONS,false
-define=CONFIG::ENABLE_CRASH_APP_ON_CHEAT,true
../../src/client-flash/as/MainClass.as
I’ve attached the full error log below.
I’m using flex 4.6, btw. I’ve tried running this on both OSX and Windows w/
cygwin, and the errors are identical.
Any clues as to what might be amiss? I’ve been banging my head on this for
over half a day, and I’m running out of ideas.
Thanks so much for your help! It’s for a fun game featuring what I think might
be one of the first Rubenesque female heroes in a game I’ve ever seen, so noble
cause n stuff! :)
=-ddt->
Loading configuration:
/Users/davetaylor/ddt/redacted/wf/redacted/servers/jenkins/flex_sdk_4.6/frameworks/flex-config.xml
Loading configuration:
/Users/davetaylor/ddt/redacted/wf/redacted/servers/jenkins/flex_sdk_4.6/frameworks/air-config.xml
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
Error: Can not resolve config constant: 'AIR'
/Users/davetaylor/ddt/redacted/wf/redacted/clients/build/config.as:1
Syntax error: ':' is not allowed here
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:68
Warning: variable 'loadBackup' has no type declaration.
public static var loadBackup = false;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:76
Error: Can not resolve config constant: 'BUILD_ENV'
enviroment = CONFIG::BUILD_ENV;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:79
Error: Can not resolve config constant: 'BUILD_PLATFORM'
platform = CONFIG::BUILD_PLATFORM;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:100
Error: Can not resolve config constant: 'ENABLE_ENCODED_DESCRIPTIONS'
if (CONFIG::ENABLE_ENCODED_DESCRIPTIONS)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:115
Internal error: Unable to generate code for '?'
case "dev":
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:152
Internal error: Unable to generate code for '?'
case "env":
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:157
Error: Can not resolve config constant: 'FILESERVER_URL'
domain = CONFIG::FILESERVER_URL;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:160
Error: Can not resolve config constant: 'CHATSERVER_IP'
chatServerLoadBalancer_IP =
CONFIG::CHATSERVER_IP;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:161
Error: Can not resolve config constant: 'CHATSERVER_PORT'
chatServerLoadBalancer_Port =
CONFIG::CHATSERVER_PORT;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:162
Error: Can not resolve config constant: 'GAME'
enviromentPath = domain + "/" +
CONFIG::GAME;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:172
Error: Can not resolve config constant: 'PAYMENTSERVER_PORT'
paymentServer_Port =
CONFIG::PAYMENTSERVER_PORT;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:173
Error: Can not resolve config constant: 'PAYMENTSERVER_URL'
paymentDomain =
CONFIG::PAYMENTSERVER_URL;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/AppConstants.as:376
Error: Can not resolve config constant: 'AIR'
return CONFIG::AIR;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/MainClass.as:96
Error: Can not resolve config constant: 'LOCAL_MODE'
if (CONFIG::LOCAL_MODE)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/MainClass.as:215
Error: Can not resolve config constant: 'GAME_NAME'
if (CONFIG::GAME_NAME !== undefined)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/MainClass.as:216
Error: Can not resolve config constant: 'GAME_NAME'
gameName = CONFIG::GAME_NAME;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/command/UpdateRemoteDataCommand.as:322
Error: Can not resolve config constant: 'ENCODE_REMOTE'
if (CONFIG::ENCODE_REMOTE)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/controller/mainMenu/MainMenuController.as:153
Warning: Comparison between a value of type String and an unrelated type int.
if (ApplicationVersion.version !==
AccountCache.instance.backendVersion)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/controller/play/PlayViewController.as:93
Warning: Duplicate variable definition: rewards.
var rewards : Array =
TutorialRewardManager.instance.getRewardData();
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/controller/play/PlayViewController.as:94
Warning: Duplicate variable definition: o.
for each(var o:Object in rewards)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/controller/play/PlayViewController.as:96
Warning: Duplicate variable definition: desc.
var desc : ResourceDescription;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/controller/play/PlayViewController.as:97
Warning: Duplicate variable definition: itemid.
var itemid : String =
DataUtils.safeValue(o, "itemid", "");
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/controller/play/PlayViewController.as:98
Warning: Duplicate variable definition: amount.
var amount : int =
DataUtils.safeValue(o, "amount", -1);
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/controller/play/PlayViewController.as:99
Warning: Duplicate variable definition: isSkin.
var isSkin : Boolean = false;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/CheatShieldController.as:141
Error: Can not resolve config constant: 'BUILD_ENV'
if (CONFIG::BUILD_ENV != "dev" && CONFIG::BUILD_ENV !=
"qa")
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/CheatShieldController.as:141
Error: Can not resolve config constant: 'BUILD_ENV'
if (CONFIG::BUILD_ENV != "dev" && CONFIG::BUILD_ENV !=
"qa")
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/CheatShieldController.as:155
Error: Can not resolve config constant: 'BUILD_ENV'
if (CONFIG::BUILD_ENV != "dev" && CONFIG::BUILD_ENV !=
"qa")
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/CheatShieldController.as:155
Error: Can not resolve config constant: 'BUILD_ENV'
if (CONFIG::BUILD_ENV != "dev" && CONFIG::BUILD_ENV !=
"qa")
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/CheatShieldController.as:163
Error: Can not resolve config constant: 'BUILD_ENV'
if (CONFIG::BUILD_ENV != "dev" && CONFIG::BUILD_ENV !=
"qa")
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/CheatShieldController.as:163
Error: Can not resolve config constant: 'BUILD_ENV'
if (CONFIG::BUILD_ENV != "dev" && CONFIG::BUILD_ENV !=
"qa")
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/GameManager.as:318
Error: Can not resolve config constant: 'ENABLE_CRASH_APP_ON_CHEAT'
if (CONFIG::ENABLE_CRASH_APP_ON_CHEAT)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/MobileFriendsManager.as:411
Error: Can not resolve config constant: 'AIR'
var isAir : Boolean = CONFIG::AIR;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/MobileFriendsManager.as:466
Warning: Duplicate variable definition: defaultImg.
var defaultImg : Texture =
GameAssetManager.instance.getTexture(DEFAULT_AVATAR_ASSET);
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/MobileFriendsManager.as:467
Warning: Duplicate variable definition: defaultImageData.
var defaultImageData : Object =
{id:friendId, image:defaultImg};
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/MobileFriendsManager.as:706
Warning: Duplicate variable definition: userId.
for (var userId : String in users)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/manager/MobileFriendsManager.as:971
Error: Can not resolve config constant: 'AIR'
var isAir : Boolean = CONFIG::AIR;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/battleScene/BattleSceneView.as:473
Warning: Duplicate variable definition: spellIconTex.
var spellIconTex : Texture =
GameAssetManager.instance.getTexture(spell.typeId, SceneConfig.COMMON);
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/battleScene/animations/DamageText.as:47
Warning: variable 'ICON_WIDTH' has no type declaration.
public static const ICON_WIDTH = 36;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/battleScene/animations/DamageText.as:48
Warning: variable 'ICON_HEIGHT' has no type declaration.
public static const ICON_HEIGHT = 36;
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/chat/ChatSceneView.as:89
Error: Can not resolve config constant: 'AIR'
CONFIG::AIR
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/questMap/MapView.as:112
Warning: return value for function 'createMap' has no type declaration.
private function createMap(mapType : int)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/questMap/MapView.as:119
Warning: return value for function 'zoomOut' has no type declaration.
private function zoomOut(newZoom : Boolean)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/questMap/MapView.as:132
Warning: return value for function 'zoomedOut' has no type declaration.
private function zoomedOut(newZoom : Boolean)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/questMap/MapView.as:137
Warning: return value for function 'zoomMap' has no type declaration.
private function zoomMap(location : Point, scale : Number)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/questMap/MapView.as:149
Warning: return value for function 'buildZoneList' has no type declaration.
private function buildZoneList()
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/questMap/MapView.as:154
Warning: return value for function 'buildZone' has no type declaration.
private function buildZone()
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/questMap/MapView.as:159
Warning: return value for function 'buildQuest' has no type declaration.
private function buildQuest(quest : Object)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/redacted/view/store/HeroesShopView.as:483
Warning: Duplicate variable definition: spellIconTex.
var spellIconTex : Texture =
GameAssetManager.instance.getTexture(skillDesc.typeId, SceneConfig.COMMON);
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/minigames/MinigameManager.as:321
Warning: Duplicate variable definition: block.
for each (var block : IBlock in
group)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/minigames/common/actions/DelayedChangeBlocks.as:260
Warning: Duplicate variable definition: block.
for each (var block : IBlock in
_delayedBlocks)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/minigames/common/actions/DestroyAllBocksByType.as:343
Warning: variable 'endPoint' has no type declaration.
var endPoint = new Point(enemy.hpBarStartPoint.x,
enemy.hpBarStartPoint.y);
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/socialTemplate/resources/dataBank/ResourceManager.as:185
Error: Can not resolve config constant: 'ENABLE_ENCODED_DESCRIPTIONS'
if (CONFIG::ENABLE_ENCODED_DESCRIPTIONS)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeFloat.as:37
Error: Accessors cannot be nested inside other functions.
public function get safeValue() : Number
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeFloat.as:39
Error: Can not resolve config constant: 'SAFE_VALUES_ENABLED'
if (CONFIG::SAFE_VALUES_ENABLED)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeFloat.as:71
Error: Accessors cannot be nested inside other functions.
public function set safeValue(value : Number) : void
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeFloat.as:73
Error: Can not resolve config constant: 'SAFE_VALUES_ENABLED'
if (CONFIG::SAFE_VALUES_ENABLED)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeInt.as:50
Error: Accessors cannot be nested inside other functions.
public function get safeIntValue() : int
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeInt.as:52
Error: Can not resolve config constant: 'SAFE_VALUES_ENABLED'
if (CONFIG::SAFE_VALUES_ENABLED)
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeInt.as:81
Error: Accessors cannot be nested inside other functions.
public function set safeIntValue(value : int) : void
^
/Users/davetaylor/ddt/redacted/wf/redacted/src/client-flash/as/pl/redacted/utils/SafeInt.as:83
Error: Can not resolve config constant: 'SAFE_VALUES_ENABLED'
if (CONFIG::SAFE_VALUES_ENABLED)
^
command line
Warning: 'static-link-runtime-shared-libraries' is not fully supported.
command line
Warning: 'compiler.keep-generated-actionscript' is no longer supported and will
have no effect.
command line
Warning: 'compiler.incremental' is no longer supported and will have no effect.