vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

Whitespaces in compile constants values cause SWF compilation error

Open itlancer opened this issue 4 years ago • 2 comments

Whitespaces in compile constants values cause SWF compilation error. So if you have in asconfig.json something like:

"define": [
	/**
	 * String values must be formatted with nested quotes, like "'hello'",
	 because the compiler will attempt to evaluate an expression when it encounters quotes.
	 */
	{"name": "CONFIG::PRODUCT_NAME",	"value": "'App Name'"}
],

It cause Error exists after running preLaunchTask 'undefined'.

It works fine if you dont' have spaces. For example AppName. Whitespaces in compile constants works fine with other IDEs.

itlancer avatar Sep 09 '21 13:09 itlancer

I'm not able to reproduce this issue. My compile task is completing correctly.

Your error message is interesting, and points to a potentially larger problem. I don't know why the preLaunchTask value in your tasks.json file would be displayed as undefined instead of the name of the task, even if the compiler failed while running the task. That's kind of strange.

joshtynjala avatar Sep 09 '21 20:09 joshtynjala

@joshtynjala I have checked with macOS - indeed it works fine. But with Windows (tested with multiple different devices) it faults as described above. Without whitespaces all works fine. May be some internal error with Windows command line usage where space split string to different arguments...

itlancer avatar Sep 10 '21 14:09 itlancer