Ensure a package only references required types
- Dominant language
- C#
- Stars
- 4.6k
- Forks
- 605
- PR merge metrics
- No merged PRs in 30d
Description
Currently, there are some generated helper features/methods that will unintentionally link types together that may never be needed. For example, parts that are only for spreadsheets will be referenced by a word document. This prevents the IL trimmer from removing unused code for purposes of trimming and AOT.
Specifically, we should:
- [ ] Implement package specific implementations of `IRootElementFactory`
- [ ] Ensure any element activation code is only linked via pathways where it will be used
- [ ] A single generated file is used for all the root part generation - this would need to be separated out to be per-document type
- [ ] TypedOpenXmlPartReader was introduced in 2.19 as a type that provides the typed factories for use of OpenXmlPartReader with just a stream. This would need to be replaced with a doc specific one
- [ ] The `TypedFeatures` and `Typed...` class should be removed so that there's no shared code there
Contributor guide
Assessment
This issue has not been assessed yet.