aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
authorVictor Romero <romerosanchezv@gmail.com>2021-07-20 16:24:38 -0700
committerGitHub <noreply@github.com>2021-07-20 16:24:38 -0700
commit3c82e1931ea375fd48fcfb42af09990798ee6489 (patch)
treee44faa74a2e687622e33fed4efbe86b4800f46c5 /docs/examples
parent1c20782ea44a8c07be931a8b8286044ec175cddc (diff)
downloadvcpkg-3c82e1931ea375fd48fcfb42af09990798ee6489.tar.gz
vcpkg-3c82e1931ea375fd48fcfb42af09990798ee6489.zip
[docs] More Getting Started fixes (#18970)
* Use valid commmit ID for baseline * More doc fixes
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/versioning.getting-started.md27
1 files changed, 15 insertions, 12 deletions
diff --git a/docs/examples/versioning.getting-started.md b/docs/examples/versioning.getting-started.md
index 450e2b05a..c55cf7c1c 100644
--- a/docs/examples/versioning.getting-started.md
+++ b/docs/examples/versioning.getting-started.md
@@ -20,11 +20,11 @@ Create a folder with the following files:
"dependencies": [
{
"name": "fmt",
- "version>=": "7.1.3"
+ "version>=": "7.1.3#1"
},
"zlib"
],
- "builtin-baseline": "68a74950d0400f5a803026d0860f49853984bf11"
+ "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc"
}
```
@@ -69,8 +69,10 @@ PS D:\versions-test\build> cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/script
-- Running vcpkg install
Detecting compiler hash for triplet x86-windows...
The following packages will be built and installed:
- fmt[core]:x86-windows -> 7.1.3 -- D:\vcpkg\buildtrees\versioning\versions\fmt\dd8cf5e1a2dce2680189a0744102d4b0f1cfb8b6
- zlib[core]:x86-windows -> 1.2.11#9 -- D:\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4
+ fmt[core]:x64-windows -> 7.1.3#1 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\fmt\4f8427eb0bd40da1856d4e67bde39a4fda689d72
+ vcpkg-cmake[core]:x64-windows -> 2021-02-26 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\vcpkg-cmake\51896aa8073adb5c8450daa423d03eedf0dfc61f
+ vcpkg-cmake-config[core]:x64-windows -> 2021-02-26 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\vcpkg-cmake-config\d255b3d566a8861dcc99a958240463e678528066
+ zlib[core]:x64-windows -> 1.2.11#9 -- D:\Work\viromer\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4
...
```
@@ -90,7 +92,8 @@ zlib version is 1.2.11
Take a look at the output:
```
-fmt[core]:x86-windows -> 7.1.3 -- D:\vcpkg\buildtrees\versioning\versions\fmt\dd8cf5e1a2dce2680189a0744102d4b0f1cfb8b6
+fmt[core]:x86-windows -> 7.1.3#1 -- D:\vcpkg\buildtrees\versioning\versions\fmt\4f8427eb0bd40da1856d4e67bde39a4fda689d72
+...
zlib[core]:x86-windows -> 1.2.11#9 -- D:\vcpkg\buildtrees\versioning\versions\zlib\827111046e37c98153d9d82bb6fa4183b6d728e4
```
@@ -130,23 +133,23 @@ Version scheme | Description
}
```
-This property is used to express minimum version constraints, it is allowed only as part of the `"dependencies"` declarations. In our example we set an explicit constraint on version `7.1.3` of `fmt`.
+This property is used to express minimum version constraints, it is allowed only as part of the `"dependencies"` declarations. In our example we set an explicit constraint on version `7.1.3#1` of `fmt`.
Vcpkg is allowed to upgrade this constraint if a transitive dependency requires a newer version. For example, if `zlib` were to declare a dependency on `fmt` version `7.1.4` then vcpkg would install `7.1.4` instead.
-Vcpkg uses a minimum version approach, in our example, even if `fmt` version `8.0.0` were to be released, vcpkg would still install version `7.1.3` as that is the minimum version that satisfies the constraint. The advantages of this approach are that you don't get unexpected dependency upgrades when you update vcpkg and you get reproducible builds (in terms of version used) as long as you use the same manifest.
+Vcpkg uses a minimum version approach, in our example, even if `fmt` version `8.0.0` were to be released, vcpkg would still install version `7.1.3#1` as that is the minimum version that satisfies the constraint. The advantages of this approach are that you don't get unexpected dependency upgrades when you update vcpkg and you get reproducible builds (in terms of version used) as long as you use the same manifest.
If you want to upgrade your dependencies, you can bump the minimum version constraint or use a newer baseline.
#### **`builtin-baseline`**
```json
-{ "builtin-baseline": "68a74950d0400f5a803026d0860f49853984bf11" }
+{ "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc" }
```
This field declares the versioning baseline for all ports. Setting a baseline is required to enable versioning, otherwise you will get the current versions on the ports directory. You can run 'git rev-parse HEAD' to get the current commit of vcpkg and set it as the builtin-baseline. See the [`builtin-baseline` documentation](../users/versioning.md#builtin-baseline) for more information.
-In our example, you can notice that we do not declare a version constraint for `zlib`; instead, the version is taken from the baseline. Internally, vcpkg will look in commit `68a74950d0400f5a803026d0860f49853984bf11` to find out what version of `zlib` was the latest at that point in time (in our case it was `1.2.11#9`).
+In our example, you can notice that we do not declare a version constraint for `zlib`; instead, the version is taken from the baseline. Internally, vcpkg will look in commit `3426db05b996481ca31e95fff3734cf23e0f51bc` to find out what version of `zlib` was the latest at that point in time (in our case it was `1.2.11#9`).
During version resolution, baseline versions are treated as minimum version constraints. If you declare an explicit constraint that is lower than a baseline version, the explicit constraint will be upgraded to the baseline version.
@@ -155,7 +158,7 @@ For example, if we modified our dependencies like this:
{ "dependencies": [
{
"name": "fmt",
- "version>=": "7.1.3"
+ "version>=": "7.1.3#1"
},
{
"name": "zlib",
@@ -187,14 +190,14 @@ Let's modify our example once more, this time to force vcpkg to use version `6.0
"dependencies": [
{
"name": "fmt",
- "version>=": "7.1.3"
+ "version>=": "7.1.3#1"
},
{
"name": "zlib",
"version>=": "1.2.11#7"
}
],
- "builtin-baseline": "68a74950d0400f5a803026d0860f49853984bf11",
+ "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc",
"overrides": [
{
"name": "fmt",