Repository navigation
Expand file tree
/
Copy pathBuild.ps1
More file actions
392 lines (347 loc) · 21.6 KB
/
Copy pathBuild.ps1
File metadata and controls
392 lines (347 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<#
.SYNOPSIS
Builds, validates and packages CanopyX with its ordinary correctness suites.
.DESCRIPTION
Benchmark measurements are excluded from the normal .NET and browser test routes.
Run the documented opt-in benchmark commands when performance evidence is requested.
.PARAMETER Configuration
Build configuration, Release by default.
.PARAMETER SkipTests
Leaves out the .NET correctness tests and the engine-independent API report and JavaScript package checks, for browser
shards whose platform runs them in another job.
.PARAMETER SkipExamples
Leaves out example generation and its browser checks.
.PARAMETER SkipBrowserTests
Generates examples without running browser checks.
.PARAMETER SkipPack
Leaves out package creation and package-consumer validation.
.PARAMETER DotNetCommandTimeoutSeconds
Maximum duration of each .NET build or validation command.
.PARAMETER BrowserTestTimeoutSeconds
Maximum duration of the complete browser correctness suite.
.PARAMETER PackageConsumerTimeoutSeconds
Maximum duration of package-consumer validation.
.EXAMPLE
./Build.ps1 -Configuration Release -SkipPack
.OUTPUTS
Build output, generated examples, validation reports and packages unless skipped.
#>
param(
[ValidateSet('Debug', 'Release')]
[string] $Configuration = 'Release',
[switch] $SkipTests,
[switch] $SkipExamples,
[switch] $SkipBrowserTests,
[switch] $SkipPack,
[ValidateRange(1, 86400)]
[int] $DotNetCommandTimeoutSeconds = 900,
[ValidateRange(1, 86400)]
[int] $BrowserTestTimeoutSeconds = 2400,
[ValidateRange(1, 3600)]
[int] $PackageConsumerTimeoutSeconds = 300
)
$ErrorActionPreference = 'Stop'
function Join-ProcessArguments {
param(
[Parameter(Mandatory = $true)] [string[]] $Arguments
)
$escaped = foreach ($argument in $Arguments) {
if ($argument -match '^[A-Za-z0-9_./:\\=-]+$') {
$argument
} else {
'"' + ($argument -replace '(\\*)"', '$1$1\"' -replace '(\\+)$', '$1$1') + '"'
}
}
$escaped -join ' '
}
function Invoke-ToolCommand {
param(
[Parameter(Mandatory = $true)] [string] $FileName,
[Parameter(Mandatory = $true)] [string[]] $Arguments,
[Parameter(Mandatory = $true)] [string] $Description,
[Parameter(Mandatory = $true)] [int] $TimeoutSeconds,
[string] $WorkingDirectory = (Get-Location).ProviderPath,
[switch] $PassThruOutput
)
$command = Get-Command $FileName -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
if (-not $command) {
throw "$Description requires '$FileName' to be available on PATH."
}
$startInfo = [System.Diagnostics.ProcessStartInfo]::new()
$startInfo.FileName = $command.Source
$startInfo.WorkingDirectory = $WorkingDirectory
$startInfo.UseShellExecute = $false
$startInfo.RedirectStandardOutput = [bool] $PassThruOutput
$startInfo.RedirectStandardError = [bool] $PassThruOutput
if ([Environment]::OSVersion.Platform -eq [PlatformID]::Win32NT -and [IO.Path]::GetExtension($command.Source) -in @(".cmd", ".bat")) {
# Batch launchers need cmd, while package-manager executable shims run directly.
$startInfo.FileName = Join-Path $env:SystemRoot "System32/cmd.exe"
$startInfo.Arguments = '/d /s /c "' + (Join-ProcessArguments -Arguments (@($command.Source) + $Arguments)) + '"'
} elseif ($null -ne $startInfo.ArgumentList) {
foreach ($argument in $Arguments) {
[void] $startInfo.ArgumentList.Add($argument)
}
} else {
$startInfo.Arguments = Join-ProcessArguments -Arguments $Arguments
}
$process = [System.Diagnostics.Process]::Start($startInfo)
$standardOutput = $null
$standardError = $null
if ($PassThruOutput) {
$standardOutput = $process.StandardOutput.ReadToEndAsync()
$standardError = $process.StandardError.ReadToEndAsync()
}
if (-not $process.WaitForExit($TimeoutSeconds * 1000)) {
try {
$process.Kill($true)
} catch {
$process.Kill()
}
throw "$Description timed out after $TimeoutSeconds second(s): $FileName $($Arguments -join ' ')"
}
if ($process.ExitCode -ne 0) {
if ($PassThruOutput) {
$tail = (($standardOutput.GetAwaiter().GetResult(), $standardError.GetAwaiter().GetResult()) -join [Environment]::NewLine).Trim()
if ($tail.Length -gt 0) {
throw "$Description failed with exit code $($process.ExitCode): $tail"
}
}
throw "$Description failed with exit code $($process.ExitCode)."
}
if ($PassThruOutput) {
return $standardOutput.GetAwaiter().GetResult().Trim()
}
}
function Assert-SourceLineBudget {
param(
[Parameter(Mandatory = $true)] [string] $Root,
[Parameter(Mandatory = $true)] [string[]] $ProjectFolders
)
# Source structure is a repository quality gate, not a product unit-test contract.
foreach ($folder in $ProjectFolders) {
$projectRoot = Join-Path $Root $folder
$sources = Get-ChildItem -Path $projectRoot -Recurse -File -Filter '*.cs' |
Where-Object { $_.FullName.Substring($projectRoot.Length) -notmatch '^[\\/](bin|obj)[\\/]' }
foreach ($source in $sources) {
if ([System.IO.File]::ReadAllLines($source.FullName).Length -gt 800) {
throw "C# source exceeds the 800-line budget: $($source.FullName.Substring($Root.Length + 1))"
}
}
}
}
function Invoke-PackageSmoke {
param(
[Parameter(Mandatory = $true)] [string] $Root,
[Parameter(Mandatory = $true)] [string] $PackageRoot,
[Parameter(Mandatory = $true)] [string] $Version,
[Parameter(Mandatory = $true)] [int] $TimeoutSeconds
)
# A clean console app restores CanopyX.Html from the fresh packages only, with its own package cache so a stale or
# published copy of the same version cannot hide a packing mistake.
$consumerRoot = Join-Path ([System.IO.Path]::GetTempPath()) "CanopyX-package-smoke-$([Guid]::NewGuid().ToString('N'))"
New-Item -ItemType Directory -Path $consumerRoot | Out-Null
try {
# The nugetconfig template writes a lowercase nuget.config with <clear/> and one nuget.org source named "nuget".
# Removing that source leaves the fresh local packages as the only feed.
$config = Join-Path $consumerRoot 'nuget.config'
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('new', 'console', '--framework', 'net10.0', '--output', $consumerRoot, '--name', 'CanopyXSmoke', '--no-restore') -Description 'Package smoke project creation' -TimeoutSeconds $TimeoutSeconds -PassThruOutput | Out-Null
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('new', 'nugetconfig', '--output', $consumerRoot) -Description 'Package smoke NuGet configuration' -TimeoutSeconds $TimeoutSeconds -PassThruOutput | Out-Null
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('nuget', 'remove', 'source', 'nuget', '--configfile', $config) -Description 'Package smoke feed isolation' -TimeoutSeconds $TimeoutSeconds -PassThruOutput | Out-Null
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('nuget', 'add', 'source', $PackageRoot, '--name', 'local-canopyx', '--configfile', $config) -Description 'Package smoke local feed' -TimeoutSeconds $TimeoutSeconds -PassThruOutput | Out-Null
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('nuget', 'config', 'set', 'globalPackagesFolder', (Join-Path $consumerRoot '.packages'), '--configfile', $config) -Description 'Package smoke package cache' -TimeoutSeconds $TimeoutSeconds -PassThruOutput | Out-Null
# RestorePackagesPath overrides an ambient NUGET_PACKAGES, which takes precedence over nuget.config.
$cachePath = [System.Security.SecurityElement]::Escape((Join-Path $consumerRoot '.packages'))
[System.IO.File]::WriteAllText((Join-Path $consumerRoot 'Directory.Build.props'), "<Project><PropertyGroup><RestorePackagesPath>$cachePath</RestorePackagesPath></PropertyGroup></Project>")
Copy-Item -LiteralPath (Join-Path $Root 'Build/PackageSmoke/Program.cs') -Destination (Join-Path $consumerRoot 'Program.cs') -Force
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('add', (Join-Path $consumerRoot 'CanopyXSmoke.csproj'), 'package', 'CanopyX.Html', '--version', $Version) -WorkingDirectory $consumerRoot -Description 'Package smoke dependency restore' -TimeoutSeconds $TimeoutSeconds -PassThruOutput | Out-Null
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('run', '--project', (Join-Path $consumerRoot 'CanopyXSmoke.csproj'), '-c', 'Release') -WorkingDirectory $consumerRoot -Description 'Package smoke run' -TimeoutSeconds $TimeoutSeconds
} finally {
Remove-Item -LiteralPath $consumerRoot -Recurse -Force -ErrorAction SilentlyContinue
}
}
function Assert-RuntimeLineBudget {
param([string] $Root)
foreach ($source in @('canopyx.source', 'canopyx.interactive.source', 'canopyx.grid.source', 'canopyx.reporting.source', 'canopyx.tree-tools.source', 'canopyx.data.source')) {
$parts = Join-Path $Root "CanopyX.Html/Assets/$source"
if (!(Test-Path -LiteralPath $parts)) { continue }
foreach ($part in Get-ChildItem -LiteralPath $parts -Filter '*.js' -File) {
if ([System.IO.File]::ReadAllLines($part.FullName).Length -gt 350) {
throw "Runtime source part exceeds the 350-line budget: $($part.Name)"
}
}
}
}
function Assert-PackageContents {
param(
[Parameter(Mandatory = $true)] [string] $PackagePath,
[Parameter(Mandatory = $true)] [string] $Assembly,
[Parameter(Mandatory = $true)] [string] $Version,
[Parameter(Mandatory = $true)] [AllowEmptyCollection()] [string[]] $DependencyIds,
[string[]] $Frameworks = @('net472', 'netstandard2.0', 'net10.0'),
[AllowEmptyCollection()] [string[]] $LegacyDependencyIds = @()
)
$frameworks = $Frameworks
Add-Type -AssemblyName System.IO.Compression.FileSystem
$archive = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
try {
$entries = @($archive.Entries | ForEach-Object { $_.FullName })
$required = @('README.md', "$Assembly.nuspec")
if ($Assembly -eq 'CanopyX.Html') {
$required += @('licenses/fonts/OFL-Archivo.txt', 'licenses/fonts/OFL-JetBrainsMono.txt', 'licenses/fonts/font-sources.json')
}
foreach ($framework in $frameworks) {
$required += "lib/$framework/$Assembly.dll"
$required += "lib/$framework/$Assembly.xml"
}
foreach ($entry in $required) {
if ($entries -notcontains $entry) {
throw "$Assembly package is missing $entry."
}
}
$assets = @($entries | ForEach-Object {
if ($_ -match '^lib/([^/]+)/') { $Matches[1] }
} | Sort-Object -Unique)
if (($assets -join ',') -ne (($frameworks | Sort-Object) -join ',')) {
throw "$Assembly package framework assets are '$($assets -join ',')', expected '$($frameworks -join ',')'."
}
$nuspecEntry = $archive.Entries | Where-Object { $_.FullName -eq "$Assembly.nuspec" } | Select-Object -First 1
$reader = [System.IO.StreamReader]::new($nuspecEntry.Open())
try {
[xml] $nuspec = $reader.ReadToEnd()
} finally {
$reader.Dispose()
}
# Every framework group must list exactly the expected CanopyX packages at the package's own version. Groups for
# .NET Framework and .NET Standard may add the listed polyfill packages, which modern targets get from the runtime.
$groups = @($nuspec.package.metadata.dependencies.group)
if ($groups.Count -ne $frameworks.Count) {
throw "$Assembly package has $($groups.Count) dependency groups, expected $($frameworks.Count)."
}
$expected = (@($DependencyIds | Sort-Object | ForEach-Object { "$_@$Version" }) -join ',')
foreach ($group in $groups) {
$dependencies = @($group.dependency | Where-Object { $_ })
$legacy = $group.targetFramework -match '^\.NET(Framework|Standard)'
$external = @($dependencies | Where-Object { $_.id -notlike 'CanopyX*' } | ForEach-Object { $_.id } | Sort-Object)
$expectedExternal = if ($legacy) { @($LegacyDependencyIds | Sort-Object) } else { @() }
if (($external -join ',') -ne ($expectedExternal -join ',')) {
throw "$Assembly package external dependencies for $($group.targetFramework) are '$($external -join ',')', expected '$($expectedExternal -join ',')'."
}
$declared = (@($dependencies | Where-Object { $_.id -like 'CanopyX*' } | Sort-Object id | ForEach-Object { "$($_.id)@$($_.version)" }) -join ',')
if ($declared -ne $expected) {
throw "$Assembly package dependencies for $($group.targetFramework) are '$declared', expected '$expected'."
}
}
} finally {
$archive.Dispose()
}
}
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
Push-Location $root
try {
$solution = Join-Path $root 'CanopyX.sln'
$packageProjects = @(
[ordered] @{ Id = 'CanopyX'; Project = (Join-Path $root 'CanopyX/CanopyX.csproj'); DependencyIds = @() },
[ordered] @{ Id = 'CanopyX.Html'; Project = (Join-Path $root 'CanopyX.Html/CanopyX.Html.csproj'); DependencyIds = @('CanopyX') },
[ordered] @{ Id = 'CanopyX.Data'; Project = (Join-Path $root 'CanopyX.Data/CanopyX.Data.csproj'); DependencyIds = @('CanopyX');
LegacyDependencyIds = @('Microsoft.Bcl.AsyncInterfaces', 'System.Text.Json') },
[ordered] @{ Id = 'CanopyX.AspNetCore'; Project = (Join-Path $root 'CanopyX.AspNetCore/CanopyX.AspNetCore.csproj'); DependencyIds = @('CanopyX.Data');
Frameworks = @('net10.0') }
)
Assert-SourceLineBudget -Root $root -ProjectFolders @('CanopyX', 'CanopyX.Html', 'CanopyX.Data', 'CanopyX.AspNetCore')
Assert-RuntimeLineBudget -Root $root
if (Get-Command node -CommandType Application -ErrorAction SilentlyContinue) {
Invoke-ToolCommand -FileName 'node' -Arguments @((Join-Path $root 'Build/Lint-DesignTokens.mjs')) -Description 'Design token lint' -TimeoutSeconds $DotNetCommandTimeoutSeconds
}
& (Join-Path $root 'Build/Sync-Assets.ps1') -Check
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('restore', $solution) -Description 'Solution restore' -TimeoutSeconds $DotNetCommandTimeoutSeconds
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('build', $solution, '-c', $Configuration, '--no-restore') -Description 'Solution build' -TimeoutSeconds $DotNetCommandTimeoutSeconds
if (-not $SkipTests) {
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('test', $solution, '-c', $Configuration, '--no-build', '--no-restore', '--filter', 'Category!=Benchmark') -Description 'Correctness tests' -TimeoutSeconds $DotNetCommandTimeoutSeconds
# The TypeScript API report needs only node, so it runs with or without the browser tests (docs/versioning.md).
if (Get-Command node -CommandType Application -ErrorAction SilentlyContinue) {
Invoke-ToolCommand -FileName 'node' -Arguments @((Join-Path $root 'tests/browser/tools/api-report.mjs')) -Description 'TypeScript API report check' -TimeoutSeconds $DotNetCommandTimeoutSeconds
}
}
if (-not $SkipExamples) {
$examplesOutput = Join-Path $root "CanopyX.Examples/bin/$Configuration/net10.0/output"
if (Test-Path $examplesOutput) {
Remove-Item -LiteralPath $examplesOutput -Recurse -Force
}
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('run', '--project', (Join-Path $root 'CanopyX.Examples/CanopyX.Examples.csproj'), '-c', $Configuration, '--no-build', '--', $examplesOutput) -Description 'Example generation' -TimeoutSeconds $DotNetCommandTimeoutSeconds
if (-not $SkipBrowserTests) {
# The browser tests open the generated examples; CI installs the browser before this step.
$browserRoot = Join-Path $root 'tests/browser'
# CI restores the packages in its own step; locally, restore whenever the lock file is newer than the install.
$installed = Join-Path $browserRoot 'node_modules/.package-lock.json'
if (-not $env:CI -and (-not (Test-Path $installed) -or (Get-Item (Join-Path $browserRoot 'package-lock.json')).LastWriteTimeUtc -gt (Get-Item $installed).LastWriteTimeUtc)) {
Invoke-ToolCommand -FileName 'npm' -Arguments @('ci', '--no-audit', '--no-fund') -WorkingDirectory $browserRoot -Description 'Browser test restore' -TimeoutSeconds $DotNetCommandTimeoutSeconds
}
$previousExamples = $env:CANOPYX_EXAMPLES
$previousBenchmarks = $env:CANOPYX_BENCHMARKS
$env:CANOPYX_EXAMPLES = $examplesOutput
$env:CANOPYX_BENCHMARKS = '0'
try {
if (-not $SkipTests) {
Invoke-ToolCommand -FileName 'npm' -Arguments @('run', 'test:distribution') -WorkingDirectory $browserRoot -Description 'JavaScript package consumer smoke' -TimeoutSeconds $DotNetCommandTimeoutSeconds
}
# A shard runs its deterministic share of the listed tests and records what ran (tests/browser/tools/shards.mjs).
$browserTests = if ($env:CANOPYX_TEST_SHARD) { @('tools/shards.mjs') } else { @('node_modules/@playwright/test/cli.js', 'test') }
$browserCommand = 'node'
$browserEngines = ([string] $env:CANOPYX_TEST_BROWSERS).Trim() -split '\s*,\s*'
if ($IsLinux -and -not $env:DISPLAY -and ($browserEngines -contains 'webkit' -or $browserEngines -contains 'all')) {
# WebKit's native select case needs headed GTK. The rest of the suite retains its default mode.
$browserCommand = 'xvfb-run'
$browserTests = @('-a', 'node') + $browserTests
}
Invoke-ToolCommand -FileName $browserCommand -Arguments $browserTests -WorkingDirectory $browserRoot -Description 'Browser tests' -TimeoutSeconds $BrowserTestTimeoutSeconds
# Chromium includes the real offline Office artifacts. Other engines/shards retain their browser contracts.
if (-not $env:CANOPYX_TEST_BROWSERS -or $env:CANOPYX_TEST_BROWSERS -eq 'all' -or ($env:CANOPYX_TEST_BROWSERS -split '\s*,\s*') -contains 'chromium') {
$exportResults = if ($env:CANOPYX_TEST_OUTPUT_DIR) {
if ([IO.Path]::IsPathRooted($env:CANOPYX_TEST_OUTPUT_DIR)) { $env:CANOPYX_TEST_OUTPUT_DIR }
else { Join-Path $browserRoot $env:CANOPYX_TEST_OUTPUT_DIR }
} else { Join-Path $browserRoot 'test-results' }
$hasOfficeArtifacts = Get-ChildItem -LiteralPath $exportResults -Filter '*.xlsx.json' -File -Recurse | Select-Object -First 1
if ($env:CANOPYX_TEST_SHARD -and -not $hasOfficeArtifacts) {
Write-Host 'Office artifacts belong to another browser shard; its build validates them.'
} else {
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('run', '--project', (Join-Path $root 'tests/exports/CanopyX.ExportValidation.csproj'), '-c', $Configuration, '--', $exportResults) -Description 'Independent Office artifact validation' -TimeoutSeconds $DotNetCommandTimeoutSeconds
}
}
} finally {
$env:CANOPYX_EXAMPLES = $previousExamples
$env:CANOPYX_BENCHMARKS = $previousBenchmarks
}
}
}
if (-not $SkipPack) {
$packageRoot = Join-Path $root "artifacts/packages/$Configuration"
if (Test-Path $packageRoot) {
Get-ChildItem $packageRoot -Include 'CanopyX*.nupkg', 'CanopyX*.snupkg' -Recurse | Remove-Item -Force
} else {
New-Item -ItemType Directory -Path $packageRoot | Out-Null
}
foreach ($packageProject in $packageProjects) {
Invoke-ToolCommand -FileName 'dotnet' -Arguments @('pack', $packageProject.Project, '-c', $Configuration, '--no-build', '--output', $packageRoot) -Description "$($packageProject.Id) package creation" -TimeoutSeconds $DotNetCommandTimeoutSeconds
$version = Invoke-ToolCommand -FileName 'dotnet' -Arguments @('msbuild', $packageProject.Project, '-nologo', '-getProperty:PackageVersion', "-p:Configuration=$Configuration") -Description "$($packageProject.Id) package version" -TimeoutSeconds $DotNetCommandTimeoutSeconds -PassThruOutput
if ([string]::IsNullOrWhiteSpace($version)) {
throw "Package version is missing for $($packageProject.Project)."
}
$package = Join-Path $packageRoot "$($packageProject.Id).$version.nupkg"
$symbols = Join-Path $packageRoot "$($packageProject.Id).$version.snupkg"
if (-not (Test-Path $package)) {
throw "Package was not created: $package"
}
if (-not (Test-Path $symbols)) {
throw "Symbol package was not created: $symbols"
}
$contents = @{ PackagePath = $package; Assembly = $packageProject.Id; Version = $version; DependencyIds = $packageProject.DependencyIds }
if ($packageProject.Frameworks) { $contents.Frameworks = $packageProject.Frameworks }
if ($packageProject.LegacyDependencyIds) { $contents.LegacyDependencyIds = $packageProject.LegacyDependencyIds }
Assert-PackageContents @contents
$packageProject.Version = $version
}
Invoke-PackageSmoke -Root $root -PackageRoot $packageRoot -Version $packageProjects[1].Version -TimeoutSeconds $PackageConsumerTimeoutSeconds
}
} finally {
Pop-Location
}