Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] Split up XA3001 errors and move them in…
Browse files Browse the repository at this point in the history
…to .resx file (dotnet#4176)

Context: 0342fe5
Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1009374/

Split up the different uses of XA3001 by giving each error condition
its own code.  This makes it possible to gather telemetry for each
condition separately, and it also makes it easier for users to search
for the particular code they are seeing.

Move XA3001 and the other new error codes to the `.resx` file so that
they are localizable.

Remove the `try/catch` from `CilStrip.RunTask()` because after commit
d4c8f07, the `AndroidTask` base class now provides that functionality.
  • Loading branch information
brendanzagaeski authored and jonpryor committed Jan 27, 2020
1 parent 3e0b4da commit 1524e6e
Show file tree
Hide file tree
Showing 20 changed files with 402 additions and 13 deletions.
8 changes: 7 additions & 1 deletion Documentation/guides/messages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ ms.date: 08/23/2019

## XA2xxx: Linker

## XA3xxx: AOT
## XA3xxx: Unmanaged code compilation

+ XA3001: Could not AOT the assembly: {assembly}
+ XA3002: Invalid AOT mode: {mode}
+ XA3003: Could not strip IL of assembly: {assembly}
+ XA3004: Could not compile native assembly file: {file}
+ XA3005: Could not link native shared library: {library}

## XA4xxx: Code generation

Expand Down
45 changes: 45 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,24 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="XA3001" xml:space="preserve">
<value>Could not AOT the assembly: {0}</value>
<comment>The abbreviation "AOT" should not be translated.</comment>
</data>
<data name="XA3002" xml:space="preserve">
<value>Invalid AOT mode: {0}</value>
<comment>The abbreviation "AOT" should not be translated.</comment>
</data>
<data name="XA3003" xml:space="preserve">
<value>Could not strip IL of assembly: {0}</value>
<comment>The abbreviation "IL" should not be translated.</comment>
</data>
<data name="XA3004" xml:space="preserve">
<value>Could not compile native assembly file: {0}</value>
</data>
<data name="XA3005" xml:space="preserve">
<value>Could not link native shared library: {0}</value>
</data>
<data name="XA4214" xml:space="preserve">
<value>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</value>
<comment>{0} - The managed type name
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
25 changes: 25 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../Resources.resx">
<body>
<trans-unit id="XA3001">
<source>Could not AOT the assembly: {0}</source>
<target state="new">Could not AOT the assembly: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3002">
<source>Invalid AOT mode: {0}</source>
<target state="new">Invalid AOT mode: {0}</target>
<note>The abbreviation "AOT" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3003">
<source>Could not strip IL of assembly: {0}</source>
<target state="new">Could not strip IL of assembly: {0}</target>
<note>The abbreviation "IL" should not be translated.</note>
</trans-unit>
<trans-unit id="XA3004">
<source>Could not compile native assembly file: {0}</source>
<target state="new">Could not compile native assembly file: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA3005">
<source>Could not link native shared library: {0}</source>
<target state="new">Could not link native shared library: {0}</target>
<note />
</trans-unit>
<trans-unit id="XA4214">
<source>The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</source>
<target state="new">The managed type `{0}` exists in multiple assemblies: {1}. Please refactor the managed type names in these assemblies so that they are not identical.</target>
Expand Down
Loading

0 comments on commit 1524e6e

Please sign in to comment.