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] Remove out-of-date docs, improve header standardization. #24456

Merged
merged 2 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions docs/examples/installing-and-using-packages.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Installing and Using Packages Example: SQLite

_Note: this old example uses Classic Mode, but most developers will be happier with Manifest Mode. See [Manifest Mode: CMake Example](manifest-mode-cmake.md) for an example of converting to Manifest Mode._

- [Step 1: Install](#install)
- [Step 2: Use](#use)
- [VS/MSBuild Project (User-wide integration)](#msbuild)
Expand Down
27 changes: 14 additions & 13 deletions docs/examples/modify-baseline-to-pin-old-boost.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Pin old Boost versions
This document will teach you how to set versions of meta-packages like `boost` or `qt5`.
This document will teach you how to set versions of meta-packages like `boost` or `qt5`.

**What is a meta-package?**
In vcpkg we call meta-packages to ports that by themselves don't install anything but that instead forward installation to another port or ports. The reasons for these meta-packages to exist are plenty: to install different versions of a library depending on platform (like the old OpenSSL port did), to allow for multiple versions to exist in the vcpkg registry at the same time (OpenCV), or to conveniently install/uninstall a catalog of related packages (Boost and Qt).
**What is a meta-package?**
In vcpkg we call meta-packages to ports that by themselves don't install anything but that instead forward installation to another port or ports. The reasons for these meta-packages to exist are plenty: to install different versions of a library depending on platform or to conveniently install/uninstall a catalog of related packages (Boost and Qt).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In vcpkg we call meta-packages to ports that by themselves don't install anything but that instead forward installation to another port or ports. The reasons for these meta-packages to exist are plenty: to install different versions of a library depending on platform or to conveniently install/uninstall a catalog of related packages (Boost and Qt).
In vcpkg we call ports that don't install anything but forward installation to other port(s) *meta-packages*. Meta-packages:
* allow installation of different versions of a library depending on platform
* conveniently install/uninstall a catalog of related packages (as demonstrated by `boost` and `qt`)

I'm not sure we should be talking about different "versions" here?

(I suggested the bulleted list because I think 'reasons are plenty' just makes it longer without really adding things. Just say what it's for.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my below comment.


In the case of Boost, it is unlikely that a user requires all of the 140+ Boost libraries in their project. For the sake of convenience, vcpkg splits Boost into multiple sub-packages broken down to individual libraries. By doing so, users can limit the subset of Boost libraries that they depend on.
In the case of Boost, it is unlikely that a user requires all of the 140+ Boost libraries in their project. For the sake of convenience, vcpkg splits Boost into multiple sub-packages broken down to individual libraries. By doing so, users can limit the subset of Boost libraries that they depend on.

If a user wants to install all of the Boost libraries available in vcpkg, they can do so by installing the `boost` meta-package.
If a user wants to install all of the Boost libraries available in vcpkg, they can do so by installing the `boost` meta-package.
Comment on lines +7 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about merge these 2 paragraphs into:

In the case of Boost, it is unlikely that all 140+ Boost libraries are required. vcpkg splits Boost into its individual libraries. For convenience, the boost meta-package can used to install them all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my below comment.


Due to the nature of meta-packages, some unexpected issues arise when trying to use them with versioning. If a user writes the following manifest file:

Expand All @@ -17,7 +17,7 @@ Due to the nature of meta-packages, some unexpected issues arise when trying to
"version": "1.0.0",
"builtin-baseline": "787fe1418ea968913cc6daf11855ffd8b0b5e9d4",
"dependencies": [ "boost-tuple" ],
"overrides": [
"overrides": [
{ "name": "boost", "version": "1.72.0" }
]
}
Expand Down Expand Up @@ -49,7 +49,7 @@ It is reasonable to expect that overriding `boost` to version 1.72.0 results in
Below, we describe two methods to pin down Boost versions effectively.

## Method 1: Pin specific packages
Use `"overrides"` to force specific versions in a package-by-package basis.
Use `"overrides"` to force specific versions in a package-by-package basis.

`vcpkg.json`
```json
Expand All @@ -72,14 +72,15 @@ This method allows you to quickly set the specific versions you want, but you wi
The second method makes it easy to pin the entire Boost collection and end up with a very simple manifest file.

## Method 2: Modify baseline
An easy way to set the version for the entirety of boost is to use the `"builtin-baseline"` property.
An easy way to set the version for the entirety of boost is to use the `"builtin-baseline"` property.

As of right now, it is only possible to go back to Boost version `1.75.0` using a baseline. Since that was the contemporary Boost version when the versioning feature was merged. **But, it is possible to modify the baseline to whatever you like and use that instead.**
As of right now, it is only possible to go back to Boost version `1.75.0` using a baseline, since that was the contemporary Boost version when the versioning feature was merged. **But, it is possible to modify the baseline to whatever you like and use that instead.**

### Step 1: Create a new branch
As described in the versioning documentation. The value that goes in `"builtin-baseline"` is a Git commit in the vcpkg repository's history. Then it stands to reason, that if you want to customize the baseline you should be able to create a new commit with said custom baseline.
As described in the versioning documentation. The value that goes in `"builtin-baseline"` is a git commit in the microsoft/vcpkg repository's history. If you want to customize the baseline and have control over the vcpkg instance, you can create a new commit with said custom baseline.

Let's start by creating a new branch to hold our modified baseline.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 trailing spaces were forcing a line break between this line and the next one. Was eliminating that the intent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, thanks for catching this. I've added a hard break.


Let's start by creating a new branch to hold our modified baseline.
In the directory containing your clone of the vcpkg Git repository run:

```
Expand All @@ -91,7 +92,7 @@ This will create a new branch named `custom-boost-baseline` and check it out imm
### Step 2: Modify the baseline
The next step is to modify the baseline file, open the file in your editor of choice and modify the entries for the Boost libraries.

Change the `"baseline"` version to your desired version.
Change the `"baseline"` version to your desired version.
_NOTE: Remember to also set the port versions to 0 (or your desired version)._

`${vcpkg-root}/versions/baseline.json`
Expand Down Expand Up @@ -126,7 +127,7 @@ _NOTE: Remember to also set the port versions to 0 (or your desired version)._
...
```

Some `boost-` packages are helpers used by vcpkg and are not part of Boost. For example, `"boost-uninstall"` is a vcpkg helper to conveniently uninstall all Boost libraries, but it didn't exist for Boost version `1.72.0`, in this case it is fine to leave it at `1.75.0` to avoid baseline errors (since all versions in `baseline.json` must have existed).
Some `boost-` packages are helpers used by vcpkg and are not part of Boost. For example, `"boost-uninstall"` is a vcpkg helper to conveniently uninstall all Boost libraries, but it didn't exist for Boost version `1.72.0`, in this case it is fine to leave it at `1.75.0` to avoid baseline errors (since all versions in `baseline.json` must have existed).

### Step 3: Commit your changes
After saving your modified file, run these commands to commit your changes:
Expand Down
8 changes: 3 additions & 5 deletions docs/examples/versioning.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Vcpkg lets you take control of which version of packages to install in your proj

## Using versions with manifests

With the `versions` feature flag enabled you can start adding version constraints to your dependencies.

Let's start with creating a simple CMake project that depends on `fmt` and `zlib`.

Create a folder with the following files:
Expand Down Expand Up @@ -97,7 +95,7 @@ fmt[core]:x86-windows -> 7.1.3#1 -- D:\vcpkg\buildtrees\versioning\versions\fmt\
zlib[core]:x86-windows -> 1.2.11#9 -- D:\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4
```

Instead of using the portfiles in `ports/`, vcpkg is checking out the files for each version in `buildtrees/versioning/versions/`. The files in `ports/` are still used when running vcpkg in classic mode or when the `versions` feature flag is disabled.
Instead of using the portfiles in `ports/`, vcpkg is checking out the files for each version in `buildtrees/versioning/versions/`. The files in `ports/` are still used when running vcpkg in classic mode.

_NOTE: Output from vcpkg while configuring CMake is only available when using CMake version `3.18` or newer. If you're using an older CMake you can check the `vcpkg-manifest-install.log` file in your build directory instead._

Expand Down Expand Up @@ -234,11 +232,11 @@ Notice how the `fmt` is now at version `6.0.0` just like we wanted.

## Versions and custom ports

The last thing to discuss is how overlay ports interact with versioning resolution. The answer is: they don't.
The last thing to discuss is how overlay ports interact with versioning resolution. The answer is: they don't.

Going into more detail, when you provide an overlay for a port, vcpkg will always use the overlay port without caring what version is contained in it. The reasons are two-fold: (1) it is consistent with the existing behavior of overlay ports of completely masking the existing port, and (2) overlay ports do not (and are not expected to) provide enough information to power vcpkg's versioning feature.

If you want to have flexible port customization along with versioning features, you should consider making your own custom registry. See our [registries specification for more details](../specifications/registries.md).
If you want to have flexible port customization along with versioning, you should consider making your own custom registry. See our [registries specification for more details](../specifications/registries.md).

## Further reading

Expand Down
2 changes: 2 additions & 0 deletions docs/specifications/registries-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.**

**Up-to-date documentation is available at [Registries](../users/registries.md).**

Originally, the design of registries was decided upon and written up in the [Registries RFC](registries.md).
However, as we've gotten further into the design process of git registries and versioning,
and discussed the interaction of versioning with registries,
Expand Down
2 changes: 2 additions & 0 deletions docs/specifications/registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**Note: this is the feature as it was initially specified and does not necessarily reflect the current behavior.**

**Up-to-date documentation is available at [Registries](../users/registries.md).**

As it is now, vcpkg has over 1400 ports in the default registry (the `/ports` directory).
For the majority of users, this repository of packages is enough. However, many enterprises
need to more closely control their dependencies for one reason or another, and this document
Expand Down
5 changes: 1 addition & 4 deletions docs/users/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/android.md).**

Android is not officially supported, and there are no official android triplets at the moment.

However, some packages can compile to Android, and the situation is improving: see the list of [PR related to Android](https://github.com/Microsoft/vcpkg/pulls?q=+android+).

*Android is not tested as part of vcpkg repository's CI process, so regressions can occur as part of library updates. PRs improving support are welcome!*

## Android build requirements

Expand Down
4 changes: 1 addition & 3 deletions docs/users/config-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ This environment variable can be set to an existing directory to use for storing
This environment variable can be set to a comma-separated list of off-by-default features in vcpkg. These features are
subject to change without notice and should be considered highly unstable.

Non-exhaustive list of off-by-default features:

- `manifest`
There are no off-by-default feature flags at this time.

#### EDITOR

Expand Down
2 changes: 1 addition & 1 deletion docs/users/mingw.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/mingw.md).**

*MinGW is community-supported and not tested as part of vcpkg repository's CI process.*
*MinGW is not tested as part of vcpkg repository's CI process, so regressions can occur as part of library updates. PRs improving support are welcome!*

## Table of Contents

Expand Down