-
-
Notifications
You must be signed in to change notification settings - Fork 977
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
Nullable Reference Types, setup Attributes vs Constructor+IDisposable #1551
Comments
Hi @virzak
Why are you trying to do it? Our CI uses .NET Core 2.1 and we don't plan to use the
I don't know. Please ask a question on StackOverflow.
We decided to go with attributes a long time ago and unfortunately, we have to follow this strategy. Otherwise, it would be a big breaking change for our users. There is nothing actionable on BDN side, so I am closing this issue. Have a nice day, |
@adamsitnik The project I'm working on uses the latest .Net along with latest features like nullable. Modifying your sample was an exercise in upgrading. Submitting a PR or messing up the CI wasn't the intent. Since Asking this question on github seems like an appropriate place. Here are issues 1 and 2 and docs on the same topic from EF Core team. The obvious answer to my question would be to use ! as in: private int[] data = null!; Just was wondering if there's anything better. |
@adamsitnik Would it be possible to support the BenchmarkDotNet.Autogenerated.Runnable_2 instance = new BenchmarkDotNet.Autogenerated.Runnable_2(); // do NOT change name "instance" (used in SmartParamameter)
instance.Value = ... To support BenchmarkDotNet.Autogenerated.Runnable_2 instance = new BenchmarkDotNet.Autogenerated.Runnable_2 { Value = ... }; |
Yes if you are willing to provide tests and implementation. The template is located here: And the actual content is generated here:
|
Trying to convert a benchmarking sample to be nullable by setting
<Nullable>enable</Nullable>
, and a warning shows up for this line:BenchmarkDotNet/samples/BenchmarkDotNet.Samples/IntroSetupCleanupGlobal.cs
Line 10 in 2ba3033
What's the strategy to deal with NRT for a case like this?
Could the xUnit's approach to setup and teardown be leveraged? Instead of attributes Constructor+IDisposable would be used.
The text was updated successfully, but these errors were encountered: