You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you cd into a project directory that contains a dependency file (e.g. `deps.yaml`, `dependencies.yaml`, `pkgx.yml`, `launchpad.yml`, `package.json`, `pyproject.toml`), Launchpad computes:
579
+
580
+
- A project hash based on the physical path
581
+
- A dependency fingerprint based on the content of the dependency file (md5)
This guarantees that editing dependency versions switches to a distinct environment on the next `cd`, ensuring the correct tools are active immediately.
590
+
591
+
To inspect selection and cache behavior, enable verbose logging:
Copy file name to clipboardExpand all lines: docs/faq.md
+46-7Lines changed: 46 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,14 +86,15 @@ Currently, Launchpad is distributed via npm/bun/yarn/pnpm. However, after global
86
86
87
87
### How do environment activations work?
88
88
89
-
When you enter a directory with a `dependencies.yaml` file:
89
+
When you enter a directory with a dependency file (e.g. `deps.yaml`, `dependencies.yaml`, `pkgx.yml`, `launchpad.yml`, `package.json`, `pyproject.toml`):
90
90
91
-
1.**Launchpad generates a hash** based on the project path
92
-
2.**Creates an isolated environment** at `~/.local/share/launchpad/envs/{hash}/`
93
-
3.**Installs project packages** to the isolated environment
94
-
4.**Modifies PATH** to prioritize project binaries
95
-
5.**Sets environment variables** from the dependency file
96
-
6.**Shows activation message** (customizable)
91
+
1. Launchpad generates a hash based on the project path
92
+
2. Launchpad computes a dependency fingerprint (md5 of the dependency file content)
93
+
3. It creates/selects an environment at `~/.local/share/launchpad/envs/<project>_<hash>-d<dep_hash>`
94
+
4. Installs project packages into that isolated environment (if needed)
95
+
5. Modifies PATH to prioritize project binaries
96
+
6. Sets environment variables from the dependency file
97
+
7. Shows an activation message (customizable)
97
98
98
99
When you leave the directory, everything is automatically restored.
99
100
@@ -116,6 +117,44 @@ cat dependencies.yaml
116
117
launchpad dev:dump --dryrun
117
118
```
118
119
120
+
### Why didn't my tool version switch after I changed deps.yaml?
121
+
122
+
When you cd into a project, Launchpad now derives the environment directory from:
123
+
124
+
- a hash of the project path, and
125
+
- a dependency fingerprint (md5 of the dependency file content),
Changing versions in `deps.yaml` (or `dependencies.yml`, `pkgx.yml`, `launchpad.yml`, `package.json`, `pyproject.toml`, etc.) changes the fingerprint, so a new env dir is selected and the correct versions are installed/activated automatically.
134
+
135
+
To see this live, enable verbose logging and cd into the project:
136
+
137
+
```bash
138
+
export LAUNCHPAD_VERBOSE=true
139
+
cd my-project
140
+
```
141
+
142
+
You’ll see a line like:
143
+
144
+
```
145
+
🔍 Env target: env_dir=… dep_file=… dep_hash=…
146
+
```
147
+
148
+
If the env didn’t change, confirm the `dep_file` is the one you edited and that `dep_hash` differs from the previous run. You can also inspect cache decisions:
0 commit comments