Not quite duplicated strings, mostly in metadata, e.g. [Obsolete] attributes
- Dominant language
- C#
- Stars
- 2.9k
- Forks
- 576
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Examples:
* `git grep Obsolete src/ | grep NotSupported`
* `git grep Obsolete src/ | grep stub`
The compiler can share the same string in several locations - but it must be the exact same (sub)string.
The linker can also remove many of them. However the linker is not always used (e.g. interpreter) and this affect the platform assembly size (e.g. when loaded in memory by the compiler, IDE, mtouch...)
Recommended solution, using string constants for the repetitive messages. This way they can be shared and will consume less space in the platform assemblies, e.g.
```
const string ObsoleteStub = "Empty stub (not a public API).";
...
[Obsolete (Constants.ObsoleteStub)]
```
We could also had an URL for the most common patterns and document the issue in more details.
ref: https://github.com/xamarin/xamarin-macios/pull/9268
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.