Skip to content
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

Target hints: only load targets from subdir #6603

Merged
merged 3 commits into from
Dec 5, 2022
Merged

Conversation

emillon
Copy link
Collaborator

@emillon emillon commented Nov 29, 2022

The main content of this PR is an optimization: instead of loading all targets and filtering, we start with only the right subdirectory.

@emillon
Copy link
Collaborator Author

emillon commented Nov 29, 2022

@snowleopard I implemented the suggestion in your CR regarding directory targets. I first tried to add "a, b (directory target)" but this wasn't printing because this relies on edit distance to determine which candidates to keep. So I just added a / suffix for directory targets. That might end up more confusing. Let me know what you think.

Copy link
Collaborator

@snowleopard snowleopard left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this! I left some comments.

It seems to me that we can get a more user-friendly output if treat file and directory targets separately. Do you think it could work?

This is an optimization: instead of loading all targets and filtering,
we start with only the right subdirectory.

Signed-off-by: Etienne Millon <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
Signed-off-by: Etienne Millon <[email protected]>
Copy link
Collaborator

@snowleopard snowleopard left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@emillon emillon merged commit f6c0e39 into ocaml:main Dec 5, 2022
@emillon emillon deleted the target-hints branch December 5, 2022 16:47
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