-
-
Notifications
You must be signed in to change notification settings - Fork 888
move to c# 8 in LangVersion #1033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'm a little concerned about the statement in this blogpost.
|
|
the compiler wont let u use async streams or async dispose if u target netstandard 2.0 (or any of the fworks that target it). u would need to do conditional compilation in those scenarios, which may be worth it in some cases |
|
i have the same problem in several of my tools. they are consumed in msbuild. which is locked into net47, so i cant use async streams or async dispose |
It's this that concerns me the most. What do they mean by supported? I'd love to use the new features but I don't want to end up with obscure, target dependent, jit errors. |
|
that is the official stance. mostly because they dont want to get into the conversation with people about what parts of c#8 do not work in netstandard2. but the features that are pure IL do work. scoped usings, nullable ref types etc. i have updated ~50 projects over the past few months to do exactly that. |
|
FWIW i have found null refs bugs in approx 30% of the projects i have moved over to nullable ref types |
Then if the build works I'm up for it. I'd like to experiment to reduce scope capturing with static local functions. |
|
Hmm nullable ref types - I (we?) still need to learn a few things about that. Especially the bits regarding how it affects public API-s of software libraries, and our non-C#8 consumers. |
I wouldn't worry. I don't think we'll ever use them. Maybe if we were starting from scratch but not now.
I'd maybe enable temporarily just for checking but I think there's too much risk here to leave enabled. |
whats the risk? it is a compile time feature, not runtime |
Virility, This is a huge complicated codebase and we could end up disappearing down a rabbit hole for weeks altering the codebase as we chase down issues. That said, I am curious to see what goes bang if we turned it on globally. |
|
ok leave this pr open. and i will try to get some time to explore that rabbit hole and report back |
Codecov Report
@@ Coverage Diff @@
## master #1033 +/- ##
==========================================
- Coverage 89.87% 89.87% -0.01%
==========================================
Files 1104 1103 -1
Lines 48922 48896 -26
Branches 3445 3441 -4
==========================================
- Hits 43971 43944 -27
- Misses 4248 4249 +1
Partials 703 703
Continue to review full report at Codecov.
|
|
Fixed with #1082 |
is there any point in holding back on using the new features?