Skip to content

Commit

Permalink
Add scarb update docs (#830)
Browse files Browse the repository at this point in the history
commit-id:886a473a
  • Loading branch information
maciektr authored Oct 27, 2023
1 parent c77101e commit 7eb2819
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Scarb is under active development! Expect a lot of new features to appear soon!
- [x] GitHub action
- [x] Workspaces
- [x] Nightlies
- [x] `Scarb.lock`
- [x] `scarb update`
- [ ] Standardized `test` target 🏗️
- [ ] `Scarb.lock` 🏗️
- [ ] Package registry 🏗️
- [ ] PubGrub implementation for version resolution
- [ ] `scarb update`
- [ ] Dynamic loading of custom Cairo compiler plugins as Scarb packages
- [ ] Dynamic loading of custom targets aka code generators
- [ ] `scarb check`
Expand Down
6 changes: 6 additions & 0 deletions website/docs/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,9 @@ Check formatting in CI:
```shell
scarb fmt -c
```

## Updating locked dependencies

```shell
scarb update
```
8 changes: 7 additions & 1 deletion website/docs/reference/lockfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ version = "0.1.0"
[dependencies]
alexandria_math = { git = "https://github.com/keep-starknet-strange/alexandria.git" }
alexandria_data_structures = { git = "https://github.com/keep-starknet-strange/alexandria.git" }

```

The resulting lockfile will look like this:
Expand Down Expand Up @@ -109,3 +108,10 @@ dependencies = [
"alexandria_math",
]
```

## Updating locked versions

To update all versions locked by the lockfile, run `scarb update` command.
This will perform project resolution ignoring the existing lockfile, then write out a new `Scarb.lock`
with the new version information.
Note that the `Scarb.toml` manifest file will not be changed, and all version requirements from it will be preserved.

0 comments on commit 7eb2819

Please sign in to comment.