-
Notifications
You must be signed in to change notification settings - Fork 7
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
error: unexpected character '\n' after patch version number #8
Comments
This comes from semver, but I don't have enough information to repro this, please reopen if you can provide either the output of |
{
"packages": [
{
"name": "deny",
"version": "0.1.0",
"id": "deny 0.1.0 (path+file:///home/kevincox/deny)",
"license": null,
"license_file": null,
"description": null,
"source": null,
"dependencies": [],
"targets": [
{
"kind": [
"bin"
],
"crate_types": [
"bin"
],
"name": "deny",
"src_path": "/home/kevincox/deny/src/main.rs",
"edition": "2021",
"doc": true,
"doctest": false,
"test": true
}
],
"features": {},
"manifest_path": "/home/kevincox/deny/Cargo.toml",
"metadata": null,
"publish": null,
"authors": [],
"categories": [],
"keywords": [],
"readme": null,
"repository": null,
"homepage": null,
"documentation": null,
"edition": "2021",
"links": null,
"default_run": null,
"rust_version": null
}
],
"workspace_members": [
"deny 0.1.0 (path+file:///home/kevincox/deny)"
],
"resolve": {
"nodes": [
{
"id": "deny 0.1.0 (path+file:///home/kevincox/deny)",
"dependencies": [],
"deps": [],
"features": []
}
],
"root": "deny 0.1.0 (path+file:///home/kevincox/deny)"
},
"target_directory": "/home/kevincox/deny/target",
"version": 1,
"workspace_root": "/home/kevincox/deny",
"metadata": null
} For me this reproduces with no config on an empty project. % cargo init deny
Created binary (application) package
% cd deny
% cargo-deny check
2023-08-02 12:55:48 [WARN] unable to find a config path, falling back to default config
2023-08-02 12:55:48 [ERROR] unexpected character '\n' after patch version number |
|
What does |
|
Ahh ok, I think that's the issue then, I'm guessing you are using a cargo packaged by your distro, the official cargo binary will emit |
Ah, great job tracking that down. I am using cargo from NixOS. As a test I pulled the It also has the short version string so it seems likely that this is the common factor.
The official Rust docker images don't seem to have this problem but they have the expanded version string:
|
Non-official cargo builds may have differing output for `cargo -V` that the previous code wasn't accounting for, the output is now properly trimmed to remove excess whitespace before attempting to parse it into a semver. Resolves: #8
Updates dependencies, notably bringing in tame-index 0.2.5 which brings in the fix for EmbarkStudios/tame-index#8 which was originally reported to this repo.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Expected behavior
The check works.
Screenshots
If applicable, add screenshots to help explain your problem.
Device:
The text was updated successfully, but these errors were encountered: