Skip to content

sandydoo's libstore-c: add accessor-based path info API - #16420

Open
roberth wants to merge 9 commits into
NixOS:masterfrom
roberth:feat-query-path-info
Open

sandydoo's libstore-c: add accessor-based path info API#16420
roberth wants to merge 9 commits into
NixOS:masterfrom
roberth:feat-query-path-info

Conversation

@roberth

@roberth roberth commented Sep 3, 2026

Copy link
Copy Markdown
Member

Motivation

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@roberth
roberth requested a review from edolstra as a code owner September 3, 2026 00:59
@github-actions github-actions Bot added documentation c api Nix as a C library with a stable interface labels Sep 3, 2026
auto mutInfo = std::make_shared<nix::ValidPathInfo>(*cppInfo);
mutInfo->references.insert(outPath->path);
mutInfo->references.insert(drvPath->path);
mutInfo->sigs.insert(nix::Signature::parse("key1:c2ln"));

@tomberek tomberek Sep 3, 2026

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.

c2ln feel like it should be a sig parse error?

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.

I guess it works. Length isn't checked until later.

if (!path_info->info->ca)
return nix_set_err_msg(context, NIX_ERR_KEY, "Store path is not content-addressed");
if (callback) {
auto res = renderContentAddress(*path_info->info->ca);

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.

Suggested change
auto res = renderContentAddress(*path_info->info->ca);
auto res = path_info->info->ca->render();

known to be not false a few lines above.

@tomberek tomberek 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.

nothing blocking

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

Labels

c api Nix as a C library with a stable interface documentation

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants