Skip to content

Commit

Permalink
[Docs] Document the unique port attribution rule. (#20087)
Browse files Browse the repository at this point in the history
* Document the unique port attribution rule.

* Remove reference to #19922

* @strega-nil suggestions :D

Co-authored-by: nicole mazzuca <[email protected]>

Co-authored-by: nicole mazzuca <[email protected]>
  • Loading branch information
BillyONeal and strega-nil-ms authored Sep 13, 2021
1 parent d13e1a1 commit 8759c75
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/maintainers/maintainer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,28 @@ At this time, the following helpers are deprecated:
Ideally, portfiles should be short, simple, and as declarative as possible.
Remove any boiler plate comments introduced by the `create` command before submitting a PR.

### Ports must not be path dependent

Ports must not change their behavior based on which ports are already installed in a form that would change which contents that port installs. For example, given:

```
> vcpkg install a
> vcpkg install b
> vcpkg remove a
```

and

```
> vcpkg install b
```

the files installed by `b` must be the same, regardless of influence by the previous installation of `a`. This means that ports must not try to detect whether something is provided in the installed tree by another port before taking some action. A specific and common cause of such "path dependent" behavior is described below in "When defining features, explicitly control dependencies."

### Unique port attribution rule

In the entire vcpkg system, no two ports a user is expected to use concurrently may provide the same file. If a port tries to install a file already provided by another file, installation will fail. If a port wants to use an extremely common name for a header, for example, it should place those headers in a subdirectory rather than in `include`.

## Features

### Do not use features to implement alternatives
Expand Down

0 comments on commit 8759c75

Please sign in to comment.