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

Cargo improvements #7895

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

aretrosen
Copy link
Contributor

@aretrosen aretrosen commented Jan 25, 2024

SUMMARY

Closes #7338
This supports almost all flags by cargo install.

Caveats:

Currently, many packages can be installed at all, but in this PR, only one can be installed at a time. Further work can be done to install multiple packages at a time, if the design is confirmed.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

community.general.cargo

ADDITIONAL INFORMATION

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module plugins plugin (any type) labels Jan 25, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-8 Automatically create a backport for the stable-8 branch labels Jan 25, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jan 25, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot

This comment was marked as outdated.

@aretrosen aretrosen force-pushed the cargo-improvements branch 2 times, most recently from c47ef98 to 3c283ea Compare January 27, 2024 14:12
@ansibullbot

This comment was marked as outdated.

@ansibullbot

This comment was marked as outdated.

@aretrosen aretrosen force-pushed the cargo-improvements branch 2 times, most recently from 73813af to a56d543 Compare January 27, 2024 22:24
@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI tests tests and removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jan 27, 2024
@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Feb 12, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not commenting on this earlier. I was hoping that we can get #7363 in first, since it's preparing TOML support in a nicer way (IMO) and has been there longer. Unfortunately that seems to be stuck right now.

Please note that you have to add a changelog fragment.

Also, extending the tests (see tests/integration/targets/cargo/) would be nice.

plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved

HAS_TOML = True
except ImportError:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TOML code should preferably be in a module utils, similar as in #7895.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant #7363, not #7895 (which is this PR).

plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Show resolved Hide resolved
@ansibullbot ansibullbot removed the stale_ci CI is older than 7 days, rerun before merging label Feb 20, 2024
changelogs/fragments/7895-complete-features=cargo.yml Outdated Show resolved Hide resolved
changelogs/fragments/7895-complete-features=cargo.yml Outdated Show resolved Hide resolved
changelogs/fragments/7895-complete-features=cargo.yml Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Show resolved Hide resolved
@ansibullbot ansibullbot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR integration tests/integration and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Feb 20, 2024
plugins/modules/cargo.py Outdated Show resolved Hide resolved
plugins/modules/cargo.py Outdated Show resolved Hide resolved
version_added: 8.4.0
all_features:
description:
- Enable all features for package(s).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.


HAS_TOML = True
except ImportError:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant #7363, not #7895 (which is this PR).

@ansibullbot ansibullbot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 23, 2024
@aretrosen aretrosen force-pushed the cargo-improvements branch from a57166c to d3856f3 Compare April 22, 2024 23:12
@ansibullbot ansibullbot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Apr 22, 2024
@aretrosen aretrosen force-pushed the cargo-improvements branch from 0edaa4a to e61f3fd Compare April 23, 2024 01:11
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Apr 23, 2024
@felixfontein felixfontein removed the backport-8 Automatically create a backport for the stable-8 branch label Apr 23, 2024
@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label May 4, 2024
@felixfontein felixfontein added the backport-9 Automatically create a backport for the stable-9 branch label May 20, 2024
@ansibullbot ansibullbot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels May 28, 2024
colin-nolan added a commit to colin-nolan/community.general that referenced this pull request Jun 9, 2024
felixfontein pushed a commit that referenced this pull request Jun 17, 2024
* Fixes installed version for git/local.

* Support latest determination with local source.

* Adds docs.

* Improves error message.

* Setup for tests.

* Updates copyright.

* Align closer to #7895.

* Adds changelog.

* Check directory exists.

* Stop using format strings.

* Corrects directory arg type in docs.

* Setup test repo dynamically.

* Adds tests.

* Adds version matching tests.

* Update changelog fragment to match PR ID.

* Updates copyright.

* Import new directory tests.
patchback bot pushed a commit that referenced this pull request Jun 17, 2024
* Fixes installed version for git/local.

* Support latest determination with local source.

* Adds docs.

* Improves error message.

* Setup for tests.

* Updates copyright.

* Align closer to #7895.

* Adds changelog.

* Check directory exists.

* Stop using format strings.

* Corrects directory arg type in docs.

* Setup test repo dynamically.

* Adds tests.

* Adds version matching tests.

* Update changelog fragment to match PR ID.

* Updates copyright.

* Import new directory tests.

(cherry picked from commit 69b72e4)
felixfontein pushed a commit that referenced this pull request Jun 17, 2024
…urce in a given directory (#8527)

`cargo` module install from source in a given directory (#8480)

* Fixes installed version for git/local.

* Support latest determination with local source.

* Adds docs.

* Improves error message.

* Setup for tests.

* Updates copyright.

* Align closer to #7895.

* Adds changelog.

* Check directory exists.

* Stop using format strings.

* Corrects directory arg type in docs.

* Setup test repo dynamically.

* Adds tests.

* Adds version matching tests.

* Update changelog fragment to match PR ID.

* Updates copyright.

* Import new directory tests.

(cherry picked from commit 69b72e4)

Co-authored-by: Colin Nolan <colin-nolan@users.noreply.github.com>
@felixfontein felixfontein removed the backport-9 Automatically create a backport for the stable-9 branch label Oct 7, 2024
@russoz
Copy link
Collaborator

russoz commented Oct 29, 2024

Hi @aretrosen ,

Are you still planning to work on this?

@aretrosen
Copy link
Contributor Author

Hi @aretrosen ,

Are you still planning to work on this?

No, I am not working at it currently. Should I close the PR?

@russoz
Copy link
Collaborator

russoz commented Oct 31, 2024

If you want to keep it, it's OK - but we will ping you every once in a while to check on it. If this has dropped entirely from your plans, then yes, please close it.

Unless someone wants to resume working on it, in which case they should step forward and pick it up.

@felixfontein felixfontein added the backport-10 Automatically create a backport for the stable-10 branch label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-10 Automatically create a backport for the stable-10 branch check-before-release PR will be looked at again shortly before release and merged if possible. feature This issue/PR relates to a feature request integration tests/integration module module needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo: Support git, branch, force, features, and all-features flags
4 participants