Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQFC support #8235

Merged
merged 3 commits into from
Sep 4, 2021
Merged

Add SQFC support #8235

merged 3 commits into from
Sep 4, 2021

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Apr 28, 2021

Adds sqfc.json which controls which files gets compiled and what is required, for now using setup p:

old fixed bugs

[ACE] (common) ERROR: Setting [ace_zeus_zeusAscension] - value type [BOOL] is unknown - []
[ACE] (common) ERROR: Setting [ace_advanced_ballistics_bulletTraceEnabled] - value type [BOOL] is unknown - []

Error in expression < "barStatement"));
(_finalArray select 4) set [0, _barStatement];
};>
Error position: <select 4) set [0, _barStatement];
};>
Error Zero divisor
File /z/ace/addons/arsenal/functions/fnc_compileStats.sqf..., line 110
Error in expression <de = _long;
};

[_GZD, _grid100km, _GZD + _grid100km]

Error position: <+ _grid100km]

Error Generic error in expression
File /z/ace/addons/common/functions/fnc_getMGRSdata.sqf..., line 153

[ACE] (interact_menu) ERROR: Failed to add action - action (ace_dragging_drag) to parent ["ACE_MainActions"] on object B_HeavyGunner_F [0]
[ACE] (interact_menu) ERROR: Failed to add action - action (ace_dragging_carry) to parent ["ACE_MainActions"] on object B_HeavyGunner_F [0]
Error in expression <_ActNamespace;

if (!isNil {_namespace getVariable _objectType}) exitWith {};

Error position: <getVariable _objectType}) exitWith {};

Error getvariable: Type Object, expected Array,String
File /z/ace/addons/interact_menu/functions/fnc_compileMenu.sqf..., line 27
➥ Context: [] L1 ()
[] L1 ()
[] L30 (x\cba\addons\xeh\fnc_init.sqf)
[] L36 (x\cba\addons\xeh\fnc_init.sqf)
[] L35 (x\cba\addons\xeh\fnc_init.sqf)
[] L13 (z\ace\addons\interact_menu\XEH_preInit.sqf)
[] L27 (/z/ace/addons/interact_menu/functions/fnc_compileMenu.sqf)

Error in expression <ManActions"}) exitWith {
_namespace setVariable [objectType, +ace_interact>
Error position: <setVariable [objectType, +ace_interact>
Error Type Object, expected String
File /z/ace/addons/interact_menu/functions/fnc_compileMenu.sqf..., line 35
➥ Context: [] L1 ()
[] L1 ()
[] L30 (x\cba\addons\xeh\fnc_init.sqf)
[] L36 (x\cba\addons\xeh\fnc_init.sqf)
[] L35 (x\cba\addons\xeh\fnc_init.sqf)
[] L13 (z\ace\addons\interact_menu\XEH_preInit.sqf)
[] L34 (/z/ace/addons/interact_menu/functions/fnc_compileMenu.sqf)
[] L35 (/z/ace/addons/interact_menu/functions/fnc_compileMenu.sqf)

@PabstMirror PabstMirror added status/experimental kind/optimization Release Notes: **IMPROVED:** labels Apr 28, 2021
@PabstMirror PabstMirror added this to the Ongoing milestone Apr 28, 2021
@dedmen
Copy link
Contributor

dedmen commented May 7, 2021

Issue with variable assignment assembly has been fixed.
For some reason ASSIGNMENT and ASSIGNMENT_LOCAL have a different way the arguments are stored even though they are really the same thing...
And I don't understand how that didn't literally break absolutely everything as every local variable assignment would be broken by this.

dedmen/ArmaScriptCompiler@1999555

That should fix
https://github.com/acemod/ACE3/blob/master/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf

@PabstMirror
Copy link
Contributor Author

P:/z/ace/addons/common/functions/fnc_getMapGridData.sqfc doesn't compile because of
private _zoomMax = 1e99; which kinda makes sense as that's not valid in 32bit float

Could script compiler handle those as "positive infinity"?
or should we just swap those to 1e38 or something more sane
tbh, it's not a big deal if 2 files don't compile because it will always fall back to just use sqf

@kymckay
Copy link
Member

kymckay commented May 7, 2021

@PabstMirror 1e39 should be positive infinity in SQF, whether compiler here knows about that idk

@kymckay
Copy link
Member

kymckay commented May 7, 2021

Although it just occurred to me that might be what you meant, I think it should be possible to compile the infinity values since they must be informationally represented somehow when they appear in engine 🤔

compile_script
cba 3.15.5 and update make.py
@PabstMirror PabstMirror changed the title WIP: sqfc Add SQFC support Jul 22, 2021
@PabstMirror
Copy link
Contributor Author

I think this is ready
could use review on changes to tools/make.py (bottom of files changed tab)
should continue to work on CI or systems without asc.exe

sqfc.json Outdated Show resolved Hide resolved
@@ -0,0 +1,18 @@
{
"inputDirs": [
"P:/z/ace/addons/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this not take relative directory?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dedmen/ArmaScriptCompiler#8 saidly no, or atleast not yet

@jonpas
Copy link
Member

jonpas commented Jul 23, 2021

make.py changes look fine, although a bit confusing with the Exceptions instead of just ifs, especially since you don't actually propagate the exception anywhere.

PabstMirror and others added 2 commits July 23, 2021 12:04
@PabstMirror PabstMirror requested a review from jonpas September 3, 2021 22:31
@PabstMirror PabstMirror merged commit efe0968 into master Sep 4, 2021
@PabstMirror PabstMirror modified the milestones: Ongoing, 3.14.0 Sep 4, 2021
@PabstMirror PabstMirror deleted the sqfc branch September 4, 2021 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/optimization Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants