try icon indicating copy to clipboard operation
try copied to clipboard

Underscore in source file name causes BudgetExceededException

Open jonsequitur opened this issue 5 years ago • 6 comments

From https://github.com/dotnet/try/issues/859#issuecomment-666637355

This works:

'''cs --region source --source-file ./main.package.cs
'''

This does not:

'''cs --region source --source-file ./main_package.cs
'''

Only difference is an underscore in main project file name??!!

jonsequitur avatar Jul 30 '20 21:07 jonsequitur

Here's a sample repo with an example that works and one that fails, both identical save an underscore in the primary .cs file name:

https://github.com/ritchiecarroll/dotnet-try-test

ritchiecarroll avatar Jul 31 '20 18:07 ritchiecarroll

@ritchiecarroll I couldn't repro the bug:

image

jonsequitur avatar Jul 31 '20 23:07 jonsequitur

I usually use dotnet-try --verbose from the failed folder to produce error. Interesting that this doesn't work for you. What version are you using? Any other system component versions I should check?

ritchiecarroll avatar Aug 01 '20 03:08 ritchiecarroll

Well - tried this on another computer, it doesn't replicate there. Whatever confluence of parameters that causes this to fail on my primary system doesn't happen on a secondary system.

Sorry for the false alarm.

I think the best pursuit will be be based on external assemblies, although I still believe there is some kind of timing issue here.

I will try to find a more reproducible version...

ritchiecarroll avatar Aug 02 '20 03:08 ritchiecarroll

OK, after some work, here's an example I can get to fail consistently - at least the first time. This fails consistently from both my test machines.

First, re-pull sample repo: https://github.com/ritchiecarroll/dotnet-try-test

FYI, I updated the `failed' test project in this repo to now operate with a simple project dependency.

To get it to fail, first delete the following folders/files:

bin
obj
package_fullBuild.binlog

then run

dotnet-try --verbose

Now, the first time you run the code (clicking 'run' button on browser) it fails with error below. If you click run again, the second time it runs fine. The failure is as follows - same as seen before:

[MLS.Agent.Middleware.ExceptionFilter]  ❌ System.InvalidOperationException: No design time or full build available

Now the interesting part is, I can also, randomly, get this failure with even the works project that has no external dependency. Like with the other project, clicking run again, everything works fine.

Seems like a race condition of somekind.

Hope this helps replicate the issue enough to track down the issue.

ritchiecarroll avatar Aug 02 '20 04:08 ritchiecarroll

FYI, if you want 100% replicability, follow these steps:

git clone https://github.com/GridProtectionAlliance/go2cs.git
cd go2cs\src\examples\manual tour of go conversions\basics\zero\
dotnet-try --verbose

FYI, to specifically replicate the BudgetExceededException, clear out bin\obj folders and .binlog file then simply use the verify option on the sample:

dotnet-try --verbose verify

You can try a few of these other examples for more tests:

go2cs\src\examples\manual tour of go conversions\basics\named-results\
go2cs\src\examples\manual tour of go conversions\methods\reader\
go2cs\src\examples\manual tour of go conversions\methods\stringer\
go2cs\src\examples\manual tour of go conversions\flowcontrol\defer-multi\
go2cs\src\examples\manual tour of go conversions\concurrency\buffered-channels\
go2cs\src\examples\manual tour of go conversions\concurrency\range-and-close\

ritchiecarroll avatar Aug 02 '20 05:08 ritchiecarroll