You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you be interested in turning on warnings as errors in the CI pipeline? When I build locally I see ~200 warnings, which makes ensuring I don't introduce new warnings difficult.
Some maintainers dislike the churn, so I wanted to ask before starting. If you agree, I'd follow an approach like this:
Enable warnings as errors in the AppVeyor pipeline, but not locally to avoid slowing down local dev when you're just trying to experiment
Fix all the warnings that can be easily / trivially fixed. I can break the fixes up by ID to make review easier
For issues that are difficult to fix, use inline suppressions to "baseline" and prevent future issues, and follow tracking bug(s) to address
I would assume the CI is using the latest. On mine I have 8.0.304. I ran the docker build, which is currently broken, just about to push up a PR for fixing that, and it shows a few.
K, the only warnings I could get to appear, which were some formatting and a file header, should be solved now. They also only showed up in Linux which I was able to get to them through the Docker image build.
(or similar). That would then signal to users what the acceptable SDK range is, pick the correct one if it's available, and give a (mostly) helpful error message if one isn't available.
OK, yeah verified with SquiggleCop that it's due to new warnings being recommended as part of .NET 9.
My personal preference is to use the global.json to set a version to help prevent people from getting into unsupported configurations, but I'm happy to do whatever you prefer :)
I think it would be beneficial to fix any warnings you’re getting with .net 9. We’ll eventually want to support it natively like we do with net6/net8. I think that would be my personal preference.
Done. And errors are fixed. I enforced the code style checking on release builds (it added ~40 seconds) to the build and that's annoying so it'll do it during CI. Had to ignore a couple of IDE0055 Linux bugs and CRLF line endings but it's out now.
Activity
EdwardCooke commentedon Sep 5, 2024
That's interesting. When I build locally there's no errors or warnings. Same when the CI server builds, there's no warnings.
MattKotsenas commentedon Sep 5, 2024
Interesting... I'll see if I can figure out what's causing the difference in behavior on my machine.
One thing that I notice is there's no global.json, so we're likely using different SDK versions. What SDK version do you / CI use?
EdwardCooke commentedon Sep 5, 2024
I would assume the CI is using the latest. On mine I have 8.0.304. I ran the docker build, which is currently broken, just about to push up a PR for fixing that, and it shows a few.
EdwardCooke commentedon Sep 5, 2024
K, the only warnings I could get to appear, which were some formatting and a file header, should be solved now. They also only showed up in Linux which I was able to get to them through the Docker image build.
MattKotsenas commentedon Sep 5, 2024
OK, I'm running a 9.0-preview build. So I bet that coupled with opt-ing into "recommended" here:
YamlDotNet/YamlDotNet/YamlDotNet.csproj
Line 95 in aa9be23
means that the recommendations get stricter with the .NET 9 SDK.
I can just close this since this is just my problem. I also can make a quick PR with a
global.jsonlike this:{ "sdk": { "version": "8.0.300", "rollForward": "patch" } }(or similar). That would then signal to users what the acceptable SDK range is, pick the correct one if it's available, and give a (mostly) helpful error message if one isn't available.
Let me know what you prefer. Thanks!
MattKotsenas commentedon Sep 5, 2024
OK, yeah verified with SquiggleCop that it's due to new warnings being recommended as part of .NET 9.
My personal preference is to use the global.json to set a version to help prevent people from getting into unsupported configurations, but I'm happy to do whatever you prefer :)
EdwardCooke commentedon Sep 5, 2024
I think it would be beneficial to fix any warnings you’re getting with .net 9. We’ll eventually want to support it natively like we do with net6/net8. I think that would be my personal preference.
lahma commentedon Sep 5, 2024
Created #971 to remove warnings on NET 9 SDK.
EdwardCooke commentedon Sep 5, 2024
Thanks. I’ll hopefully get to the pr today or tomorrow.
EdwardCooke commentedon Sep 13, 2024
Done. And errors are fixed. I enforced the code style checking on release builds (it added ~40 seconds) to the build and that's annoying so it'll do it during CI. Had to ignore a couple of IDE0055 Linux bugs and CRLF line endings but it's out now.
dotnet/roslyn#55526
dotnet/roslyn#73122