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

Update dependencies and consolidate crate metadata into workspace Cargo.toml #129

Merged

Conversation

azriel91
Copy link
Owner

@azriel91 azriel91 commented Jun 4, 2023

Closes #128.

See linked issue for scripts used to do this work.

azriel91 added 3 commits June 3, 2023 21:13
Used the following script:

```bash
\# Replace package fields
fd -Ftf Cargo.toml --exclude examples -x sd '^version = "0\.0\.10"$' 'version.workspace = true'
fd -Ftf Cargo.toml --exclude examples -x sd -s 'authors = ["Azriel Hoh <[email protected]>"]' 'authors.workspace = true'
fd -Ftf Cargo.toml --exclude examples -x sd -s 'edition = "2021"' 'edition.workspace = true'
fd -Ftf Cargo.toml --exclude examples -x sd -s 'repository = "https://github.com/azriel91/peace"' 'repository.workspace = true
homepage.workspace = true'
fd -Ftf Cargo.toml --exclude examples -x sd '^readme = .+' 'readme.workspace = true'
fd -Ftf Cargo.toml --exclude examples -x sd '^categories = .+' 'categories.workspace = true'
fd -Ftf Cargo.toml --exclude examples -x sd '^keywords = .+' 'keywords.workspace = true'
fd -Ftf Cargo.toml --exclude examples -x sd '^license = .+' 'license.workspace = true'

\# Move description and documentation fields under `name`
fd -Ftf Cargo.toml --exclude examples -x bash -c "
cat << EOF | ed -sE {}
/^name/
ka
/^description/
m'a
ka
/^documentation/
m'a
w
EOF
"
```
@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (b72e18e) 90.83% compared to head (1a9e060) 90.83%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #129   +/-   ##
=======================================
  Coverage   90.83%   90.83%           
=======================================
  Files         335      334    -1     
  Lines       30403    30403           
=======================================
  Hits        27618    27618           
  Misses       2785     2785           

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

azriel91 added 5 commits June 5, 2023 09:05
Script used:

```bash
\# Replace `peace` dependencies in `Cargo.toml`s
fd -Ftf Cargo.toml --exclude examples -x \
  sd '\{ path = "([a-z_/.]+)", version = "0\.0\.10"([^}]+)\}' '{ workspace = true$2}'
fd -Ftf Cargo.toml --exclude examples -x \
  sd '\{ version = "0\.0\.10", path = "([a-z_/.]+)"([^}]+)\}' '{ workspace = true$2}'
\# Replace simple version dependencies in `Cargo.toml`s
fd -Ftf Cargo.toml --exclude examples -x \
  sd '^([a-z-_0-9]+) = ("[0-9.]+")'    '$1 = { workspace = true }'
\# Replace complex version dependencies in `Cargo.toml`s
fd -Ftf Cargo.toml --exclude examples -x \
  sd '^([a-z-_0-9]+) = \{ version = "[0-9.]+"([^}]+)\}' '$1 = { workspace = true$2}'
\# Put back version and edition values
fd -Ftf Cargo.toml --exclude examples -x sd -s 'edition = { workspace = true }' 'edition = "2021"'
sd -s 'version = { workspace = true }' 'version = "0.0.10"' Cargo.toml
```
@azriel91 azriel91 marked this pull request as ready for review June 4, 2023 23:45
@azriel91 azriel91 merged commit 85cb088 into main Jun 5, 2023
@azriel91 azriel91 deleted the maintenance/128/update-and-use-workspace-dependencies branch June 5, 2023 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update dependencies and use workspace dependencies
1 participant