Migrate functionName
to just pipe namedFunction
into name
#1518
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had the thought that with our compositional pipelines,
"funk name"
and"class name"
should just be equivalent to"name funk"
and"name class"
, respectively, as the latter would just expand to function and then get its name. This would simplify implementation, and lead to more consistency.I implemented the migration, and 10 tests fail.
On the bright side, most of the failures reveal inconsistencies in the way we handle
"funk"
vs"name"
vs"funk name"
, ie"funk name"
sees something as a function but"funk"
misses it, and should be fixed, or"name"
is missing something that"funk name"
hits, and should be fixedUnfortunately, there are a couple of test cases that are more problematic. The biggest problem is the C++ test
cursorless/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/cpp/takeClassName3.yml
Line 10 in 65fab51
"class name"
selectsClassName
before the::
, but of course"name class"
breaks because we're not in a class. Not sure what to do about this oneChecklist
functionName
andclassName
fromcursorless/packages/common/src/types/command/PartialTargetDescriptor.types.ts
Lines 75 to 133 in 65fab51
TODO
comment, and remaining more complex modifiers that contain other modifiers