Skip to content

Reworked weak target #888

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

Merged
merged 43 commits into from
Jul 28, 2022
Merged

Reworked weak target #888

merged 43 commits into from
Jul 28, 2022

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Jul 24, 2022

Fixes #883
Fixes #882

Checklist

  • Add checkboxes to issues that will unlock additional test cases for cells in our spreadsheet
  • I have added tests

@AndreasArvidsson AndreasArvidsson changed the title Renamed weak target, Renamed is weak, Added explicit range attribute Renamed weak target Jul 24, 2022
@AndreasArvidsson AndreasArvidsson changed the title Renamed weak target Reworked weak target Jul 24, 2022
@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Jul 24, 2022

@pokey Tests added. Some test or not currently possible. For example "inside funk", or modifiers after range. I also don't have "funk wrap and "snip funk" wired up. Could you please add those tests?

@AndreasArvidsson AndreasArvidsson marked this pull request as ready for review July 24, 2022 12:08
@AndreasArvidsson AndreasArvidsson requested a review from pokey as a code owner July 24, 2022 12:08
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Haven't reviewed tests yet but overall looks like what we agreed on. Left a few comments

@AndreasArvidsson
Copy link
Member Author

okay updated

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah looking better. Few more minor comments then I'll have a look at the tests and we should be good to go!

@pokey
Copy link
Member

pokey commented Jul 24, 2022

@pokey Tests added. Some test or not currently possible. For example "inside funk", or modifiers after range. I also don't have "funk wrap and "snip funk" wired up. Could you please add those tests?

sure happy to record the snippet ones.

For "inside funk", we're actually looking for a scope type that doesn't have an "inside" to ensure that it doesn't expand to containing pair, right? I don't see why we can't test that today. Would just be an error test. Tbh would prob be better not to use "funk" because that will break when we support inside "funk". Maybe better to use "inside token"?

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Jul 24, 2022

I think I've added all the test I can now

  1. Our test recorded doesn't record breakpoints. But it's the same implementation(containingLineIfUntypedStage) for expansion as pour and clone.
  2. The implementation of that mark is functionally the same as cursor.
  3. Functions leading and trailing delimiter range is the same as token so hard to record anything useful for leading/trailing. Used line instead.
  4. Added token tests for inside and bounds instead of function as we talked about

Comment on lines +2 to +8
// NB: We import `Target` below just so that @link below resolves. Once one of
// the following issues are fixed, we can either remove the above line or
// switch to `{import("foo")}` syntax in the `{@link}` tag.
// - https://github.com/microsoft/TypeScript/issues/43869
// - https://github.com/microsoft/TypeScript/issues/43950
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { Target } from "../../typings/target.types";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of annoying, but this was the best I could come up with cc/ @AndreasArvidsson @auscompgeek

@pokey pokey mentioned this pull request Jul 27, 2022
1 task
@AndreasArvidsson AndreasArvidsson merged commit 5694551 into main Jul 28, 2022
@AndreasArvidsson AndreasArvidsson deleted the reworkIsWeek branch July 28, 2022 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants