-
Notifications
You must be signed in to change notification settings - Fork 272
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
feat: add edit.dependents
#5466
Conversation
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.
Thanks, this will be good.
We should set up a time soon to sort out the longer-term fix.
For this PR, I think you should
Alternatively, you could
The result should be the same either way. the latter maybe gives a bit more confidence that the new transcript results match the ones you got before merging in trunk. |
bump @mitchellwrosen re merge conflicts |
@aryairani Oops, done now! |
Overview
This PR adds a small variant of
edit
that also grabs all of the thing's transitive dependents. This is intended as sort of a temporary solution to the known issue of ending up in the following situation:foo
depends onbar
depends onBaz
foo
andBaz
are in the scratch fileBaz
is changed in the file but not saved to the codebase yetfoo
are missing names, because it's callingbar
which is still calling old-now-namelessBaz
The fix in this small example is to
edit bar
, but more generally anedit.dependents Baz
here will do what you want – get the full transitive closure of dependents in the file (so that any changes toBaz
are fully propagated within the file).Interesting/controversial decisions
Not very controversial, but I also made it so temporary output messages that are displayed only within a console region are now also visible in transcripts. Ever
merge
in a transcript is now a lot more verbose but I think that's totally fine because transcripts are meant to capture ucm output.Test coverage
I've added a new transcript. I tried just adding onto the end of
edit-command.md
, but was getting really strange results. You can already see in that transcript one instance of spookiness that was worked around just by repeating a stanza. Our transcript runner has some terrible bug.