-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Minor improvement to linker descriptor documentation #127015
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -50,7 +50,7 @@ Descriptor XML can also be passed to the trimmer on the command via the [`-x` pa | |||||
| ```xml | ||||||
| <linker> | ||||||
| <assembly fullname="Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> | ||||||
| <type fullname="Assembly.Foo" preserve="all" /> | ||||||
| <type fullname="Namespace.Foo" preserve="all" /> | ||||||
| </assembly> | ||||||
| </linker> | ||||||
| ``` | ||||||
|
|
@@ -62,25 +62,25 @@ The `required` attribute specifies that if the type is not marked, during the ma | |||||
| ```xml | ||||||
| <linker> | ||||||
| <assembly fullname="Assembly"> | ||||||
| <type fullname="Assembly.A" preserve="all" /> | ||||||
| <type fullname="Namespace.A" preserve="all" /> | ||||||
|
|
||||||
| <!-- No "preserve" attribute and no members specified means preserve all members --> | ||||||
| <type fullname="Assembly.B" /> | ||||||
| <type fullname="Namespace.B" /> | ||||||
|
|
||||||
| <!-- Preserve the type declaration only --> | ||||||
| <type fullname="Assembly.C" preserve="nothing" /> | ||||||
| <type fullname="Namespace.C" preserve="nothing" /> | ||||||
|
|
||||||
| <!-- Preserve a nested type --> | ||||||
| <type fullname="Assembly.D/Nested" preserve="all" /> | ||||||
| <type fullname="Namespace.D/Nested" preserve="all" /> | ||||||
|
|
||||||
| <!-- Preserve all types with the prefix in their name --> | ||||||
| <type fullname="Assembly.Prefix*" /> | ||||||
| <type fullname="Namespace.Prefix*" /> | ||||||
|
|
||||||
| <!-- Preserve the type if the type is used. If the type is not used it will be removed --> | ||||||
| <type fullname="Assembly.E" required="false" /> | ||||||
| <type fullname="Namespace.E" required="false" /> | ||||||
|
|
||||||
| <!-- Type with generics in the signature --> | ||||||
| <type fullname="Assembly.G`1" /> | ||||||
| <type fullname="Namespace.G`1" /> | ||||||
| </assembly> | ||||||
| </linker> | ||||||
| ``` | ||||||
|
|
@@ -92,10 +92,10 @@ The `required` attribute specifies that if the type is not marked, during the ma | |||||
| <assembly fullname="Assembly"> | ||||||
|
|
||||||
| <!-- Preserve all fields on a type --> | ||||||
| <type fullname="Assembly.A" preserve="fields" /> | ||||||
| <type fullname="Namespace.A" preserve="fields" /> | ||||||
|
|
||||||
| <!-- Preserve all methods on a type --> | ||||||
| <type fullname="Assembly.B" preserve="methods" /> | ||||||
| <type fullname="Namespace.B" preserve="methods" /> | ||||||
| </assembly> | ||||||
| </linker> | ||||||
| ``` | ||||||
|
|
@@ -107,7 +107,7 @@ The `required` attribute specifies that if the type is not marked, during the ma | |||||
| <assembly fullname="Assembly"> | ||||||
|
|
||||||
| <!-- Preserves all types who's fully qualified type name matches the regular expression --> | ||||||
|
||||||
| <!-- Preserves all types who's fully qualified type name matches the regular expression --> | |
| <!-- Preserves all types whose fully qualified type name matches the regular expression --> |
Copilot
AI
Apr 16, 2026
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.
In this example, the comment says the type name matches a “regular expression”, but the sample uses the * wildcard pattern (as in the earlier prefix examples). Also, <type fullname="Namespace.Namespace*" /> and <namespace fullname="Assembly.Namespace" /> use different prefixes, which undermines the doc’s goal of showing assembly name and namespace aren’t inherently related. Consider updating the wording to describe wildcard matching and aligning the sample namespace/type values.
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.
This line (and a few others in the XML snippets) has trailing whitespace at end-of-line. In Markdown this can create unintended hard line breaks and also tends to fail whitespace hygiene checks; please trim trailing spaces in the examples.