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

merge queue: embarking main (8a7c871) and [#6973 + #6913 + #6943] together #6974

Closed
wants to merge 9 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Rust files
id: changed-files-rust
uses: tj-actions/changed-files@v36.1.0
uses: tj-actions/changed-files@v36.2.1
with:
files: |
**/*.rs
Expand All @@ -49,7 +49,7 @@ jobs:

- name: Workflow files
id: changed-files-workflows
uses: tj-actions/changed-files@v36.1.0
uses: tj-actions/changed-files@v36.2.1
with:
files: |
.github/workflows/*.yml
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -470,17 +470,17 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "bitflags"
version = "2.3.1"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84"
checksum = "6dbe3c979c178231552ecba20214a8272df4e09f232a87aef4320cf06539aded"

[[package]]
name = "bitflags-serde-legacy"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b64e60c28b6d25ad92e8b367801ff9aa12b41d05fc8798055d296bace4a60cc"
dependencies = [
"bitflags 2.3.1",
"bitflags 2.3.2",
"serde",
]

Expand Down Expand Up @@ -5641,7 +5641,7 @@ dependencies = [
name = "zebra-chain"
version = "1.0.0-beta.26"
dependencies = [
"bitflags 2.3.1",
"bitflags 2.3.2",
"bitflags-serde-legacy",
"bitvec",
"blake2b_simd",
Expand Down Expand Up @@ -5746,7 +5746,7 @@ dependencies = [
name = "zebra-network"
version = "1.0.0-beta.26"
dependencies = [
"bitflags 2.3.1",
"bitflags 2.3.2",
"byteorder",
"bytes",
"chrono",
Expand Down
13 changes: 8 additions & 5 deletions book/src/dev/mass-renames.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ so changing them can lead to unexpected test failures or hangs.
You can use `sed` to rename all the instances of a name in Zebra's code, documentation, and tests:
```sh
git ls-tree --full-tree -r --name-only HEAD | \
xargs sed -i 's/OldName/NewName/g'
xargs sed -i -e 's/OldName/NewName/g' -e 's/OtherOldName/OtherNewName/g'
```

Or excluding specific paths:
```sh
git ls-tree --full-tree -r --name-only HEAD | \
grep -v 'path-to-skip' | \
xargs sed -i 's/OldName/NewName/g'
grep -v -e 'path-to-skip' -e 'other-path-to-skip' | \
xargs sed -i -e 's/OldName/NewName/g' -e 's/OtherOldName/OtherNewName/g'
```

`sed` also supports regular expressions to replace a pattern with another pattern.
Expand All @@ -47,7 +47,8 @@ git worktree add ../zebra-pr origin/pr-branch-name
cd ../zebra-sed
# run the scripts in the PR or commit message
git ls-tree --full-tree -r --name-only HEAD | \
xargs sed -i 's/OldName/NewName/g'
grep -v -e 'path-to-skip' -e 'other-path-to-skip' | \
xargs sed -i -e 's/OldName/NewName/g' -e 's/OtherOldName/OtherNewName/g'
cargo fmt --all
```

Expand All @@ -66,9 +67,11 @@ and ask the author to re-run the script on the latest `main`.

You can use `fastmod` to rename some instances, but skip others:
```sh
fastmod --fixed-strings "OldName" "NewName" [paths to change]
fastmod --hidden --fixed-strings "OldName" "NewName" [paths to change]
```

Using the `--hidden` flag does renames in `.github` workflows, issue templates, and other configs.

`fastmod` also supports regular expressions to replace a pattern with another pattern.

Here's how to make a PR with these replacements:
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bench = ["zebra-test"]

# Cryptography
bitvec = "1.0.1"
bitflags = "2.2.1"
bitflags = "2.3.2"
bitflags-serde-legacy = "0.1.1"
blake2b_simd = "1.0.1"
blake2s_simd = "1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion zebra-network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ progress-bar = [
proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl"]

[dependencies]
bitflags = "2.2.1"
bitflags = "2.3.2"
byteorder = "1.4.3"
bytes = "1.4.0"
chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] }
Expand Down