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

Make UseWithArgumentNamesAttribute publicly available #750

Open
FreeApophis opened this issue Sep 18, 2023 · 2 comments
Open

Make UseWithArgumentNamesAttribute publicly available #750

FreeApophis opened this issue Sep 18, 2023 · 2 comments

Comments

@FreeApophis
Copy link
Member

Probably as it's own project?

We have a request to be able to use the attribute (and Generator therfore) in their own projects.

@bash
Copy link
Member

bash commented Sep 18, 2023

I think we should ship the attributes as a source code package. That way consumers don't get a runtime dependency on the attributes, which would be a lot of pain when we decide to do breaking changes.

Alternatively, the Funcky.Analyzers package could contain the attributes using some property to opt into specific attributes: Something like <FunckyCodeAnalysisAttributes>UseWithArgumentNames</FunckyCodeAnalysisAttributes>. That way we keep the analyzers and attributes together.

We also need to make sure that the analyzer does not crash in case of an unexpected attribute data (in case we decide to make breaking changes to the attribute).

@bash
Copy link
Member

bash commented Nov 13, 2023

We might not need to make this attribute public. If we're lucky the BCL might add it: https://github.com/dotnet/runtime/issues/51451.

There's also an F# RFC: https://github.com/fsharp/fslang-design/blob/main/drafts/FS-1095-requirenamedargumentattribute.md
They however call it RequireNamedArgument, maybe we want to match that naming before making our analyzer public?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants