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

Inconsistent aqua list output #3201

Open
mpal9000 opened this issue Oct 25, 2024 · 5 comments
Open

Inconsistent aqua list output #3201

mpal9000 opened this issue Oct 25, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mpal9000
Copy link

aqua info

$ aqua info
{
  "version": "2.36.2",
  "commit_hash": "716d9ac6f2de2beffe0db87caf418443155170ab",
  "os": "linux",
  "arch": "amd64",
  "pwd": "/home/(USER)/tmp/aqua-test/a",
  "root_dir": "/home/(USER)/.local/share/aqua",
  "env": {
    "AQUA_DISABLE_LAZY_INSTALL": "true",
    "AQUA_GLOBAL_CONFIG": "/home/(USER)/.config/aqua/aqua.yaml",
    "AQUA_POLICY_CONFIG": "/home/(USER)/.config/aqua/policy.yaml",
    "AQUA_ROOT_DIR": "/home/(USER)/.local/share/aqua"
  },
  "config_files": [
    {
      "path": "/home/(USER)/tmp/aqua-test/a/aqua.yaml"
    }
  ]
}

Overview

In aqua generate command's help there is an example for generating configuration, using the output of aqua list command. I.e. aqua list | aqua generate -f -. But when using aqua list --installed | aqua generate -f - instead (with the --installed option) it doesn't work, because the output of aqua list is formatted differently.

How to reproduce

aqua.yaml

---
checksum:
  supported_envs:
    - linux
registries:
  - type: local
    name: local
    path: registry.yaml
packages:
  - name: ziglang/[email protected]
    registry: local

Executed command and output

$ aqua list | aqua generate -f -
WARN[0000] skip adding a duplicate package               aqua_version=2.36.2 env=linux/amd64 package_name=ziglang/[email protected] package_registry=local package_version= program=aqua
- name: nodejs/[email protected]
  registry: local
$ aqua list --installed | aqua generate -f -
FATA[0000] aqua failed                                   aqua_version=2.36.2 env=linux/amd64 error="unknown package" package_name="standard,ziglang/zig\t0.13.0\tlocal" program=aqua

Debug output

No response

Expected behaviour

I would expect the output of aqua list and aqua list --installed to be formatted in the same way, in order to be used as an input to aqua generate.

Actual behaviour

$ aqua list
local,nodejs/node
local,ziglang/zig
$ aqua list --installed
ziglang/zig	0.13.0	local

Note

No response

@mpal9000 mpal9000 added the bug Something isn't working label Oct 25, 2024
@mpal9000
Copy link
Author

To avoid opening a new issue, I'm using the above pipeline in order to check for updates. Since there is no standalone command for that. It would be nice though if there was an aqua check updates or aqua outdated command. With better output like showing current, new, latest versions, etc.

@suzuki-shunsuke
Copy link
Member

Why do you want to run aqua list --installed | aqua generate -f -?
aqua generate generates codes to add packages to aqua.yaml, but packages outputted by aqua list --installed have already been added to aqua.yaml.

@suzuki-shunsuke
Copy link
Member

Oh, sorry. I missed your comment.

To avoid opening a new issue, I'm using the above pipeline in order to check for updates. Since there is no standalone command for that. It would be nice though if there was an aqua check updates or aqua outdated command. With better output like showing current, new, latest versions, etc.

@suzuki-shunsuke
Copy link
Member

aqua up updates packages, and if aqua.yaml isn't updated it means no package is updated.

@mpal9000
Copy link
Author

Yes, but I want to have a command to just check for updates. Without applying them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants