Skip to content

Switch from PrefixRecord to PackageRecord - #1325

Merged
lrandersson merged 3 commits into
conda:mainfrom
lrandersson:dev-ra-info-json-improvement
Aug 13, 2026
Merged

Switch from PrefixRecord to PackageRecord#1325
lrandersson merged 3 commits into
conda:mainfrom
lrandersson:dev-ra-info-json-improvement

Conversation

@lrandersson

@lrandersson lrandersson commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

This PR improves the changes added in #1314. It was noticed that PrefixRecord added much more metadata than necessary which bloated the info.json file. Comparing the two info.json (before/after this implementation) shows about a 70x reduction in file size when using PackageRecord.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@lrandersson lrandersson self-assigned this Aug 11, 2026
@lrandersson
lrandersson requested a review from a team as a code owner August 11, 2026 18:09
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Aug 11, 2026
@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Aug 11, 2026

@marcoesters marcoesters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should be added to the news item.

Technically, this is a hack. PackageRecord and PrefixRecord describe two separate items (an archive file vs an installed package in an environment). Instead of coercing this into PackageRecords, could we just remove the entries we don't need in the dictionary representation/the data dump before we add it into info.json? That way, we stay correct while also removing unnecessary data.

@lrandersson
lrandersson force-pushed the dev-ra-info-json-improvement branch from 942d42d to e9d8bce Compare August 12, 2026 13:06
@lrandersson

Copy link
Copy Markdown
Contributor Author

Good call @marcoesters, see e9d8bce. However regarding the news item, we only modified the existing implementation so I would say it is already covered by https://github.com/conda/constructor/blob/main/news/1314-build-environment-info, or do you disagree?

@marcoesters

Copy link
Copy Markdown
Contributor

However regarding the news item, we only modified the existing implementation so I would say it is already covered by https://github.com/conda/constructor/blob/main/news/1314-build-environment-info, or do you disagree?

Correct. So, the new item should be modified to list both PR numbers, i.e., (#1314, #1325).

@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Approved in 🔎 Review Aug 13, 2026
@lrandersson
lrandersson merged commit 4fc6a93 into conda:main Aug 13, 2026
76 of 82 checks passed
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: 🏁 Done

Development

Successfully merging this pull request may close these issues.

3 participants