Skip to content

Commit e2cccb4

Browse files
committed
Fix migration guide: run mxmake update first, then manual edits
Key improvement: reorder all migration steps to reflect that mxmake update automatically handles most changes (removing obsolete settings, adding new defaults, renaming settings). Manual edits only needed for customization. Updated all breaking change sections to follow pattern: 1. Run mxmake update (automatic changes) 2. Manual edits if needed (customization) This prevents users from manually editing settings that mxmake update would have handled automatically.
1 parent 751ac26 commit e2cccb4

File tree

1 file changed

+46
-47
lines changed

1 file changed

+46
-47
lines changed

docs/source/migration.md

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ This guide documents breaking changes between mxmake versions and how to migrate
1313
**Breaking Change**: Minimum Python version increased from 3.9 to 3.10.
1414

1515
**Migration**:
16-
- Ensure your system has Python 3.10 or later installed
17-
- If using UV, specify Python 3.10+ in `UV_PYTHON` setting:
18-
```makefile
19-
UV_PYTHON?=3.10 # or 3.11, 3.12, 3.13, 3.14
20-
```
21-
- If using pip, ensure `PRIMARY_PYTHON` points to Python 3.10+:
22-
```makefile
23-
PRIMARY_PYTHON?=python3.10
24-
```
25-
- Run `mxmake update` to regenerate Makefile with new `PYTHON_MIN_VERSION` default
16+
1. Ensure your system has Python 3.10 or later installed
17+
2. Run `mxmake update` to regenerate Makefile (automatically updates `PYTHON_MIN_VERSION` to 3.10)
18+
3. If needed, customize Python version settings:
19+
- **Using UV**: Set `UV_PYTHON` to desired version:
20+
```makefile
21+
UV_PYTHON?=3.10 # or 3.11, 3.12, 3.13, 3.14
22+
```
23+
- **Using pip**: Ensure `PRIMARY_PYTHON` points to Python 3.10+:
24+
```makefile
25+
PRIMARY_PYTHON?=python3.10
26+
```
2627

2728
### Removed: MXENV_UV_GLOBAL Setting
2829

@@ -41,11 +42,13 @@ UV_PYTHON?=3.14 # Optional: specify Python version
4142
```
4243
4344
**Migration**:
44-
- Remove `MXENV_UV_GLOBAL` from your Makefile or preseed configurations
45-
- UV will be automatically detected if installed globally
46-
- To force local UV installation, ensure UV is not in your PATH
47-
- Add `UV_PYTHON` setting if you need a specific Python version
48-
- Run `mxmake update` to apply changes
45+
1. Run `mxmake update` (automatically removes `MXENV_UV_GLOBAL` setting)
46+
2. UV will be automatically detected if installed globally
47+
3. If needed, add `UV_PYTHON` setting to specify Python version:
48+
```makefile
49+
UV_PYTHON?=3.14
50+
```
51+
4. To force local UV installation, ensure UV is not in your PATH before running `make install`
4952
5053
### Changed: SOURCES_TARGET Implementation
5154
@@ -54,9 +57,8 @@ UV_PYTHON?=3.14 # Optional: specify Python version
5457
**Impact**: This affects projects using mxdev with source checkouts. The `-o` flag had a bug (fixed in mxdev 5.0).
5558
5659
**Migration**:
57-
- Update mxdev to version 5.0 or later: `pip install -U mxdev>=5`
58-
- Run `mxmake update` in your project directory to regenerate the Makefile
59-
- The new Makefile will use the correct `-f` flag
60+
1. Update mxdev to version 5.0 or later: `pip install -U mxdev>=5`
61+
2. Run `mxmake update` (automatically regenerates Makefile with correct `-f` flag)
6062
6163
### Added: UV_PYTHON Setting
6264
@@ -128,9 +130,9 @@ topics:
128130
```
129131
130132
**Migration**:
131-
- Update your preseed files to use `nodejs` instead of `npm`
132-
- Run `mxmake update` or `mxmake init` to regenerate Makefile
133-
- The domain now supports both npm and pnpm package managers
133+
1. Run `mxmake update` (automatically uses new `nodejs` domain name)
134+
2. If using preseed files, update them to use `nodejs` instead of `npm`
135+
3. The domain now supports both npm and pnpm package managers
134136
135137
## Version 1.0a6 (2024-08-02)
136138
@@ -139,11 +141,8 @@ topics:
139141
**Breaking Change**: Minimum Python version increased from 3.8 to 3.9.
140142
141143
**Migration**:
142-
- Ensure your project uses Python 3.9 or later
143-
- Update `PYTHON_MIN_VERSION` if you've customized it:
144-
```makefile
145-
PYTHON_MIN_VERSION?=3.9
146-
```
144+
1. Ensure your project uses Python 3.9 or later
145+
2. Run `mxmake update` (automatically updates `PYTHON_MIN_VERSION` to 3.9)
147146
148147
**Note**: This change was superseded by version 2.0.0 which requires Python 3.10+.
149148
@@ -168,17 +167,18 @@ VENV_FOLDER?=.venv
168167
```
169168
170169
**Migration**:
171-
- **Option 1** (Use new default): Delete old `venv` folder, run `make install` to create `.venv`
172-
- **Option 2** (Keep old folder): Explicitly set `VENV_FOLDER=venv` in your Makefile
173-
174-
**Update .gitignore**:
175-
```gitignore
176-
# Old
177-
venv/
178-
179-
# New
180-
.venv/
181-
```
170+
1. Run `mxmake update` (automatically updates default to `.venv`)
171+
2. Choose one option:
172+
- **Option A** (Use new default): Delete old `venv` folder, run `make install` to create `.venv`
173+
- **Option B** (Keep old folder): Edit Makefile to set `VENV_FOLDER=venv`
174+
3. Update `.gitignore`:
175+
```gitignore
176+
# Old
177+
venv/
178+
179+
# New
180+
.venv/
181+
```
182182
183183
### Renamed: PYTHON_BIN to PRIMARY_PYTHON
184184
@@ -195,8 +195,8 @@ PRIMARY_PYTHON?=python3
195195
```
196196
197197
**Migration**:
198-
- Run `mxmake update` to regenerate Makefile with new setting name
199-
- If you have custom scripts referencing `PYTHON_BIN`, update them to use `PRIMARY_PYTHON`
198+
1. Run `mxmake update` (automatically renames `PYTHON_BIN` to `PRIMARY_PYTHON`)
199+
2. If you have custom scripts referencing `PYTHON_BIN`, update them to use `PRIMARY_PYTHON`
200200
201201
### Removed: MXENV_PATH
202202
@@ -215,12 +215,11 @@ $(MXENV_PYTHON) -m pytest tests/
215215
```
216216
217217
**Migration**:
218-
- Search your custom Makefile targets for `MXENV_PATH`
219-
- Replace with `$(MXENV_PYTHON) -m <command>`
220-
- Common replacements:
221-
- `$(MXENV_PATH)pip``$(MXENV_PYTHON) -m pip`
222-
- `$(MXENV_PATH)pytest``$(MXENV_PYTHON) -m pytest`
223-
- `$(MXENV_PATH)black``$(MXENV_PYTHON) -m black`
218+
1. Run `mxmake update` (automatically removes `MXENV_PATH`)
219+
2. If you have custom Makefile targets using `MXENV_PATH`, update them manually:
220+
- `$(MXENV_PATH)pip` → `$(MXENV_PYTHON) -m pip`
221+
- `$(MXENV_PATH)pytest` → `$(MXENV_PYTHON) -m pytest`
222+
- `$(MXENV_PATH)black` → `$(MXENV_PYTHON) -m black`
224223
225224
## Version 1.0a3 (2024-02-06)
226225
@@ -267,8 +266,8 @@ $(MXENV_PYTHON) -m pytest tests/
267266
| `docs` | `sphinx` |
268267
269268
**Migration**:
270-
- Run `mxmake init` to regenerate Makefile with new domain names
271-
- Update preseed files if using old domain names
269+
1. Run `mxmake update` (automatically uses new domain names)
270+
2. If using preseed files with old domain names, update them to use new names
272271
273272
## Version 0.1 (2022-05-19)
274273

0 commit comments

Comments
 (0)