Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Conversation

pranavkm
Copy link
Contributor

Updated CompilationResult to support compilation failures from multiple
files.

Fixes #2321

Updated CompilationResult to support compilation failures from multiple
files.

Fixes #2321
@ghost ghost added the cla-already-signed label Apr 15, 2015
@pranavkm
Copy link
Contributor Author

Ties into Diagnostics changes - aspnet/Diagnostics#123 and Razor changes - aspnet/Razor#357. The error page from Helios already supports multiple error files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to show errors if they happen to be produced in the generated code (for instance a custom base type that does not have a RenderAsync method). Mapping it to the cshtml file is not very helpful in diagnosing the issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a very general statement and doesn't seem correct. if it were correct, Razor would not generate #line pragmas at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or, are you commenting only on the case where the #line mapping is currently hidden?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is for generated code that we produce but don't map back to the cshtml - this includes things like default inherited directives (IHtmlHelper<TModel>) and any code that relies on a property \ method being present on the base type DefineSection, RenderAsync etc).

@dougbu
Copy link
Contributor

dougbu commented Apr 15, 2015

:shipit:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious: Why not just do IFileProvider?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file system that we use for views specifically hangs off of RazorViewEngineOptions. It allows doing things like using resources as view sources - https://github.com/aspnet/Mvc/blob/dev/test/WebSites/RazorEmbeddedViewsWebSite/Startup.cs#L20-L23

@NTaylorMullen
Copy link

:shipit:

@pranavkm pranavkm closed this Apr 23, 2015
@pranavkm pranavkm deleted the 2321 branch April 23, 2015 22:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants