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

[question][2.0] Failed to use "conan inspect <pkg>/<version>" command to inspect the package? #12532

Closed
hwhsu1231 opened this issue Nov 14, 2022 · 1 comment

Comments

@hwhsu1231
Copy link

Problem Description

Before Conan 2.0, I usually use conan inspect command to check all the available options of a package. For example, running conan inspect glew/2.2.0 command:

Click to expand logs
C:\Users\hwhsu1231>conan --version
Conan version 1.54.0

C:\Users\hwhsu1231>conan inspect glew/2.2.0
name: glew
version: 2.2.0
url: https://github.com/conan-io/conan-center-index
homepage: http://github.com/nigels-com/glew
license: MIT
author: None
description: The GLEW library
topics: ('glew', 'opengl', 'wrangler', 'loader', 'binding')
generators: ['txt']
exports: None
exports_sources: None
short_paths: False
apply_env: True
build_policy: None
revision_mode: hash
settings: ('os', 'arch', 'compiler', 'build_type')
options:
    fPIC: [True, False]
    shared: [True, False]
    with_egl: [True, False]
default_options:
    fPIC: True
    shared: False
    with_egl: False
deprecated: None

However, I found that this command failed with Conan 2.0:

Click to expand logs
C:\Users\hwhsu1231>conan --version
Conan version 2.0.0-beta5

C:\Users\hwhsu1231>conan inspect glew/2.2.0
ERROR: Conanfile not found at C:\Users\hwhsu1231\glew\2.2.0

After searching in the repository, I found this issue and its related PR:

According to the issue and the PR, there are some changes about conan inspect command syntax. However, it still failed with the following example commands. What should I do to reproduce the usage of conan inspect command of Conan 1.0 when using Conan 2.0?

C:\Users\hwhsu1231>conan inspect --reference=glew/2.2.0 --remote=conancenter
usage: conan inspect [-h] [-f FORMAT] [-v [V]] [--logger] path
conan inspect: error: the following arguments are required: path
ERROR: Exiting with code: 2
C:\Users\hwhsu1231>conan inspect --reference=glew/2.2.0 --cache
usage: conan inspect [-h] [-f FORMAT] [-v [V]] [--logger] path
conan inspect: error: the following arguments are required: path
ERROR: Exiting with code: 2

Environments and Versions

  • OS+version: Windows 11
  • Conan version: 2.0.0-beta5
@hwhsu1231 hwhsu1231 changed the title [question] 2.0 How to use "conan inspect" command to inspect the package? [question] 2.0 Failed to use "conan inspect <pkg>/<version>" command to inspect the package? Nov 15, 2022
@hwhsu1231 hwhsu1231 changed the title [question] 2.0 Failed to use "conan inspect <pkg>/<version>" command to inspect the package? [question][2.0] Failed to use "conan inspect <pkg>/<version>" command to inspect the package? Dec 3, 2022
@AbrilRBS
Copy link
Member

Hi! Sorry about the radio silence. I guess you've solved this by now, but posting here for posterity:
conan inspect needs a path in Conan 2 - This works well in conjunction with conan cache path to get specific folders for any reference in the current cache

Closing this as solved, feel free to reopen/create a new issue should you have any other questions or requests, thanks!

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

No branches or pull requests

2 participants