-
Notifications
You must be signed in to change notification settings - Fork 274
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
Revive debug.find.global and debug.names.global #5258
Conversation
@@ -45,7 +45,5 @@ scratch/main> names term1 | |||
Term | |||
Hash: #8hum58rlih | |||
Names: term1 term2 | |||
|
|||
Tip: Use `names.global` to see more results. |
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.
I removed this tip because it's not going to be a reasonable course of action in most cases 🤷🏼♂️
e7313a8
to
f9db384
Compare
Huh, the reflog transcript failed and it's completely unrelated (a re-run fixed it), two entries swapped places from the saved reflog output, so I'm guessing it's just a matter that the operations happened faster than the resolution of timestamps we're saving in Sqlite, maybe they got the exact same timestamp and so sorted in a different order 🤷🏼♂️ |
debug.find.global | ||
`find` lists all definitions in the | ||
current namespace. | ||
`find foo` lists all definitions with a | ||
name similar to 'foo' in the | ||
current namespace (excluding | ||
those under 'lib'). | ||
`find foo bar` lists all definitions with a | ||
name similar to 'foo' or | ||
'bar' in the current | ||
namespace (excluding those | ||
under 'lib'). | ||
`find-in namespace` lists all definitions in the | ||
specified subnamespace. | ||
`find-in namespace foo bar` lists all definitions with a | ||
name similar to 'foo' or | ||
'bar' in the specified | ||
subnamespace. | ||
find.all foo lists all definitions with a | ||
name similar to 'foo' in the | ||
current namespace (including | ||
one level of 'lib'). | ||
`find-in.all namespace` lists all definitions in the | ||
specified subnamespace | ||
(including one level of its | ||
'lib'). | ||
`find-in.all namespace foo bar` lists all definitions with a | ||
name similar to 'foo' or | ||
'bar' in the specified | ||
subnamespace (including one | ||
level of its 'lib'). | ||
debug.find.global foo Iteratively searches all | ||
projects and branches and | ||
lists all definitions with a | ||
name similar to 'foo'. Note | ||
that this is a very slow | ||
operation. | ||
|
||
debug.names.global | ||
`debug.names.global foo` Iteratively search across all | ||
projects and branches for names matching `foo`. Note that this | ||
is expected to be quite slow and is primarily for debugging | ||
issues with your codebase. | ||
|
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.
I guess all of the find variants print this whole thing? They should probably just print ... a subset, and maybe reference a help-topic that lists all the variants of find
?
Overview
Re-adds
find.global
andnames.global
asdebug.find.global
anddebug.names.global
respectively. I felt it was prudent to add thedebug
prefix because using these commands is likely to be a pretty bad experience (they're very slow) and I don't want folks thinking they're commands they should be using all the time.These commands are effectively equivalent to running their corresponding
names
orfind
command at the root of every single project branch.It does NOT search through history (IIRC the originals didn't either).
It DOES include lib in each search.
Implementation notes
Interesting/controversial decisions
I think we should hide these behind
debug.*
, but you may disagree.Test coverage
Revived existing transcripts