Skip to content

Commit fb1dc94

Browse files
fully disable caching (#391)
* fully disable caching * completely removed cache * remove caching docs and integration specs
1 parent dfdd2c7 commit fb1dc94

21 files changed

+57
-1195
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ These files can be used in build scripts, CI/CD pipelines, or other automation t
192192
--parallel Optional. (Default: false) Execute commands in parallel.
193193
194194
--fail-on-no-projects Optional. (Default: false) Fail if no projects are affected.
195-
196-
--no-cache Optional. (Default: false) Ignore any existing cache file
197-
and perform a full Roslyn analysis.
198195
199196
-c, --config Optional. Path to the configuration file. Defaults to
200197
.incrementalist/incrementalist.json in the current directory.
@@ -252,7 +249,6 @@ incrementalist -b dev --target-glob "src/**/*.csproj" --skip-glob "**/*.Tests.cs
252249

253250
- 🔍 [How It Works](docs/how-it-works.md) - Technical details and architecture
254251
- 🏗️ [Building from Source](docs/building.md) - Build instructions and development setup
255-
-[Dependency Graph Caching](docs/caching.md) - Cache system explanation and best practices
256252
- ⚙️ [Configuration Files](docs/config.md) - Using JSON configuration files
257253

258254
## 📜 License

docs/caching.md

Lines changed: 0 additions & 117 deletions
This file was deleted.

scripts/integration-tests.ps1

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ function Test-FoldersOnly {
353353

354354
$folderTestOutput = Join-Path $TestResultsDir "incrementalist-affected-folders.txt"
355355
Invoke-IncrementalistTest -TestName "Folders-only check (no cache)" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
356-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-l", "--no-cache", "-f" , $folderTestOutput)
356+
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-l", "-f" , $folderTestOutput)
357357
}
358358
}
359359

@@ -362,58 +362,34 @@ function Test-SolutionCheck {
362362

363363
$solutionTestOutput = Join-Path $TestResultsDir "incrementalist-affected-files.txt"
364364
Invoke-IncrementalistTest -TestName "Solution check (no cache)" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
365-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--no-cache", "-f", $solutionTestOutput)
365+
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-f", $solutionTestOutput)
366366
}
367367
}
368368

369369
function Test-CommandExecution {
370370
param($ProjectPath, $Configuration)
371371

372372
Invoke-IncrementalistTest -TestName "Command execution (no cache)" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
373-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-r", "--no-cache", "--", "build", "-c", "Release", "--nologo")
373+
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-r", "--", "build", "-c", "Release", "--nologo")
374374
}
375375
}
376376

377377
function Test-ParallelExecution {
378378
param($ProjectPath, $Configuration)
379379

380380
Invoke-IncrementalistTest -TestName "Parallel execution (no cache)" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
381-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-r", "--parallel", "--no-cache", "--", "build", "-c", "Release", "--nologo")
381+
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-r", "--parallel", "--", "build", "-c", "Release", "--nologo")
382382
}
383383
}
384384

385385
function Test-ErrorHandling {
386386
param($ProjectPath, $Configuration)
387387

388388
Invoke-IncrementalistTest -TestName "Error handling (no cache)" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
389-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-r", "--fail-on-no-projects", "--no-cache", "--", "invalid-command")
389+
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-r", "--fail-on-no-projects", "--", "invalid-command")
390390
} -ExpectFailure $true
391391
}
392392

393-
function Test-CacheCreation {
394-
param($ProjectPath, $Configuration, $TestResultsDir)
395-
396-
$solutionPath = Join-Path $PSScriptRoot "..\Incrementalist.sln"
397-
Remove-IncrementalistCache -SolutionPath $solutionPath
398-
399-
$cacheTestOutput = Join-Path $TestResultsDir "incrementalist-cache-creation.txt"
400-
Invoke-IncrementalistTest -TestName "Cache creation" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
401-
# Run without --no-cache to create the cache
402-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--no-cache", "-f", $cacheTestOutput)
403-
}
404-
}
405-
406-
function Test-CacheReuse {
407-
param($ProjectPath, $Configuration, $TestResultsDir)
408-
409-
$cacheTestOutput = Join-Path $TestResultsDir "incrementalist-cache-reuse.txt"
410-
Invoke-IncrementalistTest -TestName "Cache reuse" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
411-
# Run again without --no-cache to reuse the existing cache
412-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--no-cache", "-f", $cacheTestOutput)
413-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-f", $cacheTestOutput)
414-
}
415-
}
416-
417393
function Test-ComplexCommandArguments {
418394
param($ProjectPath, $Configuration)
419395

@@ -428,7 +404,6 @@ function Test-ComplexCommandArguments {
428404
$incrementalistArgs = @(
429405
"-b", "dev",
430406
"-r",
431-
"--no-cache",
432407
"--", # Separator for dotnet command arguments
433408
"test",
434409
"--logger", "console;verbosity=detailed",
@@ -459,7 +434,7 @@ function Test-SimilarDotnetArguments {
459434
}
460435

461436
Invoke-IncrementalistTest -TestName "Similar Incrementalist and dotnet Arguments" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
462-
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-c", "-r", "--no-cache")
437+
Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-c", "-r")
463438
}
464439

465440
# Cleanup
@@ -477,7 +452,7 @@ function Test-GlobTargeting {
477452
Invoke-IncrementalistTest -TestName "Glob targeting" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
478453
# First, run a baseline to check if any changes are detected
479454
Write-Host "Running baseline to check for changes..."
480-
$exitCodeBaseline = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--no-cache", "-f", $baselineOutput)
455+
$exitCodeBaseline = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-f", $baselineOutput)
481456
if ($exitCodeBaseline -ne 0) { throw "Incrementalist baseline command failed with exit code $exitCodeBaseline" }
482457

483458
$baselineProjects = @(Get-Content $baselineOutput -ErrorAction SilentlyContinue)
@@ -510,8 +485,8 @@ function Test-GlobTargeting {
510485
}
511486

512487
# Run Incrementalist with target glob
513-
#dotnet run --project $ProjectPath -c $Configuration --no-build -- -b dev --target-glob "**/Incrementalist.csproj" --no-cache -f $targetGlobOutput
514-
$exitCodeTarget = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--target-glob", "**/Incrementalist.csproj", "--no-cache", "-f", $targetGlobOutput)
488+
#dotnet run --project $ProjectPath -c $Configuration --no-build -- -b dev --target-glob "**/Incrementalist.csproj" -f $targetGlobOutput
489+
$exitCodeTarget = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--target-glob", "**/Incrementalist.csproj", "-f", $targetGlobOutput)
515490
if ($exitCodeTarget -ne 0) { throw "Incrementalist command failed with exit code $exitCodeTarget" }
516491

517492
# Verification logic
@@ -537,7 +512,7 @@ function Test-GlobSkipping {
537512
Invoke-IncrementalistTest -TestName "Glob skipping" -ProjectPath $ProjectPath -Configuration $Configuration -TestScript {
538513
# 1. Run without skip to get baseline affected projects
539514
Write-Host "Running baseline to determine affected projects..."
540-
$exitCodeBaseline = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--no-cache", "-f", $baselineOutput)
515+
$exitCodeBaseline = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "-f", $baselineOutput)
541516
if ($exitCodeBaseline -ne 0) { throw "Incrementalist command (baseline) failed with exit code $exitCodeBaseline" }
542517

543518
$baselineProjects = @(Get-Content $baselineOutput -ErrorAction SilentlyContinue | ForEach-Object { (Resolve-Path $_).Path }) | Sort-Object
@@ -574,7 +549,7 @@ function Test-GlobSkipping {
574549

575550
# 2. Run with skip glob
576551
Write-Host "Running with skip glob..."
577-
$exitCodeSkip = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--skip-glob", "**/*.Tests.csproj", "--no-cache", "-f", $skipGlobOutput)
552+
$exitCodeSkip = Run-Incrementalist -ProjectPath $ProjectPath -Configuration $Configuration -IncrementalistArgs @("-b", "dev", "--skip-glob", "**/*.Tests.csproj", "-f", $skipGlobOutput)
578553
if ($exitCodeSkip -ne 0) { throw "Incrementalist command (skip glob) failed with exit code $exitCodeSkip" }
579554
$skippedProjects = (Get-Content $skipGlobOutput -ErrorAction SilentlyContinue | ForEach-Object { (Resolve-Path $_).Path }) | Sort-Object
580555
Write-Host "Skipped projects count: $($skippedProjects.Count)"
@@ -728,10 +703,6 @@ foreach ($project in $incrementalistProjects) {
728703
Test-ComplexCommandArguments -ProjectPath $project.FullName -Configuration $Configuration
729704
Test-SimilarDotnetArguments -ProjectPath $project.FullName -Configuration $Configuration
730705

731-
# Run cache-specific tests
732-
Test-CacheCreation -ProjectPath $project.FullName -Configuration $Configuration -TestResultsDir $testResultsDir
733-
Test-CacheReuse -ProjectPath $project.FullName -Configuration $Configuration -TestResultsDir $testResultsDir
734-
735706
# Run glob tests
736707
Test-GlobTargeting -ProjectPath $project.FullName -Configuration $Configuration -TestResultsDir $testResultsDir
737708
Test-GlobSkipping -ProjectPath $project.FullName -Configuration $Configuration -TestResultsDir $testResultsDir

src/Incrementalist.Cmd/Commands/CreateConfigFileTask.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using System.Text.Json;
1111
using System.Text.Json.Serialization;
1212
using System.Threading.Tasks;
13-
using Incrementalist.Caching;
1413
using Incrementalist.Cmd.Config;
1514
using Microsoft.Extensions.Logging;
1615

@@ -51,7 +50,6 @@ public async Task<int> Run()
5150
ContinueOnError = _options.ContinueOnError,
5251
RunInParallel = _options.RunInParallel,
5352
FailOnNoProjects = _options.FailOnNoProjects,
54-
NoCache = _options.NoCache,
5553
SkipGlob = _options.SkipGlobs?.ToArray(),
5654
TargetGlob = _options.TargetGlobs?.ToArray(),
5755
};

0 commit comments

Comments
 (0)