-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
RouteConstraints aren't linker friendly #24723
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Thanks for contacting us. |
@davidfowl we don't plan to handle this in 6.0 If you neither, feel free to move to backlog. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
API review: Approved API: public class RouteOptions
{
+ public void SetParameterPolicy<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]T>(string text) where T : IParameterPolicy;
+ public void SetParameterPolicy(string text, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]Type constraintType);
} The API is approved. We we want to prevent users from mutating The API is named |
Today RouteConstraints are described by a RouteOptions.ConstraintMap. The issue with this approach is the linker doesn't have way to know that these types are activated elsewhere in the system. We need an API that lets us describe adding a constraint that is type safe and lets us describe that we want to preserve constructors:
This would let the linker know that these constraint types should be kept around.
Here's the current warning:
The text was updated successfully, but these errors were encountered: