Skip to content

Commit 18a4b12

Browse files
gselzerclaude
andcommitted
README: describe environments prebuilt for completion
Completion no longer installs a script's missing dependencies into an overlay (since cd073e6): it builds the script's environment in the background, once its declaration has settled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 71e1a3b commit 18a4b12

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎README.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,18 @@ parameters declared. One server runs per script environment; servers
168168
unused for 10 minutes stop. Their error output goes to
169169
`code-lsp-ty-server.log`, next to Appose's environments.
170170

171-
Once a script's environment is built, by running the script (in this session
172-
or an earlier one), the server analyzes the script against it, so that the packages
173-
installed there are known too. Packages the script declares (in its
174-
`# /// script` block) but its environment lacks, e.g. a dependency you just
175-
added, are installed for completion only, into a separate directory, a moment
176-
after you stop editing the dependencies; so they are known before you run the
177-
script. This
178-
covers PyPI packages; conda packages (`[tool.pixi.dependencies]`)
179-
and environments declared in files are known once the script has run.
180-
Completion never builds a script's environment itself, and never disturbs
181-
its worker. Script parameters are known by the Python types they have at run
182-
time, e.g. images as NumPy arrays.
171+
Once a script's environment is built (in this session or an earlier one),
172+
the server analyzes the script against it, so that the packages installed
173+
there are known too. An environment not built yet, e.g. because you just
174+
added a dependency, is built in the background once the script's environment
175+
declaration has stayed the same for a few seconds; so its packages are known
176+
before you run the script, and the next run need not build it. This covers
177+
every kind of declaration: PyPI and conda packages, and environment files.
178+
A script running in the environment is waited for first, so an environment
179+
is never rebuilt beneath a running script; building replaces the
180+
environment's worker, as the script's next run would. Script parameters are
181+
known by the Python types they have at run time, e.g. images as NumPy
182+
arrays.
183183

184184
Typing never waits for the server: if its answer for a word is not ready
185185
within a moment (the first answer for a package can take a few seconds), it

0 commit comments

Comments
 (0)