Closed colin-nolan closed 2 weeks ago
The test ansible-test sanity --test compile --python 2.7
[explain] failed with 1 error:
plugins/modules/cargo.py:200:86: SyntaxError: self.module.fail_json(msg=f"No published version for package {name} found")
The test ansible-test sanity --test compile --python 3.5
[explain] failed with 1 error:
plugins/modules/cargo.py:200:86: SyntaxError: self.module.fail_json(msg=f"No published version for package {name} found")
The test ansible-test sanity --test import --python 2.7
[explain] failed with 1 error:
plugins/modules/cargo.py:200:86: traceback: SyntaxError: invalid syntax
The test ansible-test sanity --test import --python 3.5
[explain] failed with 1 error:
plugins/modules/cargo.py:200:86: traceback: SyntaxError: invalid syntax
The test ansible-test sanity --test validate-modules
[explain] failed with 1 error:
plugins/modules/cargo.py:0:0: doc-type-does-not-match-spec: Argument 'directory' in argument_spec defines type as 'path' but documentation defines type as 'str'
The test ansible-test sanity --test validate-modules
[explain] failed with 1 error:
plugins/modules/cargo.py:0:0: doc-type-does-not-match-spec: Argument 'directory' in argument_spec defines type as 'path' but documentation defines type as 'str'
The test licenses
failed with 6 errors:
tests/integration/targets/cargo/files/hello-world/Cargo.toml:0:0: found no copyright notice
tests/integration/targets/cargo/files/hello-world/Cargo.toml:0:0: must have at least one license
tests/integration/targets/cargo/files/hello-world/Cargo.lock:0:0: found no copyright notice
tests/integration/targets/cargo/files/hello-world/Cargo.lock:0:0: must have at least one license
tests/integration/targets/cargo/files/hello-world/src/main.rs:0:0: found no copyright notice
tests/integration/targets/cargo/files/hello-world/src/main.rs:0:0: must have at least one license
The test ansible-test sanity --test compile --python 2.7
[explain] failed with 1 error:
plugins/modules/cargo.py:200:86: SyntaxError: self.module.fail_json(msg=f"No published version for package {name} found")
The test ansible-test sanity --test import --python 2.7
[explain] failed with 1 error:
plugins/modules/cargo.py:200:86: traceback: SyntaxError: invalid syntax
The test ansible-test sanity --test validate-modules
[explain] failed with 1 error:
plugins/modules/cargo.py:0:0: doc-type-does-not-match-spec: Argument 'directory' in argument_spec defines type as 'path' but documentation defines type as 'str'
The test ansible-test sanity --test validate-modules
[explain] failed with 1 error:
plugins/modules/cargo.py:0:0: doc-type-does-not-match-spec: Argument 'directory' in argument_spec defines type as 'path' but documentation defines type as 'str'
cc @radek-sprta click here for bot help
✅ Backport PR branch: patchback/backports/stable-9/69b72e4a8ea1111503d9528f179d5338657426cc/pr-8480
Backported as https://github.com/ansible-collections/community.general/pull/8527
🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.
@colin-nolan thanks for your contribution!
SUMMARY
Adds the ability to install a Cargo package from a source directory.
Fixes #6298
ISSUE TYPE
COMPONENT NAME
cargo
ADDITIONAL INFORMATION
Although #7895 adds a basic capability to install from a source directory, this PR goes beyond that work by considering how to handle versioning, and upgrades, in addition to adding testing. It is largely compatible with the aforementioned PR.
The reason I didn't opt to work from #7895 is that it has a relatively large scope, which I suspect may have made it a little difficult to merge. Merging this scope limited work in first offers a way of getting the functionality in sooner, and reduces the scope of what's new in #7895.