-
Notifications
You must be signed in to change notification settings - Fork 555
[WIP] Fix NRT annotations in src\Xamarin.Android.Build.Tasks\
#10335
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"/Users/builder/azdo/_work/4/s/android/build-tools/xaprepare/xaprepare/xaprepare.csproj" (default target) (1) ->
(CoreCompile target) ->
/Users/builder/azdo/_work/4/s/android/src/Xamarin.Android.Build.Tasks/Utilities/PathUtil.cs(22,19): error CS7036: There is no argument given that corresponds to the required parameter 'value' of 'string.IsNullOrEmpty(string?)' [/Users/builder/azdo/_work/4/s/android/build-tools/xaprepare/xaprepare/xaprepare.csproj]
/Users/builder/azdo/_work/4/s/android/src/Xamarin.Android.Build.Tasks/Utilities/PathUtil.cs(25,13): error CS7036: There is no argument given that corresponds to the required parameter 'value' of 'string.IsNullOrEmpty(string?)' [/Users/builder/azdo/_work/4/s/android/build-tools/xaprepare/xaprepare/xaprepare.csproj]
/Users/builder/azdo/_work/4/s/android/src/Xamarin.Android.Build.Tasks/Utilities/PathUtil.cs(148,14): error CS7036: There is no argument given that corresponds to the required parameter 'value' of 'string.IsNullOrEmpty(string?)' [/Users/builder/azdo/_work/4/s/android/build-tools/xaprepare/xaprepare/xaprepare.csproj]
/Users/builder/azdo/_work/4/s/android/src/Xamarin.Android.Build.Tasks/Utilities/PathUtil.cs(148,40): error CS7036: There is no argument given that corresponds to the required parameter 'value' of 'string.IsNullOrEmpty(string?)' [/Users/builder/azdo/_work/4/s/android/build-tools/xaprepare/xaprepare/xaprepare.csproj]
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Fixed the compilation errors in PathUtil.cs by adding the missing Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
"/Users/builder/azdo/_work/7/s/android/build-tools/xaprepare/xaprepare/xaprepare.csproj" (default target) (1) -> |
…NullOrEmpty Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Fixed the namespace compilation error in PathUtil.cs by removing the |
Fix these errors, and if that doesn't work just undo the changes to these files for now:
|
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Fixed all the compilation errors listed in the build output. The main issues were:
The build now succeeds without any errors. Commit: e206cee |
Working on fixing NRT annotations in
src\Xamarin.Android.Build.Tasks\Utilities\
directory to follow repository guidelines.Analysis Summary:
#nullable disable
: 19 files (need conversion)#nullable enable
: 5 files (already compliant, verify patterns)#nullable enable
added)Progress:
#nullable disable
to#nullable enable
:FileResourceParser.cs
- Added nullable annotations, converted string.IsNullOrEmpty callsJavaResourceParser.cs
- Added nullable annotations for return types and variables#nullable enable
to files without directives (batch 1):FileUtil.cs
,InvalidActivityNameException.cs
,Features.cs
OutputLine.cs
,ResourceIdentifier.cs
,CompressedAssemblyInfo.cs
#nullable enable
to files without directives (batch 2):ACWMapGenerator.cs
,Aapt2Daemon.cs
,AndroidResource.cs
,AndroidRuntime.cs
ApplicationConfig.cs
,ApplicationConfigCLR.cs
,AssemblyCompression.cs
AssemblyIdentityMap.cs
,AssemblyPackagingHelper.cs
,AssemblyPipeline.cs
AssemblyStoreAssemblyInfo.cs
,AssemblyStoreBuilder.cs
,AssemblyStoreGenerator.Classes.cs
AssemblyStoreGenerator.cs
,BundleConfigSplitConfigsChecker.cs
,CecilExtensions.cs
#nullable enable
to files without directives (batch 3):DSOWrapperGenerator.cs
,ELFHelper.cs
,EnvironmentFilesParser.cs
,IAssemblyResolverExtensions.cs
ITaskItemExtensions.cs
,JCWGenerator.cs
,JavaObjectsXmlFile.cs
,JsonExtensions.cs
KnownMetadata.cs
,MSBuildLinkContext.cs
,MamJsonParser.cs
#nullable enable
to files without directives (batch 4):MarshalMethodCecilAdapter.cs
,MarshalMethodsHelpers.cs
,MarshalMethodsNativeAssemblyGeneratorCoreCLR.cs
MarshalMethodsNativeAssemblyGeneratorMonoVM.cs
,MarshalMethodsState.cs
,MavenExtensions.cs
MetadataResolver.cs
,MonoAndroidHelper.Basic.cs
,MonoAndroidHelper.Linker.cs
MonoAndroidHelper.Nullable.cs
,NativeCodeGenState.cs
,NativeLinker.cs
NativeRuntimeComponents.cs
,NativeTypeMappingData.cs
,PackageFileListBuilder.cs
PathUtil.cs
,PinvokeScanner.cs
,PreservePinvokesNativeAssemblyGenerator.cs
#nullable disable
patterns#nullable enable
to remaining files without nullable directivesFiles Completed (53/92):
✅ FileResourceParser.cs, JavaResourceParser.cs, FileUtil.cs, InvalidActivityNameException.cs, Features.cs, OutputLine.cs, ResourceIdentifier.cs, CompressedAssemblyInfo.cs, ACWMapGenerator.cs, Aapt2Daemon.cs, AndroidResource.cs, AndroidRuntime.cs, ApplicationConfig.cs, ApplicationConfigCLR.cs, AssemblyCompression.cs, AssemblyIdentityMap.cs, AssemblyPackagingHelper.cs, AssemblyPipeline.cs, AssemblyStoreAssemblyInfo.cs, AssemblyStoreBuilder.cs, AssemblyStoreGenerator.Classes.cs, AssemblyStoreGenerator.cs, BundleConfigSplitConfigsChecker.cs, CecilExtensions.cs, DSOWrapperGenerator.cs, ELFHelper.cs, EnvironmentFilesParser.cs, IAssemblyResolverExtensions.cs, ITaskItemExtensions.cs, JCWGenerator.cs, JavaObjectsXmlFile.cs, JsonExtensions.cs, KnownMetadata.cs, MSBuildLinkContext.cs, MamJsonParser.cs, MarshalMethodCecilAdapter.cs, MarshalMethodsHelpers.cs, MarshalMethodsNativeAssemblyGeneratorCoreCLR.cs, MarshalMethodsNativeAssemblyGeneratorMonoVM.cs, MarshalMethodsState.cs, MavenExtensions.cs, MetadataResolver.cs, MonoAndroidHelper.Basic.cs, MonoAndroidHelper.Linker.cs, MonoAndroidHelper.Nullable.cs, NativeCodeGenState.cs, NativeLinker.cs, NativeRuntimeComponents.cs, NativeTypeMappingData.cs, PackageFileListBuilder.cs, PathUtil.cs, PinvokeScanner.cs, PreservePinvokesNativeAssemblyGenerator.cs
Remaining files with
#nullable disable
(16 left):ApplicationConfigNativeAssemblyGenerator.cs, ApplicationConfigNativeAssemblyGeneratorCLR.cs, CompressedAssembliesNativeAssemblyGenerator.cs, JniRemappingAssemblyGenerator.cs, ManagedMarshalMethodsLookupGenerator.cs, ManagedResourceParser.cs, ManifestDocument.cs, ManifestDocumentElement.cs, MarshalMethodsAssemblyRewriter.cs, MarshalMethodsClassifier.cs, MarshalMethodsNativeAssemblyGenerator.cs, MonoAndroidHelper.cs, TypeMapGenerator.cs, TypeMappingDebugNativeAssemblyGenerator.cs, TypeMappingReleaseNativeAssemblyGenerator.cs, TypeMappingReleaseNativeAssemblyGeneratorCLR.cs
Fixes #10326.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.