Skip to content

add broken completion case for result #674

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 3 commits into from
Jan 5, 2023
Merged

Conversation

zth
Copy link
Collaborator

@zth zth commented Jan 4, 2023

Accidentally completes from Pervasives when it should complete from Belt.Result.

The resulting path we're completing from becomes result.Pervasives, when we're looking for just result. So the completion ends up being derived from Pervasives.

What do you think is the best way to solve this @cristianoc?

…rom Pervasives when it should complete from Belt.Result
@zth zth requested a review from cristianoc January 4, 2023 17:57
@cristianoc
Copy link
Collaborator

Accidentally completes from Pervasives when it should complete from Belt.Result.

The resulting path we're completing from becomes result.Pervasives, when we're looking for just result. So the completion ends up being derived from Pervasives.

What do you think is the best way to solve this @cristianoc?

I guess that's because that's where result is defined.
The way to go is probably to intercept the path in the same way one intercepts the path to array, and reroute it where it makes sense.

@cristianoc
Copy link
Collaborator

See if it behaves as expected now.

@zth
Copy link
Collaborator Author

zth commented Jan 5, 2023

That's perfect! @cristianoc are there more built ins that might need this treatment that you can think of? I can't come up with any.

@zth zth merged commit 48f58bb into master Jan 5, 2023
@zth zth deleted the result-completion-pervasives branch January 5, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants