dimitarvp

dimitarvp

Can the Elixir team fix the tree-sitter-elixir Rust crate's repository link?

To @jonatanklosko and @the-mikedavis:

I see that there is a Rust crate at crates.io: Rust Package Registry but it is pointing at https://github.com/tree-sitter/tree-sitter-elixir – and that no longer exists.

Can this be fixed to correctly point to GitHub - elixir-lang/tree-sitter-elixir: Elixir grammar for tree-sitter, please? Assuming they are even the same which they might not be.

I am looking into making a PR to GitHub - ast-grep/ast-grep: ⚡A CLI tool for code structural search, lint and rewriting. Written in Rust so Elixir can be included in the semantic / structural code search that this tool provides.

I am asking for this because the project’s Cargo.toml needs a valid crate to point at a language grammar before the small boilerplate required to add a language can work: ast-grep/crates/language/Cargo.toml at 782b175dacaf161cd567538f01929c5e78074e9f · ast-grep/ast-grep · GitHub

/CC @josevalim

Most Liked

dimitarvp

dimitarvp

ast-grep version 0.14.3 has been released and is now supporting Elixir.

Example usage:

# or "ex" for a shorthand name for Elixir.
$ sg -l elixir -p '$A != nil'
dimitarvp

dimitarvp

My PR has been merged.

We’ll have Elixir support in ast-grep come next release (so a matter of days).

dimitarvp

dimitarvp

If anyone is interested, I have also made a PR to have their online playground support Elixir as well: Add Elixir support by dimitarvp · Pull Request #323 · ast-grep/ast-grep.github.io · GitHub.

And it’s merged.

Meaning that you can visit Playground | ast-grep and try out stuff without installing the tool.

shanesveller

shanesveller

Notably you cannot publish a release to crates.io if it contains any git dependencies, so many packages that are actually CLIs or other end-user applications may forbid introducing such changes. On the projects’ side the stance is mainly motivated to protect the ability to cargo install the package by name.

I knew this from past friction; and Specifying Dependencies - The Cargo Book mentions that near the bottom of that section, but I couldn’t trivially find a page directly on crate.io to cite.

dimitarvp

dimitarvp

tree-sitter-elixir has been fixed to have its correct GIT URL on crates.io.

I’ll proceed to enrich the tests in my PR and we’ll have Elixir support for ast-grep very soon.

Where Next?

Popular in Proposals: Ideas Top

martosaur
TL;DR Logger.Translator acts as a global filter and swallows structure of some OTP reports, which some logger handlers could benefit from...
New
rhcarvalho
Hi all, I would like to gather some feedback before a more intentional proposal to add a new :depth option when specifying a Git depende...
New
cevado
Being able to build nested relations in a schemaless changeset would be helpful to deal with complex forms on Phoenix without the need to...
New
jakeprem
Goal: To make JS.patch and JS.navigate more interoperable with JS.push. Scenario: Imagine making a reusable Phoenix component and you wa...
New
maxpohlmann
In our application, we have many structs that contain lists of floats and, especially in test, we often use pattern matching on these obj...
New
pdgonzalez872
Hi! There has been some discussion about hiring/jobs on here and I thought about running this by everyone. I wanted to try to help recr...
New
dimitarvp
To @jonatanklosko and @the-mikedavis: I see that there is a Rust crate at crates.io: Rust Package Registry but it is pointing at https:/...
New
RobinBoers
Hi. We had a few issues in our project regarding mix tasks, where we expected the items in the @requirements module tag to have been exec...
New
mikesax
I was writing code that included a function I would call later (so it wasn’t called yet). I got a warning, and I thought I could put an u...
New
pejrich
I propose adding compact_map/2 to the Enum module. What is it? Sometimes you want to map over a collection, but sometimes you want to ma...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New

We're in Beta

About us Mission Statement