-
Notifications
You must be signed in to change notification settings - Fork 12
feat: display src file location next to the version for each derivation #452
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
Conversation
| rev = urllib.parse.quote(derivation.parent_evaluation.commit_sha1) | ||
| # position is something like `/tmp/tmpfh7ff2xs/pkgs/development/python-modules/qemu/default.nix:67` | ||
| position_match = re.match( | ||
| r"/tmp/[^/]+/(.+):(\d+)", derivation.metadata.position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't scale with #451, because where we evaluate is essentially a runtime configuration, but which may change between deployments... :/
@RaitoBezarius maybe we can scrape that out already at evaluation time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I understand. Makes the distinction pretty much impossible then, right? I'll add a FIXME for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the eval store is in memory, I don't see why we cannot do that computation, it's just a string clean up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need to know the location then. Is the config value accessible in cache_suggestions? Also this would mean that all evaluations get invalidated, once you change the location of the eval store.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config value is accessible but in case of config change will get invalidated. This is why we should do it earlier where we know the value at the time. But also I just realised this is not necessary config store but location of the Nixpkgs checkout, so this can definitely just stripped off during eval-ingestion. We'll leave it at that now because it won't help for the demo.
6528895 to
b99ce0e
Compare
b99ce0e to
036aed4
Compare

Closes #440
The code should be robust for e.g.nixpkgs-darwin-24.11andnixos-24.11-smallto have different revisisions, though I never see any difference between these. Probably just because they evaluation did actually happen on the same commits?