Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source generator not escaping dashes in assembly name #1800

Closed
manodasanW opened this issue Sep 27, 2024 · 0 comments · Fixed by #1802
Closed

Source generator not escaping dashes in assembly name #1800

manodasanW opened this issue Sep 27, 2024 · 0 comments · Fixed by #1802
Labels
bug Something isn't working
Milestone

Comments

@manodasanW
Copy link
Member

Our source generator has logic to escape the assembly name as it is used as part of the namespace for generated sources. The escaping logic doesn't handle dashes which it should.

    public static string EscapeTypeNameForIdentifier(string typeName)
    {
        return Regex.Replace(typeName, """[(\ |:<>,\.)]""", "_");
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant