Skip to content

Commit 0f14d9d

Browse files
authored
docs(ref): Rename DEP_NAME_KEY to DEP_LINKS_KEY (#16205)
### What does this PR try to resolve? `NAME` is unclear what should go here and the docs have to specifically call out that it is `package.links` and not `package.name`. The hope with this rename is to make this even clearer, especially if we move forward with #3544 and add an alternative to `DEP_NAME_KEY` that uses the dependency name. ### How to test and review this PR?
2 parents 8d3e73f + 22f22d4 commit 0f14d9d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/doc/src/reference/build-scripts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ The metadata is passed to the build scripts of **dependent** packages. For
445445
example, if the package `foo` depends on `bar`, which links `baz`, then if
446446
`bar` generates `key=value` as part of its build script metadata, then the
447447
build script of `foo` will have the environment variables `DEP_BAZ_KEY=value`
448-
(note that the value of the `links` key is used).
448+
(note that the value of the `links` key is used and the case change for `key`).
449449
See the ["Using another `sys` crate"][using-another-sys] for an example of
450450
how this can be used.
451451

@@ -475,7 +475,7 @@ convention of native-library-related packages:
475475

476476
* Common dependencies on `foo-sys` alleviates the rule about one package per
477477
value of `links`.
478-
* Other `-sys` packages can take advantage of the `DEP_NAME_KEY=value`
478+
* Other `-sys` packages can take advantage of the `DEP_LINKS_KEY=value`
479479
environment variables to better integrate with other packages. See the
480480
["Using another `sys` crate"][using-another-sys] example.
481481
* A common dependency allows centralizing logic on discovering `libfoo` itself

src/doc/src/reference/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ let out_dir = env::var("OUT_DIR").unwrap();
383383
[`release`] profile. Using this environment variable is not recommended.
384384
Using other environment variables like `OPT_LEVEL` provide a more correct
385385
view of the actual settings being used.
386-
* `DEP_<name>_<key>` --- For more information about this set of environment variables,
386+
* `DEP_<links>_<key>` --- For more information about this set of environment variables,
387387
see build script documentation about [`links`][links].
388388
* `RUSTC`, `RUSTDOC` --- the compiler and documentation generator that Cargo has
389389
resolved to use, passed to the build script so it might use it as well.

0 commit comments

Comments
 (0)