Comments (6)
Note: we do this in the IDE for huge memory savings. In the IDE we have hte compilation objects just reference each other, without any emitting of IL/Metadata.
The command line doesn't do this at all. When you build, it biulds, and it produces all those dlls (and all that IO). What it produces is fed into the next compiler.
This is ok on the command line (people don't mind seconds or minutes of compile costs when tey make a change). it's not ok in the IDE. People make a change and expect it to be incorporated, globally, immediately.
from roslyn.
Looks like a dupe of #73269
from roslyn.
In short generators are not guaranteed to see private members in external assemblies. That may happen when run in VS but will not when run through the command line. That is due to a combination of factors (ref assemblies and metadata import options) and these behaviors are by design.
from roslyn.
In short generators are not guaranteed to see private members in external assemblies. That may happen when run in VS but will not when run through the command line. That is due to a combination of factors (ref assemblies and metadata import options) and these behaviors are by design.
oh.. I thought since source generator cannot access private members in external libraries, the different behavior in debug and inside project is unexpected and is a bug
Cz like it's still a bit weird that you cannot access it, but in project it actually generate the files but can't get compiled. I thought it's a bug because i supposed it should be completely disabled
from roslyn.
It's more an artifact of the different way the IDE handles references compared to the command line. It would be ideal if there was the same behavior but each environment has different constraints they are working with.
from roslyn.
It's more an artifact of the different way the IDE handles references compared to the command line. It would be ideal if there was the same behavior but each environment has different constraints they are working with.
Ah i see, then i guess I'll just wait for future improvements. Thank you for the detailed answer 👍🏻
from roslyn.
Related Issues (20)
- Test Microsoft.CodeAnalysis.LanguageServer.UnitTests.DocumentChanges.DocumentChangesTests.FindReferencesInChangingDocument(mutatingLspWorkspace: False) failed in CI HOT 1
- Overridden != and == do not affect nullability HOT 1
- It looks like PEEventSymbol's constructor assumes that we always have both accessors.
- Long-running IAsyncEnumerable<T> leaks the last seen enumerated value. HOT 4
- Roslyn 4.10.0 does not compile for .NET 6 HOT 3
- [Automated] PRs inserted in VS build feature.debugger.main-35014.68
- Roslyn JSON detection marks strings as JSON even if StringSyntaxAttribute says it's not.
- Visual Basic double to integer conversion tests stopped working in .NET 9 Preview 5 HOT 1
- Source Generators referencing nuget packages cannot be debugged in VS
- Add fixer when for `params` span overloads are used with Expression selected
- Consider having generators run automatically (when in balanced mode) when a particular SG file is open in the editor. HOT 4
- Clicking 'rerun generator' prevent future edits into the regular text buffer. HOT 5
- `GeneratorDriver.GetRunResult()` should not throw
- Inheritance margin doesn't work well with screen scaling HOT 2
- .AsIncrementalGenerator extension method
- Use target-typed new for all elements in an array or a list
- C# interactive window does not open after the last Visual Studio Community 2022 Update
- [Automated] PRs inserted in VS build main-35017.309
- False positive CS4007 "Instance of type 'System.ReadOnlySpan<Buffer10<int>>' cannot be preserved across 'await' or 'yield' boundary"
- Remove IBuiltInAnalyzer.OpenFileOnly
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.