Relative --config-file panics in debug builds and skips the config in release builds
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in crates/bumpversion/src/lib.rs near line 718, where config_path is asserted to be absolute and checked against working_dir. Reproduce with a relative --config-file such as sub/.bumpversion.toml; verify both debug and release behavior. Done when the config path is resolved against the current directory and the config and version files advance together.
Written by the indexing model from the issue text.
Description
A relative --config-file breaks the bump:
$ # repository with sub/.bumpversion.toml (current_version = "1.0.0", files = [VERSION])
$ bumpversion --config-file sub/.bumpversion.toml patch
The application panicked (crashed).
Message: assertion failed: config_path.is_absolute()
Location: crates/bumpversion/src/lib.rs:718
A debug build panics on the debug_assert!, after VERSION has already been rewritten to 1.0.1. In a release build the assertion is gone, and config_path.starts_with(working_dir) is false for the relative path, so the config's own current_version is silently left at 1.0.0 while the files move on. The next bump then starts from the wrong version.
An absolute path works. Expected: resolve --config-file against the current directory before using it.
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from romnn/bumpversion
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
romnn/bumpversion#11 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
romnn/bumpversion#10 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
romnn/bumpversion#9 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
romnn/bumpversion#7 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
romnn/bumpversion#5 ·
All issues in romnn/bumpversion
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ardia-browser/ardia#5810 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
UIUX の修正Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aptos-labs/aptos-core#21119 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 8 days