Skip to content

Commit

Permalink
Auto merge of #12679 - tompscanlan:caret-doc, r=weihanglo
Browse files Browse the repository at this point in the history
doc: clarify caret requirements

### What does this PR try to resolve?

clearing up caret version requirements

possibly fixes #12112

### How should we test and review this PR?

expert review...
  • Loading branch information
bors committed Sep 16, 2023
2 parents da498c8 + 0454f95 commit 4c10811
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/doc/src/reference/specifying-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,17 @@ using special operators, though it shouldn't be necessary most of the time.

### Caret requirements

**Caret requirements** are an alternative syntax for the default strategy,
`^1.2.3` is exactly equivalent to `1.2.3`.
**Caret requirements** are the default version requirement strategy.
This version strategy allows [SemVer] compatible updates.
They are specified as version requirements with a leading caret (`^`).

`^1.2.3` is an example of a caret requirement.

Leaving off the caret is a simplified equivalent syntax to using caret requirements.
While caret requirements are the default, it is recommended to use the
simplified syntax when possible.

`log = "^1.2.3"` is exactly equivalent to `log = "1.2.3"`.

### Tilde requirements

Expand Down

0 comments on commit 4c10811

Please sign in to comment.