question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GenAPI generates invalid C#

See original GitHub issue

This 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. ❗️

Context: https://github.com/aspnet/AspNetCore/blob/b9e600a45c5a56f869f12dda6242ef069bd2f9dc/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs#L350-L358

cc @tannergooding @ericstj

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ericstjcommented, Apr 18, 2019

You can pass in LangVersion to GenAPI and constrain this against that value.

0reactions
tannergoodingcommented, Apr 18, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found