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

clap-v4 support for hab cli #9330

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

Conversation

agadgil-progress
Copy link
Contributor

Starting with some cfg trickery to make sure we continue to build old stuff. Very very experimental.

@agadgil-progress agadgil-progress marked this pull request as draft July 25, 2024 06:22
Copy link

netlify bot commented Jul 25, 2024

👷 Deploy Preview for chef-habitat processing.

Name Link
🔨 Latest commit bd42815
🔍 Latest deploy log https://app.netlify.com/sites/chef-habitat/deploys/66cc40786cbdbb00083afe2f

@agadgil-progress
Copy link
Contributor Author

CHEF-14734

Starting with some `cfg` trickery to make sure we continue to build old
stuff. Very very experimental.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Initial skeleton for `hab pkg` command with Clap v4. This functionality
gets enabled only with `v4` feature (off by default). Thus we continue
to work with existing functionality.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
The command `hab pkg binds <PKG_IDENT>` runs and the outputs with
`clap-v2` and `clap-v4` are comparable. Early still, but we can now
implement more commands like this.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
- Initial implementation of `hab pkg binds`
- Initial implementation of `hab pkg binlink`
- Initial implementation of `hab pkg path`
- Initial implementation of `hab pkg build`

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
- Added `hab pkg config` command
- Added `hab pkg env` command
- Added `hab pkg hash` command
- Added `hab pkg header` command
- Added `hab pkg info` command
- Added `hab pkg verify` command

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Also fixed issue with building on macos due to `#[cfg(....)]` in
`do_build`.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Removed the `hab bldr job` from `main_v2`

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
- Implemented `hab pkg channels` command
- Implemented `hab pkg demote` command
- Implemented `hab pkg dependencies` command
- Implemented `hab pkg download` command
- Implemented `hab pkg promote` command

Also added an API in `PackageSetFile` to get `Vec<PackageSet>` from the
`toml` file.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
It should be possible to make either `v2` or `v4` feature as default.
Initially when we were using `v4`, `v2` was also being used. Now `v4`
can be opted in stand alone without `v2`. This reduces number of
compiled packages by about 15.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
- `hab pkg exec`
- `hab pkg export`
- `hab pkg provides`
- `hab pkg search`
- `hab pkg sign`
- `hab pkg upload`

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
- Added `hab pkg install`
- Added `hab pkg uninstall`

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
1. Added Unit tests for `AuthToken` APIs we are using
2. Added Unit tests for `BldrUrl` APIs we are using
3. Added Unit tests for `PkgDownloadOptions`

This covers unit tests for *new* logic we have written during the
porting activities.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
When exporting a package, if the given package does not exist in the
specified channel (or default channel) we were unwrapping an error,
rather than properly returning it.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
@agadgil-progress agadgil-progress marked this pull request as ready for review August 26, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant