Open pchiusano opened 10 months ago
@pchiusano I think view
does work with full term/decl hashes, but not namespace hashes. Is that what used to work?
@mitchellwrosen Github is hiding the lower part of the log but you can scroll down, it looks like diff.namespace
is constructing the numbered args as hash-only instead of hash-qualified names. (Edit: this is expected)
@pchiusano view
should work with full hashes but only if the hash is in your current namespace; I'm guessing they're not, they're just in the older namespaces?
It's tricky because we could change view
to be able to display hashes that aren't in your namespace, but where do we get the names for the dependencies? view
only really makes sense in the context of a specific namespace. We could try it in the current namespace, but it might just be hashes. Or we could have a separate command for it view.in #nshash #defnhash
:shrug:
For a start, I'd just have view
work for hashes not in your namespace, and just use the current namespace to provide names. In the worst case scenario you see some hashes, but it's still handy - you shouldn't have to switch namespaces just to view a hash.
Even better would be if diff.namespace
suggested diff.term
or diff.type
, which would Just Work when passed any two numbered arguments presented in the diff.namespace
output. The numbered args for diff.namespace
could be something with a bit more information, which diff.term
could use to find names.
Oh! I see: diff.namespace
is outputting numbered args like this:
<causal-hash>:<name><term-hash>
and view
doesn't like those.
@mitchellwrosen No, I think it's outputting them like <term-hash>
, but view
likes those, but only if <term-hash>
appears in the current namespace.
Oh? Am I looking at the wrong output above? Where's the <term-hash>
?
Also, I can't reproduce the behavior of view
requiring the hash you give it to exist in the current namespace. Do you have a transcript for that?
@mitchellwrosen Sorry, I misread the output above, you're right.
So actually it's great that it tells us what namespace the term existed in, because then we can make our PPE. But the whole PPE situation (this issue, ongoing work, etc.) feels overly complicated. I wonder if we can come up with a theory that's simple and easy to implement. Something that includes scratch files, namespaces, paths, hashes, lol.
For the short term, maybe we could make view
be able to parse that kind of argument? [[<nshash/causalhash>:][.]<path>][#term-hash]
and then ignore parts of it?
The history browsing experience has never been great, but it could be improved to "functional" with these fixes -
This is not great since you typically want to be able to view the definitions in the diff.
Sadly
view
does not seem to work for full hashes. This used to work, I'm curious what happened.