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

Fix typos in troubleshooting.md #6365

Merged
merged 2 commits into from
May 8, 2023
Merged

Conversation

DecimalTurn
Copy link
Contributor

@DecimalTurn DecimalTurn commented Apr 11, 2023

Fix typos + Add reference to go-enry's divergences from Linguist.

Fix typos + Add reference to go-enry's divergences from Linguist.
@DecimalTurn DecimalTurn requested a review from a team as a code owner April 11, 2023 01:01
@@ -70,4 +70,4 @@ Grammars will only be updated in patch releases if the patch release is specific

Note: New languages will not appear in GitHub's search results for some time after the pull request has been merged and the new Linguist release deployed to GitHub.com.
This is because GitHub's search uses [go-enry](https://github.com/go-enry/go-enry) for language detection which tends to lag behind Linguist by a few weeks to months.
This in turn requires an update to the underlying search code once go-enry is inline with Linguist.
This in turn requires an update to the underlying search code once go-enry is inline with Linguist (See also go-enry's list of [divergences from Linguist](https://github.com/go-enry/go-enry#divergences-from-linguist)).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this is relevant enough to Linguist to warrant inundating readers with the gory details of portability differences between various regular expression engines. Keep in mind, most users perusing this document are probably in a rush, so they're more likely to expect missing details to be included in pages linked to from a troubleshooting answer.

Copy link
Contributor Author

@DecimalTurn DecimalTurn Apr 15, 2023

Choose a reason for hiding this comment

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

Maybe there is too many elements in that list that won't be relevant to most people, but I think there should be at least a mention that go-enry doesn't support linguist-language overrides in the .gitattrubutes.

Overriding languages and types though .gitattributes is not yet supported. See src-d/enry#18.

I know that I was confused about this multiple times until I discovered that in the list of divergences.

It's especially weird when you click on a language featured in the language stats bar and code search tells you there is no files with that language in the project :/

For example, if you go to the Fortran stdlib repo, the language breakdown tells you it's mostly Fortran, but when you click on it, code search tells you that no Fortran files are found.
image

And all that is because all the Fortran code uses the .fypp extension override in .gitattributes :

*.fypp linguist-language=fortran

Perhaps, this is just a case where the extension should be properly added to Linguist, but there is a lot of cases where the override in the .gitattributes file is the only option and this can lead to some confusion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's especially weird when you click on a language featured in the language stats bar and code search tells you there is no files with that language in the project :/

Wait, so that's the culprit behind all those flaky, confusing code-listings seen when clicking certain languages in project stat-bars? 😕 Finally, I now know where years of “missing” INI files went in my dotfiles repository…

but I think there should be at least a mention that go-enry doesn't support linguist-language overrides in the .gitattributes

This would be more suited to a separate troubleshooting entry explaining why some files aren't being listed when filtering by language (ideally after the “My repository is detected as the wrong language” entry). Such an addition warrants its own PR, however.

In the mean time, we should avoid repeating ourselves; this troubleshooting entry already includes a link to the go-enry repository; users can find their own way to the “Divergences from Linguist” section if they so choose to.

@lildude lildude changed the title Update troubleshooting.md Fix typos in troubleshooting.md May 8, 2023
@lildude lildude merged commit e1c3110 into github-linguist:master May 8, 2023
@github-linguist github-linguist deleted a comment May 15, 2023
@DecimalTurn DecimalTurn deleted the patch-1 branch September 16, 2023 19:05
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 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.

None yet

3 participants