[mtouch] A few adjustments after allowing multiple root assemblies.
* Remove the MT0008 test, since the error will never be shown again. * Check non-existent root assemblies and report MT0018 instead of MT0007 if they look like command-line arguments. * Collect all MT0018/MT0007 errors before reporting any of them.
This commit is contained in:
Родитель
c6ec561c37
Коммит
144ff1a6ba
|
@ -448,17 +448,6 @@ namespace Xamarin
|
|||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MT0008 ()
|
||||
{
|
||||
using (var mtouch = new MTouchTool ()) {
|
||||
mtouch.CreateTemporaryAppDirectory ();
|
||||
mtouch.CustomArguments = new string [] { "foo.exe", "bar.exe" };
|
||||
mtouch.AssertExecuteFailure (MTouchAction.BuildSim, "build");
|
||||
mtouch.AssertError (8, "You should provide one root assembly only, found 2 assemblies: 'foo.exe', 'bar.exe'");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MT0015 ()
|
||||
{
|
||||
|
|
|
@ -1102,11 +1102,24 @@ namespace Xamarin.Bundler {
|
|||
if (EnableAsmOnlyBitCode)
|
||||
LLVMAsmWriter = true;
|
||||
|
||||
List<Exception> exceptions = null;
|
||||
foreach (var root in RootAssemblies) {
|
||||
if (!File.Exists (root))
|
||||
throw new MonoTouchException (7, true, "The root assembly '{0}' does not exist", root);
|
||||
if (File.Exists (root))
|
||||
continue;
|
||||
|
||||
if (exceptions == null)
|
||||
exceptions = new List<Exception> ();
|
||||
|
||||
if (root [0] == '-' || root [0] == '/') {
|
||||
exceptions.Add (ErrorHelper.CreateError (18, "Unknown command line argument: '{0}'", root));
|
||||
} else {
|
||||
exceptions.Add (ErrorHelper.CreateError (7, "The root assembly '{0}' does not exist", root));
|
||||
}
|
||||
}
|
||||
|
||||
if (exceptions?.Count > 0)
|
||||
throw new AggregateException (exceptions);
|
||||
|
||||
|
||||
if (no_framework)
|
||||
throw ErrorHelper.CreateError (96, "No reference to Xamarin.iOS.dll was found.");
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Xamarin.Bundler {
|
|||
// MT0005 <unused>
|
||||
// MT0006 There is no devel platform at '{0}', use --platform=PLAT to specify the SDK
|
||||
// MT0007 The root assembly '{0}' does not exist
|
||||
// MT0008 You should provide one root assembly only, found {0} assemblies: '{1}'
|
||||
// MT0008 <unused>
|
||||
// MT0009 Error while loading assemblies: {0}
|
||||
// MT0010 Could not parse the command line arguments: {0}
|
||||
// MT0011 {0} was built against a more recent runtime ({1}) than Xamarin.iOS supports
|
||||
|
|
Загрузка…
Ссылка в новой задаче