Skip to content
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

[ArPow] Source-built SDK reports "preview feature" errors #2483

Closed
uweigand opened this issue Sep 30, 2021 · 9 comments
Closed

[ArPow] Source-built SDK reports "preview feature" errors #2483

uweigand opened this issue Sep 30, 2021 · 9 comments
Assignees
Labels
area-build Improvements in source-build's own build process

Comments

@uweigand
Copy link

When building a current .NET6 aspnetcore source tree with an SDK created via ArPow source build, the build fails with errors along the lines of:

/home/uweigand/xx/aspnetcore/src/Servers/Kestrel/Core/src/ListenOptionsHttpsExtensions.cs(259,49): error CA2252: Using 'Http3' requires opting into preview features. See https://aka.ms/dotnet-warnings/preview-features for more information. [/home/uweigand/xx/aspnetcore/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj]

(There are many instances of the CA2252 error, refering to multiple features across many files.)

Building the same sources with an SDK built directly from the installer repo does not report these errors.

CC @crummel

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dseefeld dseefeld added area-build Improvements in source-build's own build process and removed untriaged labels Sep 30, 2021
@crummel
Copy link
Contributor

crummel commented Sep 30, 2021

Hi Ulrich, I think you said you were using code from about a week ago, do you know if you had this commit in the source-built SDK you were testing: dotnet/installer#12123 ? @MichaelSimons and I were trying to track this down and it'd be helpful to know. Also, what commit of aspnetcore were you trying to build?

@uweigand
Copy link
Author

uweigand commented Oct 1, 2021

Hi @crummel, I was creating the source-build tarball at exactly the commit you point to, so it is included. I'm trying to build commit 4ab0cf33ecb1c25a38422f5b11810e4c8a91d8eb of aspnetcore, which is the commit that is also being pulled in that that commit of source-build.

@dsplaisted
Copy link
Member

A binlog of a build exhibiting this issue could be helpful to investigate.

/cc @terrajobst

@uweigand
Copy link
Author

uweigand commented Oct 3, 2021

I've now updated the source build to the current top of the rc2 branch: 7a78f60c47971b64b2ab98f8d9c2eb5ab48cf073, and the problem remains unchanged.

Here's a set of logs created by this build command:

./eng/build.sh -arch s390x -c Release --projects /home/uweigand/xx/aspnetcore/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj -bl -v:detailed >verbose.log

logs.zip

@omajid
Copy link
Member

omajid commented Oct 3, 2021

I have just started running into this issue too, on x64. I am at commit 28be3e9a006d90d8c6e87d4353b77882829df718. I was not seeing this using the same commit last week, so I am not sure what has changed :(

Edit: well, I know one thing that has changed: I am now applying the mono/s390x patches that @uweigand pointed me to, even on x64. The patches mostly add <UseApphost>false</UseApphost> to a bunch of projects. Could those be causing this issue?

@omajid
Copy link
Member

omajid commented Oct 4, 2021

This patch to aspnetcore seems to have helped:

--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -69,6 +69,7 @@
 
     <PropertyGroup>
       <InnerBuildArgs>$(InnerBuildArgs) /p:SourceBuildRuntimeIdentifier=$(TargetRuntimeIdentifier)</InnerBuildArgs>
+      <InnerBuildArgs>$(InnerBuildArgs) /p:CheckEolTargetFramework=false</InnerBuildArgs>
     </PropertyGroup>
   </Target>
 

@uweigand
Copy link
Author

uweigand commented Oct 5, 2021

A bit of an update: it looks like the problem is related to an upper-case / lower-case mismatch in file names, which seems to have been introduced by this fix to roslyn-analyzers: dotnet/roslyn-analyzers#5421

The code now looks for a file called: sdk/6.0.100-rc.2.21503.1/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_6_default.editorconfig in all lower-case, but this file does not exist. Rather, the file as installed by the SDK is called: AnalysisLevel_6_default.editorconfig

Therefore, the file contents are not applied, and part of those contents is to reduce CA2252 from an error to a suggestion.

Manually renaming the file to the expected name causes the aspnetcore build to proceed

@dseefeld
Copy link
Contributor

I validated that this change has flowed in with dotnet/installer#12311 and that a tarball build produces an SDK that no longer exhibits the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-build Improvements in source-build's own build process
Projects
None yet
Development

No branches or pull requests

5 participants