Skip to content

[feature] Use subdirectory for conan cache save content #18259

Open
@mrjoel

Description

@mrjoel

What is your suggestion?

I'd like to propose that conan cache save be updated to store content within a subdirectory of the generated archive. Initial off-the-cuff thoughts for subdir name would be conan, pkgs, or something anywhere along those lines. The name of the directory isn't as important as the purpose.

Having Conan content isolated within a directory would enable usage like we've started doing of embedding some additional archive-related content for user reference. We've included conan graph HTML reports, a README, LICENSE, and similar guidance for what the archive itself represents and how to use it. This has been helpful for inter-organization exchange of archives where most users aren't (and shouldn't be) familiar with internals of Conan in order to use it. Having all of the raw packages listed at top-level makes it hard to identify these additional guiding files we add.

As noted in #18234 (comment), migration would need to be considered for cross-version compatibility even though an experimental feature.

For users not using the archive-level file additions (most users, it's an unofficial abuse of the structure), nothing noticeable would change other than a single top-level directory within the archive.

As an illustration, I'm suggesting switching from the current layout:

conan_cache_save.tgz/
├─ apkg1111111/
├─ b/
│  ├─ apkg1111111
│  ├─ foo_c2222222
│  ├─ foo_d3333333
├─ foo_c2222222/
├─ foo_d2222222
├─ pkglist.json

to the following layout:

conan_cache_save.tgz/
├─ conan/
│  ├─ apkg1111111/
│  ├─ b/
│  │  ├─ apkg1111111
│  │  ├─ foo_c2222222
│  │  ├─ foo_d3333333
│  ├─ foo_c2222222/
│  │  ├─ index.css
│  │  ├─ index.js
│  ├─ foo_d2222222
│  ├─ pkglist.json

upon which we'd insert our additional files like:

conan_cache_save.tgz/
├─ conan/
│  ├─ apkg1111111/
│  ├─ b/
│  │  ├─ apkg1111111
│  │  ├─ foo_c2222222
│  │  ├─ foo_d3333333
│  ├─ foo_c2222222/
│  │  ├─ index.css
│  │  ├─ index.js
│  ├─ foo_d2222222
│  ├─ pkglist.json
├─ contents-graph.html
├─ LICENSE
├─ README.txt

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions