Using a frameworkz reference with the .core compiler

Hi,
When building the attached using the .core version of the compiler

App5.zip (641.7 KB)

I get

               Zipping up '/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-3947566B58231D2E73C54F4AC923A548EF8C157F/Debug/Island.Darwin.iOS/Device/arm64/PureLayout.frameworkz'.
E:             There was an exception executing the Elements compiler: ''IBM437' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')'
D:             |    at System.Text.EncodingTable.InternalGetCodePageFromName(String name)
D:             |    at System.Text.EncodingTable.GetCodePageFromName(String name)
D:             |    at System.Text.Encoding.GetEncoding(String name)
D:             |    at Ionic.Zip.ZipFile..ctor()
D:             |    at RemObjects.Elements.Compiler.CoreCompiler.<>c__DisplayClass0.<b>b__0(EBuildTarget t, EBuildContext lContext)
D:             |    at RemObjects.EBuild.EBuildTask.ForEachEnabledTarget(Func`3 aCallback)
D:             |    at RemObjects.Elements.Compiler.CoreCompiler.b(EBuildTask a)
D:             |    at RemObjects.Elements.Compiler.CoreCompiler.Compile(EBuildTask aTask)
D:             CompilerOutput for Island.Darwin.iOS
D:               - <CompilerOutput-Device-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-3947566B58231D2E73C54F4AC923A548EF8C157F/Debug/Island.Darwin.iOS/Device/arm64/PureLayout.fx [Target: Island.Darwin.iOS]>
D:               - <CompilerOutput-Device-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-3947566B58231D2E73C54F4AC923A548EF8C157F/Debug/Island.Darwin.iOS/Device/arm64/PureLayout.pas [Target: Island.Darwin.iOS]>
            <- Task Import failed for PureLayout, took 0.3506s (0.504s).

Cheers,
John

Based on this

It doesnt seem to be supported on .net core

Logged as bugs://E26205.

   > git: error: pathspec 'master' did not match any file(s) known to git
E: There was a problem obtaining remote project 'github.com/mosh/ImportSolution/PureLayout.elements:*' referenced from 'App5'.

can I get a test case that doesn’t involve remote projects? (or at least a working one :wink:

Strange, it should be a public repo
zip.zip (245.3 KB)

That one doesnt seem to have any .frameworkz references

Can I just get a simple self-contained test case?

I noticed it doesnt need references. I get this

E:             There was an exception executing the Elements compiler: ''IBM437' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')'
D:             |    at System.Text.EncodingTable.InternalGetCodePageFromName(String name)
D:             |    at System.Text.EncodingTable.GetCodePageFromName(String name)
D:             |    at System.Text.Encoding.GetEncoding(String name)
D:             |    at Ionic.Zip.ZipFile..ctor()
D:             |    at RemObjects.Elements.Compiler.CoreCompiler.<>c__DisplayClass0.<b>b__0(EBuildTarget t, EBuildContext lContext)
D:             |    at RemObjects.EBuild.EBuildTask.ForEachEnabledTarget(Func`3 aCallback)
D:             |    at RemObjects.Elements.Compiler.CoreCompiler.b(EBuildTask a)
D:             |    at RemObjects.Elements.Compiler.CoreCompiler.Compile(EBuildTask aTask)
D:             CompilerOutput for Island.Darwin.iOS
D:               - <CompilerOutput-Simulator-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-DF7F96A0E8BBE33B1286204E9778C90C6FEA8ADB/Debug/Island.Darwin.iOS/Simulator/arm64/PureLayout.fx [Target: Island.Darwin.iOS]>
D:               - <CompilerOutput-Simulator-arm64: /Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-DF7F96A0E8BBE33B1286204E9778C90C6FEA8ADB/Debug/Island.Darwin.iOS/Simulator/arm64/PureLayout.pas [Target: Island.Darwin.iOS]>

If you build

Ah yeah, its creating the .frameworkz that fails, not extracting it. reproduced and will investigate.

Ah yes. like everything on .NET Core, this needs a separate package to be explicitly referenced and registered to get functionality that was commonly available everywhere in classic .NET. Should be fixed, pending testing when I have a new build.

Thanks. Are you going to use System.IO.Compression.ZipFile ?

Not for now, I simply #ifdef’ed it to use a new way to obtain the IBM347 encoding, in all places that use it:

      #if NETCOREAPP || NETSTANDARD
        public readonly static System.Text.Encoding IBM437Encoding = System.Text.CodePagesEncodingProvider.Instance.GetEncoding("IBM437");
        #else
        public readonly static System.Text.Encoding IBM437Encoding = System.Text.Encoding.GetEncoding("IBM437");
        #endif

        public readonly static System.Text.Encoding DefaultEncoding = ZipFile.IBM437Encoding;

If that doesn’t work, I might look at porting to System.IO.Compression.ZipFile, but there are a few places that use the Ionic.Zip AIs directly, I’m afraid (rather than a platform-specific abstraction as some other places already do), so this would mean rewriting/retesting several places that work with zip files — and i don’t reallyfeel like doing that now, if i don’t need to.

Seems to work.

bugs://E26205 was closed as fixed.

Great. There is a build coming ?

I tested with the last build from yesterday.

1 Like

Thanks, that worked.

On ios projects it seems like a huge improvement. A full rebuild on my biggest project goes from 9 minutes to 3

Wow. just by switching from (I assume you’re on Mac) Mono to .NET Core?

Yes. Its an m1 mac.

That is impressive…