这是indexloc提供的服务,不要输入任何密码
Skip to content

cargo workspaces changed uses the wrong tag as comparison #179

@jkelleyrtp

Description

@jkelleyrtp

When planning on releasing 0.6.3 of my library, I ran cargo workspaces version and cargo workspaces changed and it uses the v0.6.1 tag instead of the proper v0.6.2 tag.

It returns:

❯ cargo workspaces changed
info looking for changes since v0.6.1
dioxus-cli
dioxus-cli-config
dioxus-cli-opt
const-serialize
dioxus-core
dioxus-core-macro
dioxus-desktop
dioxus
dioxus-lib
dioxus-document
dioxus-dx-wire-format
dioxus-fullstack
dioxus-html
dioxus-interpreter-js
dioxus-isrg
dioxus-liveview
manganis
manganis-core
manganis-macro
dioxus-mobile
dioxus-router
dioxus-router-macro
dioxus-rsx
dioxus-rsx-hotreload
dioxus-rsx-rosetta
dioxus-signals
dioxus-web

When it should return:

❯ cargo workspaces changed --since v0.6.2
info looking for changes since v0.6.2
dioxus-cli
dioxus-core
dioxus-html
dioxus-router
dioxus-router-macro
dioxus-signals
dioxus-web

This causes version and publish to be wrong, which, when we use this, causes issues with cargo's caching setup
DioxusLabs/dioxus#3391

When I run git tag --list I get a proper list of tags sorted by date:

❯ git log --tags --simplify-by-decoration --pretty="format:%ci %d"
2025-01-21 19:18:34 -0800  (tag: v0.6.2)
2025-01-21 10:52:07 -0800  (jk/dpi-change)
2025-01-20 18:58:50 -0800  (jk/android-debug)
2025-01-08 19:54:11 -0800  (jk/dioxus-web-df-no)
2025-01-07 19:52:27 -0800  (jk/unicode-desktop)
2025-01-07 13:39:45 -0800  (jk/export-warnings)
2024-12-17 18:30:08 -0800  (tag: v0.6.1)
2024-12-06 19:54:08 -0800  (tag: v0.6.0, origin/v0.6)

The docs behind changed imply that the last tagged release will be used:

❯ cargo workspaces changed --help
cargo-workspaces-changed 
List crates that have changed since the last tagged release

This seems to be because the method cargo-workspaces uses to find the tag is wrong:
https://stackoverflow.com/a/7979255


Additionally, I think that --since should be a CLI option passable to publish/version considering it's also passed to changed which is what governs the diff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions