GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||
GeezerVison is showing github.com — Use `is not null` syntax by xtqqczze · Pull Request #13286 · PowerShell/PowerShell Conversation
|
|
Ilya (@iSazonov) I think these changes should wait until we have updated code to use features available in C# 8, such as null operators and pattern matching. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The pattern comes from C# 9.0 and is already enabled. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) What is mean is I think we should go for "low-hanging fruit" such as using null conditional access from C# 6.0 (RCS1146) etc before making C# 9.0 changes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) I have started work on related changes in #13286. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Build failures seem to be because preview features not enabled in csharp/test_PSConfiguration.cs(100,47): error CS8652: The feature 'not pattern' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. [/Users/runner/work/1/s/test/xUnit/xUnit.tests.csproj] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You can exclude xUnit files from the PR or enable C# 9.0 in the csproj. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) If you would like, you can start to review, as we are not isolating C# 9.0 changes. This is already a huge PR so it seems to be the best plan. Any more changes can be in follow-up PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Macos failures look like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
xtqqczze Please rebase to pass CIs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ilya (@iSazonov) Too many merge conflicts, I will push new commits rather then resolving. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
First rebase on 1f904e4 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Second rebase fixes up. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
xtqqczze thanks for your efforts in cleaning up the code, but I don't think the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) This change was actually requested by Ilya (@iSazonov) (#13090 (comment)). Are you against |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) What do you mean? The pattern "is not null" is for replacement |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Quote from dotnet/roslyn#42368:
Ilya (@iSazonov) That conversion makes sense. But most changes in this PR are converting Even the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) it's worth noting that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Rain Sallow (/u/ta11ow) (@vexx32) Yes, there is such possibility, but I don't think it's practically a problem we need to concern about. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Just to say that if |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Given that #13277 is reverted, I will close this PR as well. The idea is the same as in #13277 (comment), that we shouldn't force |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) I have made |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think we should re-review this again since .Net team added new Roslyn analyzer to force using new syntax "is null" and "is not". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yep, see dotnet/runtime#42692 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.