Delphi support in Oxygene

I can’t get importing and building to work with the shipped source Island.DelphiSupport or with the GitHub source. Importing seems fine until the build phase which on current preview build and current GitHub source fail due to source code errors in Extensions.pas. A missing semi colon and, I think a missing proper reference for a TProc call.
Other than that it fails due to “Reference ‘Delphi.rtl’ could not be resolved for target ‘Delphi.12.macOS’ (Island Darwin x86_64).” and that failure seems to cause the whole thing not to complete properly. As such there are no references added to Island reference list.
I tried some manual manipulations and managed some requisite .fx files but Delphi does not compile or look like compiling.
I wondered it may be because I was using a Community version of Delphi but the errors point to something else.
Should it work?

My sincerest apologies for that; fixed in GitHub, and for the code that’ll ship in coming Friday’s build .3081.

Cool, I’ll check it out then.

Hi again Marc, I managed to get a build working but get a pretty consistent error.
E: Can not instantiate Delphi-model generic objects
I have tried TList and TDictionary<k,v>. Is this expected or am I doing something wrong

Michael

This is a known limitation, for now, and the error message is “correct”. I’m afraid we do not support instatiating Delphi’s generics from Elements code yet. It’s on our list to add, of course.

Ok, good to know. Thanks.

Any progress on this? No Delphi’s generics means we cannot instantiate anything from FMX.

Not yet. Problem is the way Delphi encocodes generics makes this very difficult for anyone but the Dellphi compiler itself to consume.

That said, i’ve seen running FMX samples build with island…?

Maybe they instantiate inside Delphi compiler generated code? I’ve been unable to instantiate objects in Island if they touch any generics, at least for Island-Windows + Delphi 13.1 (no tried with other versions). Nevertheless it is not urgent for me now. I’d prefer priority to the Delphi compatibility inside Island, to make ports easier. I’d see if I can make test cases but I found several points where the compiler crashes generating the LLVM code.

Yes. the only tnkng that will not work, afaik, is you explicitly instatiating a generic class FROM Oxygene code. You can call Delphi code that itself uses generics internally, fine.

Being worked on as we speak.