sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.68k stars 641 forks source link

Issues with latest SharpGenTools (ci446) #1053

Closed xoofx closed 5 years ago

xoofx commented 5 years ago

When switching to SharpGenTools 1.1.1-ci446 , there are lots of compilation regressions related to unsafe context not set or to some duplicated local variables:

image

xoofx commented 5 years ago

You can check the branch fix-sharpgen

xoofx commented 5 years ago

Issues being followed at https://github.com/SharpGenTools/SharpGenTools/issues/72

jkoritzinsky commented 5 years ago

I believe this is fixed with the newest SharpGenTools version.

xoofx commented 5 years ago

When trying to compile this branch on my machine. I'm getting the following errors:

error MSB4018: The "GenerateCSharp" task failed unexpectedly.
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018: System.InvalidOperationException: No marshaller found for SharpDX.DirectWrite.GdiInterop1.GetFontSignature.fontSignature
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at SharpGen.Generator.MarshallingRegistry.GetMarshaller(CsMarshalBase csElement)
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at SharpGen.Generator.CallableCodeGenerator.<GenerateCode>d__5.MoveNext()
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at SharpGen.Generator.MethodCodeGenerator.<GenerateCode>d__4.MoveNext()
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at SharpGen.Generator.InterfaceCodeGenerator.<GenerateCode>d__5.MoveNext()
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.List[TNode](IEnumerable`1 nodes)
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at SharpGen.Generator.RoslynGenerator.GenerateCompilationUnit[T](String csNamespace, IEnumerable`1 elements, IMultiCodeGenerator`2 generator)
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at SharpGen.Generator.RoslynGenerator.Run(CsSolution solution, String rootDirectory, String generatedCodeFolder, Boolean includeAssemblyNameFolder)
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at SharpGenTools.Sdk.Tasks.GenerateCSharp.Execute()
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Users\xoofx\.nuget\packages\sharpgentools.sdk\1.1.1-ci458\build\SharpGenTools.Sdk.targets(220,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>Done building project "SharpDX.csproj" -- FAILED.
jkoritzinsky commented 5 years ago

I've fixed this error in the mapping files. It's from trying to marshal an unknown type. The next CI build of SharpGenTools will error out more gracefully in this situation.