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] URI/URL scheme for a file within a conan package #16142

Open
1 task
naggerx opened this issue Apr 24, 2024 · 1 comment
Open
1 task

[question] URI/URL scheme for a file within a conan package #16142

naggerx opened this issue Apr 24, 2024 · 1 comment
Assignees

Comments

@naggerx
Copy link

naggerx commented Apr 24, 2024

What is your question?

Hi. We often have to handle references to (local) conan packages or files within a package and also sometimes to a package on a specific conan-remote.

Does anybody already came up with a reasonable URI/URL scheme describing (all of) these?
(https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax)

Maybe something like:
conan:hello/0.1@demo/testing:subfolder/file.txt?profile=linux_x64_gcc9
conan:hello/0.1@demo/testing/conanfile.py?export_folder=yes
conan://hello%2F0.1%40demo%2Ftesting/subfolder/file.txt
conan://remote-name/hello/0.1/demo/testing/package/subfolder/file.txt
conan:/hello/0.1/demo/testing/package/subfolder/file.txt
conan+remote://user:apikey@server.com/artifactory/remote-name/user/pkg/version/channel/0/package/d53d7c15c44c2f2bb180d10b263b08746a2dd85b/subfolder

The package id should be optional, since often the profile and options are known by context.
(I'm only interested in the definition of the scheme - not a library/function resolving these URLs.)

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded
Copy link
Member

Thanks for your question @naggerx

There is no URI/URL scheme, and I think this is not planned, most likely not even wanted. Packages are "moving" entities, and they can exist and have multiple copies in different remotes, servers, and Conan client caches.

The identifier of a package in Conan has different parts: name/version@user/channel#recipe-revision:package-id#package-revision, being the last 3 unique hashes to guarantee the integrity and uniqueness of the contents. This entity can exist in the Conan cache, then be uploaded to a server, that will store it in the way it likes, but without needing an external URL. The URI for the resource is exactly that name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants