Comments (11)
This is very likely not a real OOM scenario but likely a fragmentation issue or just bug in the DIA writing layer that the compiler is exposing. To debug though going to need to know more about what compilation is happening under the hood here.
@roji is there a way to get a binary log for the build that is happening here or surface the compilation in some way?
from roslyn.
/cc @AndriySvyryd, any idea how to get a binlog for dotnet ef dbcontext optimize
(or some other way to diagnose this)?
from roslyn.
@roji @jaredpar OOM happens when compiling the generated code, so logs from dotnet ef dbcontext optimize
wouldn't be very useful.
@TonyValenti Perhaps you can share the code generated by dotnet ef dbcontext optimize
?
The current theory is that this is caused by the large number of unqualified lambdas (many of which are transformed into expression trees) in a single method.
See dotnet/efcore#33483
from roslyn.
Here you go.
Context.Generated.zip
from roslyn.
@TonyValenti can you provide a compiler log of the build?
https://github.com/jaredpar/complog?tab=readme-ov-file#creating-compiler-logs
The generated code itself isn't going to be enough to track this down. Need to see it in the context of the greater build.
Note: that log will include basically all code in your project. So if it's not okay to share publicly please create a VS feedback ticket, share it there and put the link in this issue so I can assign it to my team.
from roslyn.
Here you go!
build.zip
from roslyn.
@jaredpar - Do you have everything you need?
from roslyn.
@TonyValenti thanks for checking. I can repro this on my machine now with the provided compiler log.
from roslyn.
@TonyValenti seems like my suspicion of this being an issue in DIA may be correct. Switching the compilation to use portable PDBs vs. Native PDBs causes the error to go away.
Short term you can flip to using <DebugType>Portable</DebugType>
and that will get around the errorr
Note: is there a particular reason you're not already using portable PDBs? For .NET Core projects they're generally preferred.
from roslyn.
Hi @jaredpar -
I'm not explicitly setting DebugType
type at all. But we do use PostSharp and it might set that (not sure though).
from roslyn.
@TonyValenti the projects all seemingly have this import pattern at the top
<Import Project="..\..\UniversalMigrator.Shared\__Shared\Shared.props" />
That Shared.props
file has <DebugType>full</DebugType>
Note: I'm not familiar with PostSharp so unsure if this is / isn't related to that.
from roslyn.
Related Issues (20)
- Editor doesn't respect tab indentation preference when inserting a code snippet
- New warning CS9220 for Razor code using string.Join HOT 1
- Code snippets do not always appear for insertion, depending on the cursor placement?
- Inline Hints should snap to the character grid when using a Monospace font.
- [Automated] PRs inserted in VS build main-34922.180
- Collection expressions are suggested for types where it doesn't make sense, and their error messages show inconsistent types HOT 6
- Virtual indentation of multiline text strings. (Editor Feature) HOT 42
- "Remove and Sort Usings" doesn't take care of compiler directive HOT 1
- CodeLens: References to local functions are not displayed HOT 1
- "Quick Actions and Refactorings" should include suggesting changing the existing declaration to "public" as a proposed fix for error CS0737 HOT 1
- Delay updating the problem window contents HOT 2
- Option to default the Extract Interface destination to "Add to current file" HOT 1
- Incorrect receiver capture with `ref C` receiver and interpolation handler
- C# needs a feature to "Show all called methods" for any given method implementation.
- Shorthand Switch Case Guards HOT 2
- Automatic line wrapping, taking into account the specified formatting and language syntax. HOT 2
- Run code clean up -- Can you remove redundant blank lines like CShapier? HOT 1
- Cannot define a raw string literal ending in double-quote HOT 1
- Move more logic from the Controller.Session down to the SignatureHelpService
- Assigning members of ICollection types with collection initializers can provably cause NullReferenceExceptions HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roslyn.