Skip to content

Commit 1524e6e

Browse files
brendanzagaeskijonpryor
authored andcommitted
[Xamarin.Android.Build.Tasks] Split up XA3001 errors and move them into .resx file (#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.
1 parent 3e0b4da commit 1524e6e

20 files changed

+402
-13
lines changed

Documentation/guides/messages/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ ms.date: 08/23/2019
7979

8080
## XA2xxx: Linker
8181

82-
## XA3xxx: AOT
82+
## XA3xxx: Unmanaged code compilation
83+
84+
+ XA3001: Could not AOT the assembly: {assembly}
85+
+ XA3002: Invalid AOT mode: {mode}
86+
+ XA3003: Could not strip IL of assembly: {assembly}
87+
+ XA3004: Could not compile native assembly file: {file}
88+
+ XA3005: Could not link native shared library: {library}
8389

8490
## XA4xxx: Code generation
8591

src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Xamarin.Android.Build.Tasks/Properties/Resources.resx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,24 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120+
<data name="XA3001" xml:space="preserve">
121+
<value>Could not AOT the assembly: {0}</value>
122+
<comment>The abbreviation "AOT" should not be translated.</comment>
123+
</data>
124+
<data name="XA3002" xml:space="preserve">
125+
<value>Invalid AOT mode: {0}</value>
126+
<comment>The abbreviation "AOT" should not be translated.</comment>
127+
</data>
128+
<data name="XA3003" xml:space="preserve">
129+
<value>Could not strip IL of assembly: {0}</value>
130+
<comment>The abbreviation "IL" should not be translated.</comment>
131+
</data>
132+
<data name="XA3004" xml:space="preserve">
133+
<value>Could not compile native assembly file: {0}</value>
134+
</data>
135+
<data name="XA3005" xml:space="preserve">
136+
<value>Could not link native shared library: {0}</value>
137+
</data>
120138
<data name="XA4214" xml:space="preserve">
121139
<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>
122140
<comment>{0} - The managed type name

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
<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">
33
<file datatype="xml" source-language="en" target-language="cs" original="../Resources.resx">
44
<body>
5+
<trans-unit id="XA3001">
6+
<source>Could not AOT the assembly: {0}</source>
7+
<target state="new">Could not AOT the assembly: {0}</target>
8+
<note>The abbreviation "AOT" should not be translated.</note>
9+
</trans-unit>
10+
<trans-unit id="XA3002">
11+
<source>Invalid AOT mode: {0}</source>
12+
<target state="new">Invalid AOT mode: {0}</target>
13+
<note>The abbreviation "AOT" should not be translated.</note>
14+
</trans-unit>
15+
<trans-unit id="XA3003">
16+
<source>Could not strip IL of assembly: {0}</source>
17+
<target state="new">Could not strip IL of assembly: {0}</target>
18+
<note>The abbreviation "IL" should not be translated.</note>
19+
</trans-unit>
20+
<trans-unit id="XA3004">
21+
<source>Could not compile native assembly file: {0}</source>
22+
<target state="new">Could not compile native assembly file: {0}</target>
23+
<note />
24+
</trans-unit>
25+
<trans-unit id="XA3005">
26+
<source>Could not link native shared library: {0}</source>
27+
<target state="new">Could not link native shared library: {0}</target>
28+
<note />
29+
</trans-unit>
530
<trans-unit id="XA4214">
631
<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>
732
<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>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
<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">
33
<file datatype="xml" source-language="en" target-language="de" original="../Resources.resx">
44
<body>
5+
<trans-unit id="XA3001">
6+
<source>Could not AOT the assembly: {0}</source>
7+
<target state="new">Could not AOT the assembly: {0}</target>
8+
<note>The abbreviation "AOT" should not be translated.</note>
9+
</trans-unit>
10+
<trans-unit id="XA3002">
11+
<source>Invalid AOT mode: {0}</source>
12+
<target state="new">Invalid AOT mode: {0}</target>
13+
<note>The abbreviation "AOT" should not be translated.</note>
14+
</trans-unit>
15+
<trans-unit id="XA3003">
16+
<source>Could not strip IL of assembly: {0}</source>
17+
<target state="new">Could not strip IL of assembly: {0}</target>
18+
<note>The abbreviation "IL" should not be translated.</note>
19+
</trans-unit>
20+
<trans-unit id="XA3004">
21+
<source>Could not compile native assembly file: {0}</source>
22+
<target state="new">Could not compile native assembly file: {0}</target>
23+
<note />
24+
</trans-unit>
25+
<trans-unit id="XA3005">
26+
<source>Could not link native shared library: {0}</source>
27+
<target state="new">Could not link native shared library: {0}</target>
28+
<note />
29+
</trans-unit>
530
<trans-unit id="XA4214">
631
<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>
732
<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>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
<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">
33
<file datatype="xml" source-language="en" target-language="es" original="../Resources.resx">
44
<body>
5+
<trans-unit id="XA3001">
6+
<source>Could not AOT the assembly: {0}</source>
7+
<target state="new">Could not AOT the assembly: {0}</target>
8+
<note>The abbreviation "AOT" should not be translated.</note>
9+
</trans-unit>
10+
<trans-unit id="XA3002">
11+
<source>Invalid AOT mode: {0}</source>
12+
<target state="new">Invalid AOT mode: {0}</target>
13+
<note>The abbreviation "AOT" should not be translated.</note>
14+
</trans-unit>
15+
<trans-unit id="XA3003">
16+
<source>Could not strip IL of assembly: {0}</source>
17+
<target state="new">Could not strip IL of assembly: {0}</target>
18+
<note>The abbreviation "IL" should not be translated.</note>
19+
</trans-unit>
20+
<trans-unit id="XA3004">
21+
<source>Could not compile native assembly file: {0}</source>
22+
<target state="new">Could not compile native assembly file: {0}</target>
23+
<note />
24+
</trans-unit>
25+
<trans-unit id="XA3005">
26+
<source>Could not link native shared library: {0}</source>
27+
<target state="new">Could not link native shared library: {0}</target>
28+
<note />
29+
</trans-unit>
530
<trans-unit id="XA4214">
631
<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>
732
<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>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
<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">
33
<file datatype="xml" source-language="en" target-language="fr" original="../Resources.resx">
44
<body>
5+
<trans-unit id="XA3001">
6+
<source>Could not AOT the assembly: {0}</source>
7+
<target state="new">Could not AOT the assembly: {0}</target>
8+
<note>The abbreviation "AOT" should not be translated.</note>
9+
</trans-unit>
10+
<trans-unit id="XA3002">
11+
<source>Invalid AOT mode: {0}</source>
12+
<target state="new">Invalid AOT mode: {0}</target>
13+
<note>The abbreviation "AOT" should not be translated.</note>
14+
</trans-unit>
15+
<trans-unit id="XA3003">
16+
<source>Could not strip IL of assembly: {0}</source>
17+
<target state="new">Could not strip IL of assembly: {0}</target>
18+
<note>The abbreviation "IL" should not be translated.</note>
19+
</trans-unit>
20+
<trans-unit id="XA3004">
21+
<source>Could not compile native assembly file: {0}</source>
22+
<target state="new">Could not compile native assembly file: {0}</target>
23+
<note />
24+
</trans-unit>
25+
<trans-unit id="XA3005">
26+
<source>Could not link native shared library: {0}</source>
27+
<target state="new">Could not link native shared library: {0}</target>
28+
<note />
29+
</trans-unit>
530
<trans-unit id="XA4214">
631
<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>
732
<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>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
<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">
33
<file datatype="xml" source-language="en" target-language="it" original="../Resources.resx">
44
<body>
5+
<trans-unit id="XA3001">
6+
<source>Could not AOT the assembly: {0}</source>
7+
<target state="new">Could not AOT the assembly: {0}</target>
8+
<note>The abbreviation "AOT" should not be translated.</note>
9+
</trans-unit>
10+
<trans-unit id="XA3002">
11+
<source>Invalid AOT mode: {0}</source>
12+
<target state="new">Invalid AOT mode: {0}</target>
13+
<note>The abbreviation "AOT" should not be translated.</note>
14+
</trans-unit>
15+
<trans-unit id="XA3003">
16+
<source>Could not strip IL of assembly: {0}</source>
17+
<target state="new">Could not strip IL of assembly: {0}</target>
18+
<note>The abbreviation "IL" should not be translated.</note>
19+
</trans-unit>
20+
<trans-unit id="XA3004">
21+
<source>Could not compile native assembly file: {0}</source>
22+
<target state="new">Could not compile native assembly file: {0}</target>
23+
<note />
24+
</trans-unit>
25+
<trans-unit id="XA3005">
26+
<source>Could not link native shared library: {0}</source>
27+
<target state="new">Could not link native shared library: {0}</target>
28+
<note />
29+
</trans-unit>
530
<trans-unit id="XA4214">
631
<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>
732
<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>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
<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">
33
<file datatype="xml" source-language="en" target-language="ja" original="../Resources.resx">
44
<body>
5+
<trans-unit id="XA3001">
6+
<source>Could not AOT the assembly: {0}</source>
7+
<target state="new">Could not AOT the assembly: {0}</target>
8+
<note>The abbreviation "AOT" should not be translated.</note>
9+
</trans-unit>
10+
<trans-unit id="XA3002">
11+
<source>Invalid AOT mode: {0}</source>
12+
<target state="new">Invalid AOT mode: {0}</target>
13+
<note>The abbreviation "AOT" should not be translated.</note>
14+
</trans-unit>
15+
<trans-unit id="XA3003">
16+
<source>Could not strip IL of assembly: {0}</source>
17+
<target state="new">Could not strip IL of assembly: {0}</target>
18+
<note>The abbreviation "IL" should not be translated.</note>
19+
</trans-unit>
20+
<trans-unit id="XA3004">
21+
<source>Could not compile native assembly file: {0}</source>
22+
<target state="new">Could not compile native assembly file: {0}</target>
23+
<note />
24+
</trans-unit>
25+
<trans-unit id="XA3005">
26+
<source>Could not link native shared library: {0}</source>
27+
<target state="new">Could not link native shared library: {0}</target>
28+
<note />
29+
</trans-unit>
530
<trans-unit id="XA4214">
631
<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>
732
<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>

src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
<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">
33
<file datatype="xml" source-language="en" target-language="ko" original="../Resources.resx">
44
<body>
5+
<trans-unit id="XA3001">
6+
<source>Could not AOT the assembly: {0}</source>
7+
<target state="new">Could not AOT the assembly: {0}</target>
8+
<note>The abbreviation "AOT" should not be translated.</note>
9+
</trans-unit>
10+
<trans-unit id="XA3002">
11+
<source>Invalid AOT mode: {0}</source>
12+
<target state="new">Invalid AOT mode: {0}</target>
13+
<note>The abbreviation "AOT" should not be translated.</note>
14+
</trans-unit>
15+
<trans-unit id="XA3003">
16+
<source>Could not strip IL of assembly: {0}</source>
17+
<target state="new">Could not strip IL of assembly: {0}</target>
18+
<note>The abbreviation "IL" should not be translated.</note>
19+
</trans-unit>
20+
<trans-unit id="XA3004">
21+
<source>Could not compile native assembly file: {0}</source>
22+
<target state="new">Could not compile native assembly file: {0}</target>
23+
<note />
24+
</trans-unit>
25+
<trans-unit id="XA3005">
26+
<source>Could not link native shared library: {0}</source>
27+
<target state="new">Could not link native shared library: {0}</target>
28+
<note />
29+
</trans-unit>
530
<trans-unit id="XA4214">
631
<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>
732
<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>

0 commit comments

Comments
 (0)