Skip to content

Add Leo #6970

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

Merged
merged 3 commits into from
Jun 2, 2025
Merged

Add Leo #6970

merged 3 commits into from
Jun 2, 2025

Conversation

d0cd
Copy link
Contributor

@d0cd d0cd commented Jul 26, 2024

This PR adds Linguist support for the Leo progamming language. Leo is a high-level language that allows developers to use zero-knowledge proofs in their applications while abstracting away the cryptographic complexities. Leo programs are compiled into Aleo instructions, which can be executed on the Aleo blockchain.

References

Checklist

Closes #6900

@d0cd d0cd requested a review from a team as a code owner July 26, 2024 21:38
@d0cd d0cd mentioned this pull request Jul 26, 2024
5 tasks
@lildude lildude changed the title Add Linguist support for Leo. Add Leo Aug 5, 2024
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

This PR is missing the cached license file generated by this line in the add-grammar script:

linguist/script/add-grammar

Lines 133 to 134 in 39fd5e9

log 'Caching grammar license'
bundle exec licensed cache -c vendor/licenses/config.yml

Please add it.

@d0cd d0cd requested a review from lildude August 6, 2024 18:15
@lildude
Copy link
Member

lildude commented Aug 14, 2024

The extension of the new language is used in hundreds of repositories on GitHub.com. https://github.com/search?q=path%3A*main.leo+NOT+owner%3AProvableHQ++NOT+owner%3AAleoNet+NOT+is%3Afork&type=code&p=3. Note that the main.leo file is expected to occur once per repository, which meets the requirements outlined #5756.

This PR is not adding support for a single file, it's adding support for an extension which means the extension criteria applies and as with #6969, it appears quite common for a repo to contain multiple .leo files.

It seems quite common for .leo files to mention aleo so adding that to filter out files which clearly aren't Leo (there are a lot of XML files using this extension) indicates things are nearly there.

@DecimalTurn
Copy link
Contributor

Closes #6900

@DecimalTurn
Copy link
Contributor

DecimalTurn commented Apr 22, 2025

Might be worth adding a heuristic like ^\s*program\s*[a-zA-Z_0-9\.]*\s*\{ to match the program declaration at the top of .leo files. This would give 1.9k files at the moment which is less than 50% of all .leo files.

@lildude
Copy link
Member

lildude commented Jun 2, 2025

Might be worth adding a heuristic like ^\s*program\s*[a-zA-Z_0-9\.]*\s*\{ to match the program declaration at the top of .leo files. This would give 1.9k files at the moment which is less than 50% of all .leo files.

The heuristic wouldn't have any effect as this language is the only one with the .leo extension. It does however confirm popularity is now good to go.

@d0cd Please merge in main. I can't because your PR has come from an org-owned repo.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

Important

The changes in this PR will not appear on GitHub until the next release has been made and deployed. See here for more details.

@lildude lildude enabled auto-merge June 2, 2025 09:16
@d0cd
Copy link
Contributor Author

d0cd commented Jun 2, 2025

Thanks @lildude! We'll get this updated and merged in by Friday (earlier, if needed).
Are there any deadlines on your end on cutting the next Linguist release?

@lildude
Copy link
Member

lildude commented Jun 2, 2025

@d0cd I need to make the release by the end of Thursday, UK time, at the latest.

@d0cd
Copy link
Contributor Author

d0cd commented Jun 2, 2025

Sounds good @lildude, we'll have it in ASAP!
There have been a few updates to the language since making this PR.
Do you recommend folding those in to this PR or holding off to another one?

@lildude
Copy link
Member

lildude commented Jun 2, 2025

Do you recommend folding those in to this PR or holding off to another one?

It depends. If this is just updating the samples, or grammar (not needed unless it's a completely new repo as we update all grammars with each release) then this PR is fine. If it's modifying the extensions, then any new ones are likely to hold up this PR even longer.

Once this has been merged, users can always use an override for any new extensions.

@d0cd
Copy link
Contributor Author

d0cd commented Jun 2, 2025

Got it, we have some grammar updates and a color change but if the release process updates the submodule, then it should be fairly straightforward!

@lildude lildude added this pull request to the merge queue Jun 2, 2025
Merged via the queue into github-linguist:main with commit c727264 Jun 2, 2025
5 checks passed
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.

Leo
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy