Skip to content

Commit 85a248d

Browse files
authored
Separate lock target from install (microsoft#284)
To avoid updating the lock, and dependencies, when you're just trying to install.
1 parent 5bb7b2a commit 85a248d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tools/makefiles/python.mk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ else
1010
venv_dir = .venv
1111
endif
1212

13-
UV_SYNC_ARGS ?= --all-extras
14-
UV_RUN_ARGS ?= --all-extras --locked
13+
UV_SYNC_INSTALL_ARGS ?= --all-extras --frozen
14+
UV_SYNC_LOCK_ARGS ?= --all-extras
15+
UV_RUN_ARGS ?= --all-extras --frozen
1516

1617
PYTEST_ARGS ?= --color=yes
1718

1819
## Rules
1920

2021
.PHONY: install
2122
install:
22-
uv sync $(uv_project_args) $(UV_SYNC_ARGS)
23+
uv sync $(uv_project_args) $(UV_SYNC_INSTALL_ARGS)
2324

2425
.PHONY: lock
2526
lock:
26-
uv lock $(uv_project_args) $(UV_LOCK_ARGS)
27+
uv sync $(uv_project_args) $(UV_SYNC_LOCK_ARGS)
2728

2829
.PHONY: clean
2930
clean:

tools/makefiles/recursive.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ifndef IS_RECURSIVE_MAKE
1414
# make with VERBOSE=1 to print all outputs of recursive makes
1515
VERBOSE ?= 0
1616

17-
RECURSIVE_TARGETS = clean install test format lint type-check
17+
RECURSIVE_TARGETS = clean install test format lint type-check lock
1818

1919
# You can pass in a list of files or directories to retain when running `clean/git-clean`
2020
# ex: make clean GIT_CLEAN_RETAIN=".env .data"

0 commit comments

Comments
 (0)