-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JdkInfo] handle invalid XML from /usr/libexec/java_home (#120)
Context: dotnet/android#5992 Context: https://dev.azure.com/xamarin/public/_build/results?buildId=40929&view=logs&j=cfef19e4-4225-5e84-636a-86ba2231ac21&t=cd3bc6c3-ac29-5320-67c9-5fb59fc8e05c&l=732 dotnet/maui has hit some build failures such as: error XARSD7000: System.Xml.XmlException: Root element is missing. error XARSD7000: at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) error XARSD7000: at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo (System.String res) error XARSD7000: at System.Xml.XmlTextReaderImpl.ParseDocumentContent () error XARSD7000: at System.Xml.XmlTextReaderImpl.Read () error XARSD7000: at System.Xml.XmlReader.MoveToContent () error XARSD7000: at System.Xml.Linq.XElement.Load (System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) error XARSD7000: at System.Xml.Linq.XElement.Parse (System.String text, System.Xml.Linq.LoadOptions options) error XARSD7000: at System.Xml.Linq.XElement.Parse (System.String text) error XARSD7000: at Xamarin.Android.Tools.JdkInfo+<GetLibexecJdkPaths>d__56.MoveNext () error XARSD7000: at System.Linq.Enumerable+DistinctIterator`1[TSource].MoveNext () error XARSD7000: at System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].MoveNext () error XARSD7000: at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].ToArray () error XARSD7000: at System.Linq.Buffer`1[TElement]..ctor (System.Collections.Generic.IEnumerable`1[T] source) error XARSD7000: at System.Linq.OrderedEnumerable`1+<GetEnumerator>d__3[TElement].MoveNext () error XARSD7000: at System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () error XARSD7000: at System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].MoveNext () error XARSD7000: at Xamarin.Android.Tools.AndroidSdkBase.GetValidPath (System.Func`2[T,TResult] pathValidator, System.String ctorParam, System.Func`1[TResult] getPreferredPath, System.Func`1[TResult] getAllPaths) error XARSD7000: at Xamarin.Android.Tools.AndroidSdkBase.Initialize (System.String androidSdkPath, System.String androidNdkPath, System.String javaSdkPath) error XARSD7000: at Xamarin.Android.Tools.AndroidSdkInfo..ctor (System.Action`2[T1,T2] logger, System.String androidSdkPath, System.String androidNdkPath, System.String javaSdkPath) error XARSD7000: at Xamarin.Android.Tasks.MonoAndroidHelper.RefreshAndroidSdk (System.String sdkPath, System.String ndkPath, System.String javaPath, Microsoft.Build.Utilities.TaskLoggingHelper logHelper) error XARSD7000: at Xamarin.Android.Tasks.ResolveSdks.RunTask () error XARSD7000: at Xamarin.Android.Tasks.AndroidTask.Execute () It looks like `JdkInfo.GetLibexecJdkPaths()` doesn't handle `XmlException` and warn appropriately. I don't have the *actual* output of `/usr/libexec/java_home -X` from these machines, but I suspect it's printing some message before the XML or no XML at all.
- Loading branch information
1 parent
81519fe
commit 79e3b97
Showing
16 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters