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

Make max_tree_size configurable per-repository #6806

Merged
merged 2 commits into from
May 10, 2024

Conversation

issyl0
Copy link
Collaborator

@issyl0 issyl0 commented May 1, 2024

Supersedes #6805 since that was from my personal fork.

Description

  • For GitHub Code Scanning functionality, we want to be able to enable Default Setup on more repos. That relies on Linguist for the language detection.
  • We found that in very large repos, the MAX_TREE_SIZE constant was not high enough.
  • This makes the max_tree_size value configurable in both initialize and incremental methods, with a default value of 100,000.
  • ❓ This is my first contribution to Linguist and I have no idea if this is "the way".

Checklist:

  • I am adding new or changing current functionality
    • I have added or updated the tests for the new or changed functionality.

- We want to make Linguist better at detecting all possible languages in very large repos.
- This makes a repository's `max_tree_size` value configurable, with the default still set at 100,000.
@issyl0 issyl0 requested a review from a team as a code owner May 1, 2024 16:47
@lildude
Copy link
Member

lildude commented May 1, 2024

Please leave the merging to me.

@Alhadis Alhadis changed the title Allow configuring a repository's max_tree_size value Make max_tree_size configurable per-repository May 1, 2024
- So that we only have to update the `100_000` tree size value once if we do need to change it.
Copy link

@Pea1594 Pea1594 left a comment

Choose a reason for hiding this comment

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

🥰

@lildude
Copy link
Member

lildude commented May 10, 2024

Merging so we can start conducting testing in prod. I won't be making a new release for this as we can vendor directly off master.

@lildude lildude added this pull request to the merge queue May 10, 2024
Merged via the queue into master with commit 4cc5ef6 May 10, 2024
8 checks passed
@lildude lildude deleted the configurable-repository-max-tree-size branch May 10, 2024 08:37
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Aug 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants