Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@bamarsha
Copy link
Contributor

It looks like there were some changes to nullable reference type analysis in Visual Studio 16.8, causing some errors when building the Q# compiler. (This is despite having a global.json that sets the SDK version to 3.1 - dotnet build would succeed, but building in VS itself would fail.) The changes needed to fix the errors continue to work in 3.1, and mostly seem reasonable.

There's one (small) breaking change. I removed the default parameter from the TypedExpressionWalker constructor:

public TypedExpressionWalker(Action<TypedExpression> onExpression, T internalState = default)

This could be worked around with nullable attributes or the null-forgiving operator, but having a null transformation state does not seem like a great idea, anyway.

@bamarsha bamarsha requested a review from bettinaheim November 13, 2020 18:53
@filipw
Copy link
Contributor

filipw commented Nov 13, 2020

possibly because it was not set to 3.1.403?

@bamarsha
Copy link
Contributor Author

bamarsha commented Nov 13, 2020

No, changing the version in global.json to 3.1.403 or 3.1.404 doesn't seem to work. I think the global.json is working, because dotnet build uses 3.1, but the analyzer/compiler built into Visual Studio seems to have changed behavior slightly.

@bamarsha bamarsha requested review from cesarzc and swernli November 17, 2020 19:22
@bamarsha bamarsha merged commit 2dbc92a into main Nov 17, 2020
@bamarsha bamarsha deleted the samarsha/nullable-vs16.8 branch November 17, 2020 20:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants