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.

$Classes cannot find record classes

See original GitHub issue

C#9 introduces record as a immutable class, with a new terse syntax.

So instead of:

public class Person {
    public Person(string name) { this.Name = name; }
    public string Name { get; private set; }
}

We can now do:

public record Person(string Name);

This creates a special class that is read only and has built-in value equality.

Unfortunately $Classes cannot find any of these record classes, and there doesn’t appear to be any way to include them in template output.

Either:

  • $Classes should find both class and record definitions, or…
  • $Records should be a new base iterator that goes through record definitions.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:13

github_iconTop GitHub Comments

2reactions
johnknoopcommented, Jan 27, 2021

Great to see someone making this effort. I’ve evaluated a bunch of other C#->TS generators, but none come close in terms of customizability, and it’s a shame that the project is effectively abandoned.

If you could modernize it in the ways mentioned by @s4m0r4m4 and perhaps remove the dependency on Visual Studio (a lot of folks just use VS Code nowadays) it would be even better, but as you state, getting a live repository up and running is a great step in the right direction.

1reaction
AdaskoTheBeAsTcommented, Jan 9, 2021

it seems that Fredrik is quite busy - my last PR is waiting for more than a year https://github.com/frhagn/Typewriter/pull/322

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Unable to deserialize when using new Record classes
I get that the error is saying the record has no constructors, but from what I see the record class takes care of...
Read more >
5 Record Classes - Java
Record classes, which are a special kind of class, help to model plain data aggregates with less ceremony than normal classes.
Read more >
Record Classes in Java | Java 17 features - YouTube
Instagram : https://www.instagram.com/navinreddyofficial Linkedin : https://in.linkedin.com/in/navinreddy20 More Learning : Java ...
Read more >
Java 14 Records Class
Java 14 introduced a new way to create classes called Records. In this tutorial, we will learn: Why do we need Java Records...
Read more >
How to Resolve The Cannot Find Symbol Error in Java
The cannot find symbol error refers to a situation where the Java compiler is unable to find the symbol associated with a given...
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