Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Elinor Fung <[email protected]>
  • Loading branch information
vitek-karas and elinor-fung authored Feb 14, 2020
1 parent 5553fdc commit a2902f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/design/features/assembly-conflict-resolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Since each layer (and other probing locations) can contain the same assembly by

#### Probe Ordering
The probing locations consists of:
1. Serving Location
1. Servicing Location
1. App directory
1. Framework directory(s) from higher to lower
1. Shared Store
Expand All @@ -36,13 +36,13 @@ The order in which each layer's deps.json is processed is:
1. ->If there's already a resolved entry with the same asset name, then check the assembly and file version of the new entry against the already resolved one. If the new entry is equal or lower, skip it. Otherwise remove the existing one and go to the "else" branch below
1. ->Else (new asset, or replaced with higher version) probe for the actual asset file
1. -->For each probing path except frameworks that are higher-level
1. --->If the probing path is a framework, then check its `.deps.json` to see if it contains the exact package (by name and version). If it is, then use that location and end probing for this entry.
1. --->If the probing path is a framework, then check its `.deps.json` to see if it contains the exact package (by name and version). If it does, then use that location and end probing for this entry.
1. --->If the probing path is not a framework, then use that location and end probing for this entry
1. Read the additional deps from `--additional-deps` and repeat steps 3-7
1. Read each framework's deps.json (higher to lower) and repeat steps 3-7
1. Pass the set of assemblies and their paths to the CLR

Note that for an app both it's `.deps.json` as well as probing path comes before the framework's so mostly it will win. Also because the app will likely reference an OOB package that the framework doesn't (because a framework, at least Microsoft.NETCore.App, has its own metapackage and does not reference OOB packages), the framework probing path never matches up in step 4 for the app's `.deps.json` package\assembly entry, so the "app wins".
Note that for an app both its `.deps.json` as well as probing path comes before the framework's `.deps.json`, so the app will usually win. Also because the app will likely reference an OOB package that the framework doesn't (because a framework, at least Microsoft.NETCore.App, has its own metapackage and does not reference OOB packages), the framework probing path never matches up in step 4 for the app's `.deps.json` package\assembly entry, so the "app wins".

The reason for only probing paths from equal or lower level framework in step 3 is that a given framework should never have a dependency on a higher-level framework, and is expected to find deps assets in its layer or lower. This is also required so that the given framework can find its asset, and replace the higher-level asset (see next paragraph).

Expand Down

0 comments on commit a2902f7

Please sign in to comment.