Skip to content

Commit dff7787

Browse files
committed
docs: 参考文档不用第二人称,四处改回陈述句
1 parent e9d2c51 commit dff7787

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/05-mcpp-toml.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,7 @@ visible as *"the device is never reachable"* is the hardest kind to diagnose.
22482248
#### A rule package brings its own environment (2026.9.6.6+)
22492249

22502250
The table above is what a project writes when it has an opinion. Most projects
2251-
have none, and should write nothing:
2251+
have none, and nothing is what they write:
22522252

22532253
```toml
22542254
[build-dependencies.mcpp]
@@ -2287,7 +2287,7 @@ Which one is decided in two steps.
22872287
outranks a package it depends on, so a pin overrides a rule's requirement:
22882288

22892289
```toml
2290-
# your project, when you do have an opinion
2290+
# the project, when it does have an opinion
22912291
[target.'cfg(accelerator = "cuda")'.xlings.workspace]
22922292
"xim:cuda-nvcc" = "13.3.33"
22932293
```
@@ -2296,7 +2296,7 @@ A declaration that names no version abstains: it says the package is wanted and
22962296
nothing about which version, so it cannot outrank a floor merely by being
22972297
nearer. When two declarations disagree and both name a version, mcpp reports
22982298
which was used — an override visible only as *"two versions were declared and
2299-
one directory exists"* is a fact you would have to reconstruct from the
2299+
one directory exists"* is a fact the reader has to reconstruct from the
23002300
filesystem.
23012301

23022302
**Validation — the winner must satisfy every requirement that lost.** `>=`,
@@ -2318,8 +2318,8 @@ violated.
23182318
**This is a comparison, not a search.** The version is chosen by adjudication
23192319
and then checked, so mcpp never has to ask the index which versions exist and
23202320
carries no constraint solver. The cost is stated rather than hidden: a
2321-
combination a solver could satisfy — your `>=8.0`, a rule's `8.5.0`, and 8.3 as
2322-
the newest in the index — is refused instead, and the refusal says how to
2321+
combination a solver could satisfy — a project's `>=8.0`, a rule's `8.5.0`, and
2322+
8.3 as the newest in the index — is refused instead, and the refusal says how to
23232323
proceed.
23242324

23252325
Ranges are resolved in both directions. `>=2026.1` installs the highest

docs/20-heterogeneous-builds.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@ accelerator opens neither, which is what keeps the cheapest build cheap -- and
178178
that is the build CI runs.
179179

180180
Every lane works this way: `rules-cuda`, `rules-hip`, `rules-sycl`,
181-
`rules-spirv` and `rules-ascendc` each carry their own. There is no lane where
182-
you are expected to supply the environment yourself, because "sometimes you
183-
have to" is a rule nothing can state precisely enough to be useful.
184-
185-
**Overriding is one line, in your project.** Which package and how old it may
186-
be is the rule author's knowledge; *exactly which version* is sometimes yours,
187-
because a CUDA line is coupled to a driver floor that is a property of your
188-
machines:
181+
`rules-spirv` and `rules-ascendc` each carry their own. No lane expects the
182+
project to supply the environment instead, because "sometimes it has to" is a
183+
rule nothing can state precisely enough to be useful.
184+
185+
**Overriding is one line, in the project.** Which package and how old it may be
186+
is the rule author's knowledge; *exactly which version* sometimes belongs to the
187+
project, because a CUDA line is coupled to a driver floor that is a property of
188+
the machines it will run on:
189189

190190
```toml
191191
[target.'cfg(accelerator = "cuda")'.xlings.workspace]

docs/zh/05-mcpp-toml.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ hardware = {}
19131913

19141914
#### 规则包自带它的环境(2026.9.6.6+)
19151915

1916-
上面那张表是工程**有主张**时写的。多数工程没有主张,也就不该写:
1916+
上面那张表是工程**有主张**时写的。多数工程没有主张,写下的也就是空无一物:
19171917

19181918
```toml
19191919
[build-dependencies.mcpp]
@@ -1944,10 +1944,10 @@ plugins = { version = "0.2.4", features = ["rules-cuda"], host-module = true }
19441944

19451945
装哪一个,分两步决定。
19461946

1947-
**裁决——离产物更近的声明赢。** 你的工程压过它依赖的包,于是一个钉覆盖规则的要求:
1947+
**裁决——离产物更近的声明赢。** 工程压过它依赖的包,于是一个钉覆盖规则的要求:
19481948

19491949
```toml
1950-
# 你的工程,当你确实有主张时
1950+
# 工程侧,当它确实有主张时
19511951
[target.'cfg(accelerator = "cuda")'.xlings.workspace]
19521952
"xim:cuda-nvcc" = "13.3.33"
19531953
```
@@ -1973,7 +1973,7 @@ error: `xim:cuda-nvcc` is pinned to 12.0.0 by this project, and mcpp:plugins
19731973

19741974
**这是一次比较,不是一次搜索。** 版本由裁决选定、再被检查,所以 mcpp 从不需要问索引
19751975
「有哪些版本」,也就不带约束求解器。代价被写出来而不是藏起来:一个求解器本可满足的
1976-
组合——你写 `>=8.0`、规则写 `8.5.0`、而索引里最新是 8.3——会被拒绝,而拒绝消息里
1976+
组合——工程写 `>=8.0`、规则写 `8.5.0`、而索引里最新是 8.3——会被拒绝,而拒绝消息里
19771977
写着怎么往下走。
19781978

19791979
范围在两个方向上都被求解。`>=2026.1` 装到满足它的最高已发布版本,`>=2099.1` 作为

docs/zh/20-heterogeneous-builds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ plugins = { version = "0.2.4", features = ["rules-cuda"], host-module = true }
145145
两道门都不过——这正是让最便宜的那次构建保持便宜的原因,而那是 CI 跑的那一次。
146146

147147
每条 lane 都是这样:`rules-cuda``rules-hip``rules-sycl``rules-spirv`
148-
`rules-ascendc` 各自带着自己的环境。**不存在需要你自己补环境的 lane**,因为「有时候
148+
`rules-ascendc` 各自带着自己的环境。**不存在需要工程自己补环境的 lane**,因为「有时候
149149
需要」是一条没有任何地方能说清楚到可用的规则。
150150

151151
**覆盖是工程里的一行。** 哪个包、最低到哪一版,是规则作者的知识;**具体哪一版**有时
152-
是你的——一条 CUDA 线耦合着驱动下界,而那是你那批机器的属性:
152+
属于工程——一条 CUDA 线耦合着驱动下界,而那是产物将要运行的那批机器的属性:
153153

154154
```toml
155155
[target.'cfg(accelerator = "cuda")'.xlings.workspace]

0 commit comments

Comments
 (0)