Skip to content

Conversation

@caspervk
Copy link
Contributor

Adds a checkmark to identify whether or not packages have signatures.

image

This is useful for inspecting which packages are available in caches and which ones have to be built locally. Debugging cache-misses in this way may be misleading if packages have preferLocalBuild = true. Future work could include visualising this too.

@caspervk
Copy link
Contributor Author

This probably needs better documentation, and I also don't know anything about Haskell. Consider this a proposal for discussion rather than a production-ready PR.

@caspervk caspervk closed this Dec 30, 2024
@caspervk caspervk reopened this Dec 30, 2024
@utdemir
Copy link
Owner

utdemir commented Jan 5, 2025

Code-wise it looks production ready to me!

I'm just thinking about the documentation, as you suggested. As it's hard to understand what that checkbox means from the UI.

So it's probably worth just adding a note to the bottom panel. I'm happy to do that if you are not familiar with Haskell.

However I'm not as familiar with the signatures - what would be the correct wording to put there? Is it just a phrase like "Signature available", or is it more like "3 signatures available" or like "signed by X" or something?

@caspervk
Copy link
Contributor Author

caspervk commented Jan 7, 2025

I already have a Signatures: ✓ in the bottom panel to link the checkmark indicator to an actual word, but it was intended more as a placeholder until I could get your feedback. For my personal usecase -- identifying cache-misses -- describing the checkmark as a cache miss/hit would make more sense, but it's probably better to stay closer to the Nix data structure for those who are actually familiar with the internals of Nix.

Your "signed by" idea is really good. The checkmark enables quickly identifying cache-misses in the tree, and the Signed by: cache.nixos.org in the bottom panel is a hint that signature => cache hit, while potentially also adding additional useful information for Nix experts. I tried to add it, but it needs some cleanup 😬

Please feel free to make any changes and improvements (such as reimplementing all of it in idiomatic Haskell) as you see fit!

@utdemir utdemir merged commit e75f74a into utdemir:main Jan 8, 2025
2 checks passed
@utdemir
Copy link
Owner

utdemir commented Jan 8, 2025

Thanks for the PR and the followups! I just moved Signature: to a new line, and refactored the parsing part a bit, and pushed it: 42849b0 (I couldn't push it to your branch so I kept your commit separate and added my changes on top so this PR shows up as merged).

I'll fix a couple of things and cut a new release, hopefully today :).

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

Successfully merging this pull request may close these issues.

2 participants