Moonshine-IDE / Moonshine-SDK-Installer

To take full advantage of Moonshine IDE you will need third party SDKs like Apache® Flex or Apache® Royale. In order to make it easier for you to setup the required SDKs, we created the Moonshine SDK Installer.
https://moonshine-ide.com/download-sdk-installer/
Other
8 stars 2 forks source link

Migrate Few ValueObject Classes From AS3 to Haxe #96

Closed rat-moonshine closed 1 year ago

rat-moonshine commented 1 year ago

Recently we came-up with some error that pops during MSDKI Haxe interface use in Moonshine - https://github.com/Moonshine-IDE/Moonshine-IDE/issues/1112#issuecomment-1299922591.

We could apply some patch fixes in the AS3 implementation of value-objects, i.e. ComponetVO etc. but that'll only increase overhead codes in AS3 file. If we moves those files into Haxe then it'll also support of(any) future migration of MSDKI into Haxe.

Igazine commented 1 year ago

Please check this branch before starting to work on Haxe conversion.

rat-moonshine commented 1 year ago

@Igazine why this branch is? I don't see its content merged into master since your Haxe code-merge of Moonshine. Are you currently working with this branch, or this kept for any future use?

Beside this, I see we have MSDKI VOs converted inside MoonshineGUICore - why it is, when MSDKI source itself still using its AS3 implementation?

Igazine commented 1 year ago

Because different projects (even different repos) reference each other's code-base, SWC's etc in their code and/or build configs. So I had to make sure some files are converted and exist in different repos.

For the ActionScript compiler, AS files take priority if they exist. For the Haxe compiler, HX files take priority. So if you have something included in the SWC, but it also exists as an AS file, the compiler will use the AS implementation. This causes a lot of challenges during the conversion process.

The reason it's not merged yet, is because I didn't even have time to test if the MSDKI compiles and builds fine, the SWC's compile and build fine, the installer is properly created on 2 different operating systems, and most importantly it works on Windows and macOS as well.

In my mind MSDKI is an entirely different project that should be converted when Moonshine is fully converted. But in reality Moonshine's code references MSDKI's code (and vice-versa), and Haxe cannot include AS files, so I have to convert MSDKI source files as well or come up with even more hacks.

I thought creating different branches for all the projects that require conversion will make everyone's life easier and the conversion process relatively smooth.

rat-moonshine commented 1 year ago

In my mind MSDKI is an entirely different project that should be converted when Moonshine is fully converted. But in reality Moonshine's code references MSDKI's code (and vice-versa), and Haxe cannot include AS files, so I have to convert MSDKI source files as well or come up with even more hacks.

I agreed that we will require MSDKI source codes to convert as well to support Moonshine Haxe conversion. For this, we shall specifically needs "InstallerSharedCore" project source (for now) and not the entire "MoonshineSDKInstaller" codes, and of course "MoonshineSDKInstallerGUICore".

I'm not very sure how creating newer Haxe version of VOs helped you here, since the reference of VO calls usually suppose to be to a particular source - ideally the AS3 implementation which we were using, until we change all the calls from Moonshine and MSDKI to the Haxe converted versions.

Do you think if I removed these MSDKI VOs from here in master https://github.com/Moonshine-IDE/Moonshine-IDE/tree/master/ide/MoonshineGUICore/src/actionScripts/valueObjects and make Moonshine and MSDKI using the Haxe converted versions from Moonshine SDK Installer repository only - will that break anything with the conversions that you made?

rat-moonshine commented 1 year ago

I have moved few VOs to Haxe. Necessary changes applied in Moonshine and MSDKI source referring the classes.

I haven't noticed any error so far. If I'll see any error we can reopen this issue to track the updates, or create separate one.