-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add Euphoria language #5241
Add Euphoria language #5241
Conversation
Apparently I didn't properly commit the git submodule for vscode-euphoria, probably because I synced my fork at some point and left that out. I've committed the submodule now, and that corrected the failing Ruby tests. I'm still not sure how to correct the cross-validation test. I'm not even sure what's wrong. Running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great. Thanks. 🙇 One nit about the extensions inline and an explanation for the failing test:
The classifier test uses just the samples in Linguist to test the classifier in isolation. It is failing because the classifier is detecting the Elixir/function.ex
file as Eurphoria (it's buried here):
Elixir/function.ex BAD (Euphoria)
This will be happening because the content of that sample matches more attributes of Euphoria based on the samples provided than Elixir, which isn't really surprising because Elixir has only one other file and it's teeny weeny and really not representative of the language.
The solution is to add another Elixir .ex
file that is a good representation of the language.
This wasn't an issue before now because Elixir was was added to Linguist many many years before we started curating samples so one wasn't added and it was the only language using .ex
until now 😁 .
And thanks the for the pointer that the docs are missing mention of running this test.
I added several more samples for Elixir and that seems to have pleased the cross-validation script. 👍 |
Oops, didn't realize I need to mark that resolved. Also pulled in the latest change from upstream. 👍 |
Just to clarify, is there anything else needed from my end to get this accepted? |
Not at the moment thanks. @Alhadis may have some suggestions around the regexes when he gets a chance to have a look, but nothing else is needed at the mo. |
Nudge |
Crap. 😞 Sorry. I'll have a look now. |
Nudge @ghaberek 😉 |
Co-authored-by: John Gardner <gardnerjohng@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these samples are massive because it appears (from my naïve perspective) that they contain a lot of comments and a fair amount of duplication.
Please swap these for smaller samples with fewer/smaller comments.
All set. Unless those are still too big? A lot other files in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better samples, thanks. 🙇
Oh, maybe not. |
So I just need to provide some |
Update: Whoops, yes... for that error. For the current failures: I think you need to improve your heuristic as it's not detecting one of the files you're supplying correctly so leaving it to chance with the classifier. If we're going to add samples, it would be for Eiffel as there are only 3 very old samples, but I think improving the heuristic would be a better approach for now. |
I figured that so added more Euphoria samples with
The original Eiffel heuristic I added was only looking for left-anchored keywords, but since any Eiffel keyword is also a valid identifier in Euphoria, things like
I've added a few more Eiffel samples. |
Thanks for accepting this! It's going to be a big help to our community. It looks like syntax highlighting is working now on Euphoria files in my projects, but I'm not seeing the "Languages" statistic update on anything yet. What does it take to make that happen? |
Strange. I went back to the OpenEuphoria page and it was correct there as you showed but not on the Euphoria project itself. I just took this screen shot. But then I did a |
You need to push a change to the repo that will cause a re-analysis. Changes to |
Description
Add support for the Euphoria language (website, github). We have been gradually migrating development of Euphoria onto GitHub but the frequent mis-classification by linguist makes it look like we're using a handful of other languages (namely E, Eiffel, and Elixir) due to extension collisions. Euphoria primarily uses .e for include files and .ex for programs. These changes should correct that. I've done some diligence in correcting new false-positives by adding a sample for Elixir and several patterns to the heuristics, although admittedly I am not nearly as familiar with those other languages. I did test linguist against several larger Eiffel and Elixir repositories.
Checklist: