Skip to content

Commit b90d1b7

Browse files
committed
Rework compat features into breaking changes
This reverses polarity and makes things easier to explain
1 parent 5771312 commit b90d1b7

File tree

10 files changed

+871
-357
lines changed

10 files changed

+871
-357
lines changed

deprecations_to_md.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@
66
[path_to_dml, header, outfile] = sys.argv[1:]
77
sys.path.append(path_to_dml)
88

9-
from dml import breaking_changes as compat
9+
from dml import breaking_changes
1010
from dml.env import api_versions, default_api_version
1111

1212
by_version = {}
13-
for feature in compat.features.values():
14-
if (feature.last_api_version.str in api_versions()
13+
for feature in breaking_changes.changes.values():
14+
if (feature.required_after.str in api_versions()
1515
# don't document features that are unconditionally disabled in
1616
# this Simics version
17-
or feature.last_api_version > compat.apis[default_api_version()]):
18-
by_version.setdefault(feature.last_api_version, []).append(feature)
17+
or feature.required_after > breaking_changes.apis[default_api_version()]):
18+
by_version.setdefault(feature.required_after, []).append(feature)
1919

2020
with open(outfile, 'w') as f:
2121
f.write(Path(header).read_text())
2222
for (ver, features) in sorted(by_version.items()):
2323
f.write(fr"""
24-
### Features available up to and including -\-simics-api={ver.str}
25-
These features correspond to functionality removed when compiling using
24+
### Changes for migrating from -\-simics-api={ver.str}
25+
These changes are enabled automatically when compiling using
2626
Simics API {ver.ordinal + 1} or newer. With older Simics API versions, these
27-
features can be disabled individually by passing <tt>-\-no-compat=<em>TAG</em></tt>
27+
features can be disabled individually by passing
28+
<code>-\-breaking-change=<em>TAG</em></code>
2829
to the `dmlc` compiler.
2930
""")
3031
f.write("<dl>\n")

0 commit comments

Comments
 (0)