You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`-DisableTagSorting`: Disable intelligent tag temporal sorting, requiring manual temporal ordering (default: tag sorting enabled)
100
+
-`-DisableTagSorting`: Disable fetching tag dates from repositories and intelligent tag temporal sorting, requiring manual temporal tag ordering in the dependencies input files (default: tag sorting enabled)
101
101
102
102
### Configuration Files
103
103
@@ -123,7 +123,7 @@ Contains repository configurations without any credential information:
123
123
-**Base Path** (required): Local directory path (relative or absolute)
124
124
-**Tag** (required): Git tag to checkout
125
125
-**API Compatible Tags** (optional): List of API-compatible tags
126
-
-**API Compatibility** (optional): "Strict" or "Permissive" (defaults to script parameter)
126
+
-**API Compatibility** (optional): "Strict" or "Permissive" (defaults to script parameter when absent)
127
127
-**Skip LFS** (optional): Skip Git LFS downloads for this repository and all submodules
128
128
129
129
#### git_credentials.json
@@ -180,11 +180,11 @@ git_credentials.json:
180
180
}
181
181
```
182
182
183
-
## Advanced Usage (Recursive Mode)
183
+
## Recursive Mode
184
184
185
185
### Overview
186
186
187
-
**Recursive mode is enabled by default**starting with v4.2.0. The script automatically discovers and processes nested dependencies. After checking out each repository, it looks for a dependencies.json file within that repository and processes it recursively, with intelligent handling of shared dependencies.
187
+
**When Recursive Mode is enabled (Default)**the script automatically discovers and processes nested dependencies. After checking out each repository, it looks for a dependency file with the same name as the input file within that repository and processes it recursively, with intelligent handling of shared dependencies.
188
188
189
189
### Controlling Recursive Mode
190
190
@@ -205,9 +205,73 @@ git_credentials.json:
205
205
.\LsiGitCheckout.ps1 -DisableTagSorting
206
206
```
207
207
208
-
### API Compatible Tags - Critical Concept
208
+
### Recursion and Discovering Common Dependencies
209
209
210
-
The **"API Compatible Tags"** field is fundamental to recursive dependency resolution. It defines the set of tags that are API-compatible with the current "Tag" version, enabling intelligent version resolution when multiple projects depend on the same repository.
210
+
When recursive mode processes nested dependencies, a common scenario emerges: **the same repository is required by multiple projects with potentially different version requirements**. This creates the fundamental challenge that the script's API compatibility system is designed to solve.
211
+
212
+
#### The Challenge: Conflicting Dependency Requirements
213
+
214
+
Consider this scenario:
215
+
216
+
1.**ProjectA** requires `LibraryX` at version `v2.1.0`
217
+
2.**ProjectB** also requires `LibraryX` but at version `v2.0.5`
218
+
3. Both projects expect to work with `LibraryX`, but they're requesting different versions
219
+
220
+
When the script encounters `LibraryX` for the second time, it faces a critical decision: **which version should be checked out to satisfy both callers?**
221
+
222
+
#### Practical Example
223
+
224
+
```
225
+
Main Project Dependencies:
226
+
├── ProjectA (requires LibraryX v2.1.0)
227
+
└── ProjectB (requires LibraryX v2.0.5)
228
+
```
229
+
230
+
When processing recursively:
231
+
1.**Round 1**: Processes main dependencies → clones ProjectA and ProjectB
232
+
2.**Round 2**:
233
+
- Processes ProjectA's dependencies → clones LibraryX at v2.1.0
- How do we ensure both ProjectA and ProjectB continue to work?
240
+
241
+
#### The API Compatibility Problem
242
+
243
+
The core issue is that **the first caller (ProjectA) might be using APIs that are incompatible with those expected by the newly discovered caller (ProjectB)**. Simply keeping the first version could break ProjectB, while switching to the second version could break ProjectA.
244
+
245
+
#### Solution: API Compatible Tags
246
+
247
+
To solve this, the script introduces the concept of **"API Compatible Tags"**. Together with the main **"Tag"**, these define the complete set of versions that a caller declares as compatible with their usage:
This declaration means: *"I'm using LibraryX v2.1.0, but I know my code works with any version from v2.0.0 through v2.0.5"*.
259
+
260
+
#### The API Compatibility Algorithm
261
+
262
+
When a repository conflict is detected, the script executes a compatibility algorithm that:
263
+
264
+
1.**Assesses Compatibility**: Checks if the union of ("Tag" + "API Compatible Tags") from the first caller overlaps with the same set from the new caller. If there's no overlap, the dependencies are incompatible and the script reports an error.
265
+
266
+
2.**Chooses the Optimal Version**: If the callers are not pointing to the same tag, the script determines which version to checkout based on the "API Compatibility" modes declared by both callers (Strict vs Permissive) and whether intelligent tag sorting is enabled.
267
+
268
+
3.**Updates Repository State**: Once the algorithm completes, it stores the resolved "API Compatibility" mode, "Tag", and "API Compatible Tags" that will apply to the checked-out repository. These resolved values will be used if the same repository becomes a dependency of future callers during continued recursive processing.
269
+
270
+
The specific rules for version selection and state resolution depend on the compatibility modes declared by the callers and the tag sorting configuration, which are detailed in the following sections.
271
+
272
+
### API Compatibility - Critical Concepts
273
+
274
+
The **"API Compatible Tags"** field is the foundation of the recursive dependency resolution system described above. This field, combined with the "Tag", enables intelligent version resolution when multiple projects depend on the same repository with different version requirements.
211
275
212
276
#### Tag Management Approaches
213
277
@@ -279,46 +343,6 @@ When updating dependencies, you must maintain manual ordering:
279
343
}
280
344
```
281
345
282
-
**Important: Permissive Mode Requirements with `-DisableTagSorting` Set**
283
-
284
-
When `-DisableTagSorting` is set and both repositories have Permissive API compatibility mode, the union algorithm requires:
285
-
286
-
1.**Temporal ordering**: Both "API Compatible Tags" lists must be ordered oldest to newest
287
-
2.**Common starting tag**: Both lists must start with the same tag
288
-
3.**Subset relationship**: All tags from one list must be contained in the other (one list should be a subset of the other)
289
-
290
-
If these conditions are not met, the script will issue warnings and fall back to an unordered union, which may not produce optimal results.
"API Compatible Tags": ["v1.1.0", "v1.1.1", "v1.1.2"] // Different starting tag
474
+
}
475
+
```
476
+
413
477
## Tag Temporal Sorting
414
478
415
-
**Available since Version 4.2.0**: Intelligent automatic tag temporal sorting using actual git tag dates eliminates the need for manual temporal ordering of API Compatible Tags and provides intelligent conflict resolution.
479
+
Intelligent automatic tag temporal sorting using actual git tag dates eliminates the need for manual temporal ordering of API Compatible Tags and provides intelligent conflict resolution.
416
480
417
481
### Overview
418
482
@@ -433,7 +497,7 @@ When `-EnableTagSorting` is enabled, the script:
433
497
434
498
### Enabling Tag Temporal Sorting
435
499
436
-
**Tag temporal sorting is enabled by default** starting with v5.0.0. To customize or disable:
500
+
**Tag temporal sorting is enabled by default**. To customize or disable:
0 commit comments