Remove shared code
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 133
Description
The MSBuild repo has `src/Shared` that has a ton of functionality in it that is included in multiple projects by adding the files to multiple projects.
The files are fairly entangled with one another and can wind up causing new things to have to be implemented in the same way, causing future problems.
This code sharing slows down build (because the same files have to be compiled in multiple contexts), and runtime (the classes/methods have to be JITted in each assembly they get compiled into), is confusing, and can run into confusing functional problems (because each assembly's copy of each class gets its own independent static state and they can't be passed to each other).
So we should remove it! But that's nontrivial.
Issues noticed so far:
- [x] There _was_ no good place to put it that would be accessible from all of our assemblies, but `Microsoft.Build.Framework` now has `InternalsVisibleTo` all of the other assemblies.
- [ ] Resource access is tough. As-is, all code can call, for instance `ErrorUtilities.VerifyThrow()` and refer to a string resource that is unique to their assembly. But it's not clear when they're doing that versus using a "shared" resource.
- [ ] It's hard to move individual things because of
- [ ] The entanglements (moving one class often means moving a bunch of other classes)
- [ ] The inability to have `private` classes in `Framework`, so once you put a class there it has to be removed from everywhere else.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.