GenAPI generates invalid C#
See original GitHub issueThis change to Microsoft.Cci.Extensions is breaking the GenAPI tool for aspnetcore: https://github.com/dotnet/arcade/pull/2526
For instance, regenerating our reference assemblies with the latest GenAPI tool produces output like this:
@@ -352,9 +352,9 @@ namespace Microsoft.AspNetCore.Components
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
- public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public readonly bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public readonly string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public readonly object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
This does not compile. ❗️
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
GenAPI issues generate invalid C# for internal types #4488
It seems like some nullable types are not generated as such by GenAPI. It doesn't happen for all nullable types so it's unclear...
Read more >api/GenApi.py · master - gmsh - GitLab - ONELAB
Open in Web IDE Quickly and easily edit multiple files in your project. Edit single file Edit this file only.
Read more >GenApi Grid Control Reference: Events
Generated when a visible Node has changed. ... This is used for general error reporting, for example invalid value sets by a user...
Read more >Solved: Invalid xml in matlab with IMAQdx - NI Community
My goal is to create a .NET dll wrapper for the IMAQdx controls that will Open, Grab, and Close the camera. Here's my...
Read more >GenICam GenTL Standard
Figure 2-3: GenICam GenTL interface (C and GenApi Feature-interface). The GenTL Producer driver consists of three logical parts: the C ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can pass in LangVersion to GenAPI and constrain this against that value.
I’ve got a PR up here: https://github.com/dotnet/arcade/pull/2560