Files
servo/mach.ps1
Jonathan Schwender b5df4bc90a mach: use uv run --frozen (#42169)
This will avoid updating the lockfile during regular operations. Also
ignore the `servo.egg-info` directory, which
the new python requirement installation mechanism via setuptools
creates.
To update the lockfile one can run `uv lock`. This is also done
automatically, when syncing requirements from WPT.

This PR also updates the uv version in CI to a newer one. If you
encounter any issues with the lockfile after this PR, it might be
necessary to update your local instance of uv.

Testing: Build still works. [mach try
full](https://github.com/servo/servo/actions/runs/21624364040)

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-02-03 12:43:04 +00:00

26 lines
794 B
PowerShell

$workdir = $PSScriptRoot
$arguments = $args
$expanded = $false
if ($arguments.Count -gt 0) {
$expandedArgs = @()
foreach ($arg in $arguments) {
if ($arg -match '[\*\?\[\]]') {
$expandedItems = Get-Item -Path $arg -ErrorAction SilentlyContinue
if ($expandedItems) {
$expandedArgs += $expandedItems | Select-Object -ExpandProperty FullName
$expanded = $true
} else {
# Expansion fails. Use original arg.
$expandedArgs += $arg
}
} else {
$expandedArgs += $arg
}
}
$arguments = $expandedArgs
if ($expanded){
Write-Host "Expanded arguments: $arguments"
}
}
uv run --frozen python (Join-Path $workdir "mach") @arguments