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.

Any plan for using dotnet 5.0 ISourceGenerator for C# target?

See original GitHub issue

https://devblogs.microsoft.com/dotnet/using-c-source-generators-to-create-an-external-dsl/

As of dotnet 5 there is an official support for source generator system ISourceGenerator which I think would be cleaner method to generate lexer and parser for antlr, include referencing antlr itself into any project

Is it possible and would you like to have official support for it?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
sharwellcommented, Feb 8, 2021

Currently it’s only documented in the release notes where it was introduced (the link in comment https://github.com/antlr/antlr4/issues/3068#issuecomment-774859825 above). The readme should probably be updated to highlight it as the intended replacement for the Java toolchain when generating code for the optimized C# target.

2reactions
sharwellcommented, Feb 8, 2021

The IKVM toolchain that led to that performance note was replaced in v4.6.5-beta001 by the new C# toolchain that is as fast as the Java toolchain, if not faster. The only reason it’s not enabled by default is I need to do a bunch of binary diffs of the output comparing the Java and C# tool to make sure they always produce exactly the same code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing C# Source Generators - .NET Blog
A Source Generator is a .NET Standard 2.0 assembly that is loaded by the compiler along with any analyzers. It is usable in...
Read more >
.NET 5 Source Generators Jump Start | Khalid Abuhakmeh
Get started with .NET 5's source generators. Included in this post are the steps necessary to get them working with a solution, along...
Read more >
.NET 5, Source Generators, and Supply Chain Attacks ...
Attacks executed through builds abuse trust we have in our build tools, IDEs, and software projects. This is slowly changing (for example Visual ......
Read more >
Source Generators - real world example
NET 5 SDK and VisualStudio/Msbuild 16.8 is required to build the project but there are no limitations I'm aware of that prohibit of...
Read more >
Webinar: Source Generators with Stefan Pölz - PostSharp Blog
We have a look at what the source generators are as example. So source generators have been introduced with .NET 5.0. And now...
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