Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: WebMatrix error list seems to have timing issues that lead to errors not being reported [907]

$
0
0
This is WebMatrix bug - PS (IIS OOB DB) - 37248

Description:

8/22/2012 4:43 PM Edited by mikhaila
a). There is a Razor parser bug.
- Open attached file. Parser reports no errors.
- Type a space after } else {. Parser reports an error and @foreach is invalid.
8/22/2012 2:41 PM Edited by csfanos
8/21/2012 4:01 PM Assigned by alisonlu to mikhaila
This might be related to the error list timing change we did recently. It doesn't repro for me as easily as on Jim's machine and I see more instances where the errors come back after a second. Though the timing fixes were tweaked for scenarios to work on my machine so it may actually cause differences on other machine specs.
8/21/2012 3:26 PM Edited by jimwa
8/21/2012 3:26 PM Opened by jimwa (Bug 37248 - IIS OOB)
I introduced a runtime error into some code I was writing by accident as I was refactoring. Unfortunately, in certain situations the error can go away timing wise (I assume this has something to do with re-parsing). See full repro at right.

Repro:


Video:

\\jimwa\shared\BugTube\webmatrix-error-list.wmv

1. Paste repro in new file:

<ul>
@if (teamQuery.Count() == 0) {
<li>No Teams</li>
} else {
@foreach (var team in teamQuery) {
<li>@team.Name</li>
}
}
</ul>


2. Note that there are no errors reported. Now type inside the @if block after the <li>NoTeams</li> - I did another <li></li>

3. Error (correctly) appears.

4. Indent the <li></li> that you inserted.

Result:

Depending on the timing here, the error may disappear from the error list.

Comments: This is not a Razor bug, the fix is inside WebMatrix/Visual Studio. This will be fixed in Visual Studio vNext.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>