This change refactors how we track the state of which files get installed from each library. The LibraryInstallationGoalState is a mapping of destination files to their sources (where the source is from the local file cache if applicable).
In a manner of speaking, if LibraryInstallationState ("LIS") is the input ("I want these files from this library from that provider"), then LibraryInstallationGoalState ("LIGS") is a computed output of exactly what work needs to be performed ("These files are copied to those destinations").
This design offers some additional flexibility.
The main difference is that we now have a way to represent arbitrary file mappings (a building block to eventually supporting file mappings in #738). LIS only contains a set of file paths within the library, often represented as a glob pattern. LIGS contains the actual files that would be installed, including the expansion of any glob patterns.
It will make refactoring the collision detection logic (LibrariesValidator.GetFilesConflicts) pretty simple, since now we can just get a list of all the destination files. This will also be necessary for more flexible file mappings, but I left it out of this PR.
The collection of files is agnostic to provider. This isn't super useful today, but could open the door to refactoring some install/uninstall logic out of the providers (I had a thought that provider implementations might be simpler that way, just computing goal states instead of providing install/uninstall logic as well).
This change refactors how we track the state of which files get installed from each library. The LibraryInstallationGoalState is a mapping of destination files to their sources (where the source is from the local file cache if applicable).
In a manner of speaking, if LibraryInstallationState ("LIS") is the input ("I want these files from this library from that provider"), then LibraryInstallationGoalState ("LIGS") is a computed output of exactly what work needs to be performed ("These files are copied to those destinations").
This design offers some additional flexibility.