Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Document the unique port attribution rule. #20087

Merged
merged 3 commits into from
Sep 13, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 uninstall a
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
```

and

```
vcpkg install b
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
```

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 and 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."
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved

### Unique port attribution rule

In the entire vcpkg system, no 2 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`.
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved

## Features

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