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
Prolog interpreted as Perl #435
Comments
Yep, known issue. Hope to have some fixes here and in related mis-categorizations soon. |
Linguist is once again misclassifying Prolog files as Perl files. This is a quite recent regression, possibly introduced today. |
The problem seems to be that all samples of Prolog source code have been deleted from the repository! |
Culprit is commit f6034b8. Allow me to make this cristal clear: nobody in the Prolog programming community is using |
Please take a look at relevant commits over the past two days. Thanks. |
The removed samples provided a much more comprehensive coverage of the Prolog language compared with the two samples that replaced them. That said, only recalculating the language statistics of a few repositories with Prolog source code will show the existence of possible issues. I can point out some of these repositories for testing if necessary. |
Is the new code already in use? All the repositories with a Prolog code and zero Perl code are still misclassified. See e.g. https://github.com/LogtalkDotOrg/logtalk3 and https://github.com/pdt-git/public |
A couple of examples of repositories with no Perl code, only Prolog code, and showing wrong language statistics are https://github.com/Anniepoo/prolog-examples and https://github.com/ganeshkumaruk/Prolog |
+1 please identify .pl files as Prolog when they are Prolog. |
Bump up for Prolog files still being incorrectly identified. |
+1 |
Please sir, may we have an extension? |
+1 please identify .pl files as Prolog when they are Prolog. |
+1 also experiencing this on my repository: https://github.com/jansegre/jwar which contains some prolog and no perl at all. |
+1 here as well. Two of my repositories which only contain Prolog code, no Perl but the code got identified as Perl. In https://github.com/luiscleto/feup-plog-hanjie-solver, some files got detected as Prolog, but most didn't. |
+1 |
Just to let you know, we're still frustrated by this. |
And it's still an issue. It looks like my newer code is being correctly classified, but my older code is still listed as Perl. |
Maybe the language statistics are only recalculated on new commits? |
I don't think this is fixed... |
Can you link to a file that's being incorrectly classified? |
https://github.com/jansegre/jwar this one still reports perl |
Ah ok. It hasn't been updated for over a year and language stats are only updated when a push is made to the code. |
I'll make a dummy push then. Thanks. On Sun, Nov 8, 2015, 12:24 Arfon Smith notifications@github.com wrote:
|
we're accumulating a bunch of them that are misclassified again https://github.com/search?l=perl6&p=5&q=put_attr&type=Code&utf8=%E2%9C%93 |
@Anniepoo - looks like the |
Thanks for the quick analysis! |
got a recruit to do a fix, stay tuned |
Great. Now it thinks one of my perl programs is a Prolog program! >:-( |
@batchmcnulty , can you point us at the file(s)? Should we open a new bug? This one's closed |
Thanks - was happening to uberscan at https://github.com/batchmcnulty/uberscan but I've fixed it by adding the .gitattributes file containing this text:
which seems to fix the problem. phew |
It's not a Prolog program, so unless I'm missing something, breaking it for Prolog isn't a problem. It's a Perl program so it only runs on Perl. If you tried to run it as a Prolog program, you'd be out of luck anyway, right? O.o |
Oh, neat! I didn't know about this. 8cD will spread in prolog community. |
and re 'its not a Prolog program, so...' , yeah , I misunderstood |
+1. After 5 (sic!) years this is still relevant: https://github.com/mxw/vim-prolog |
@egryaznov from my understanding, the repository needs to receive a push to trigger linguist to run, so that one will stay like that if left untouched. |
Correct. We do not go back and update the cached language stats whenever we update Linguist as this would be prohibitively resource intensive to do this for every repo on GitHub.com. That repo hasn't been touched in over 5 years and thus shows the results of the last analysis. Linguist has moved on quite a bit in that time and if you fork that repo, a new analysis will be performed on the fork and you'll see the |
I still get this! Only workaround is to call your files |
@vagman can you please open a new issue linking to your repo experiencing this as Prolog uses the ... so if it's not detecting your files correctly, something else may be at play here. |
It's now May 2021!!!! Hello is anything being done to fix this? My PERL files are showing up as Prolog just simply because they have a .pl filename extension! :( https://github.com/ProphetPX/PF1eCharBuilder/ |
@ProphetPX Poetic justice? Given that Prolog was using the
You may need to push some commits to this solution to take effect, however. Hope this helps. |
It is indeed May 2021 and Linguist still relies on the community for constructive contributions for discrepancies like this. That said, you kinda made it harder for Linguist than it really needs to be, even before the extension is taken into account: your first line is not a valid shebang and looking for the shebang is the first thing Linguist does. Fixing your shebang will solve your issue. I've sent you a PR for the fix 😁. |
.pl
files containing prolog code are often classified as Perl.Related to #394, which basically makes the page listing the most popular Prolog repos completely pointless as exactly none of the projects listed there contain any Prolog source files...
The text was updated successfully, but these errors were encountered: