This repository was archived by the owner on Dec 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 223
Imported @page directive should log a diagnostic. #1503
Comments
Couldn't we make it so that |
@pranavkm You could but then you'd have silent errors in the system. I'd rather let it be imported and indicate that it's an error when a user attempts to use that imported view. |
NTaylorMullen
added a commit
that referenced
this issue
Jul 3, 2017
- Prior to this imported `@page` directives would flow through the Razor system without error. This resulted in inconsistent behavior between MVC and Razor. Now, imported `@page` directives result in diagnostics on the page directive node. - Added two tests to verify that we still treat views with imported page directives as Razor pages BUT we also log a diagnostic on the page directive node. - Renamed the `ViewComponentDiagnosticFactory` class to `RazorExtensionsDiagnosticFactory` so it can be used for more than just view component diagnostics. This way we can ensure that our diagnostics don't end up overlapping. #1503
NTaylorMullen
added a commit
that referenced
this issue
Jul 4, 2017
- Prior to this imported `@page` directives would flow through the Razor system without error. This resulted in inconsistent behavior between MVC and Razor. Now, imported `@page` directives result in diagnostics on the page directive node. - Added two tests to verify that we still treat views with imported page directives as Razor pages BUT we also log a diagnostic on the page directive node. - Renamed the `ViewComponentDiagnosticFactory` class to `RazorExtensionsDiagnosticFactory` so it can be used for more than just view component diagnostics. This way we can ensure that our diagnostics don't end up overlapping. #1503
NTaylorMullen
added a commit
that referenced
this issue
Jul 4, 2017
- Prior to this imported `@page` directives would flow through the Razor system without error. This resulted in inconsistent behavior between MVC and Razor. Now, imported `@page` directives result in diagnostics on the page directive node. - Added two tests to verify that we still treat views with imported page directives as Razor pages BUT we also log a diagnostic on the page directive node. - Renamed the `ViewComponentDiagnosticFactory` class to `RazorExtensionsDiagnosticFactory` so it can be used for more than just view component diagnostics. This way we can ensure that our diagnostics don't end up overlapping. #1503
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Today if you import an
@page
directive you end up with Razor thinking a view is a "page" but then MVC doesn't detect that. We should log a diagnostic indicating that imported@page
directives are invalid.The text was updated successfully, but these errors were encountered: