Commit 83f862a
committed
Fix issue #65: Check source directories exist before writing to requirements
When using mxdev -n (no-fetch) or in offline mode, source directories may
not exist yet. Previously, mxdev would write references like '-e ./sources/package'
to requirements-mxdev.txt regardless, causing pip install to fail later.
This fix checks if source directories exist before writing them:
- If directory exists: Write normally (existing behavior)
- If directory doesn't exist: Write as comment with contextual warning
The warning message adapts based on context:
- In offline mode: Mentions offline mode and suggests removing -n and --offline flags
- Normal mode: Suggests removing -n flag to fetch sources
This fixes the mxmake two-stage installation workflow where mxdev -n runs
before sources are checked out.
Changes:
- Update write_dev_sources() to accept State parameter and check path existence
- Add contextual warning messages for missing directories
- Add tests for missing directories and offline mode warnings
- Update existing tests to pass State parameter
Fixes #651 parent 3154e36 commit 83f862a
File tree
4 files changed
+393
-194
lines changed- .claude
- src/mxdev
- tests
4 files changed
+393
-194
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
217 | 223 | | |
218 | 224 | | |
| 225 | + | |
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
222 | 233 | | |
223 | 234 | | |
224 | 235 | | |
225 | 236 | | |
226 | 237 | | |
227 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
228 | 259 | | |
229 | | - | |
230 | | - | |
231 | 260 | | |
232 | 261 | | |
233 | 262 | | |
| |||
292 | 321 | | |
293 | 322 | | |
294 | 323 | | |
295 | | - | |
| 324 | + | |
296 | 325 | | |
297 | 326 | | |
0 commit comments