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

Support for Dart/Flutter? #1089

Open
alreadyarrived opened this issue Aug 14, 2024 · 13 comments
Open

Support for Dart/Flutter? #1089

alreadyarrived opened this issue Aug 14, 2024 · 13 comments
Labels
question Further information is requested

Comments

@alreadyarrived
Copy link

Issue

Hi, looking at the supported languages on https://aider.chat/docs/languages.html, it does not list Dart / Flutter as one. Wondering if you could consider being able to generate a repository map for it? thank you!

Version and model info

No response

@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and filing this issue.

Did you read the section of that web page about adding language support?

@paul-gauthier paul-gauthier added the question Further information is requested label Aug 19, 2024
@paul-gauthier
Copy link
Collaborator

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

@britannio
Copy link

Hey @paul-gauthier, I found a tags.scm file for Dart at https://github.com/UserNobody14/tree-sitter-dart/blob/master/queries/tags.scm. Zed is using it for the Dart extension (https://zed.dev/docs/languages/dart).

Is it suitable for Aider and if not, is there anything I can do?

@paul-gauthier
Copy link
Collaborator

It has a non standard license. I'm not sure we can use it.

@britannio
Copy link

It has a non standard license. I'm not sure we can use it.

The tree-sitter-dart repo uses the MIT license which should be okay right?

@britannio
Copy link

Looks like there's already a PR: #2236

@paul-gauthier paul-gauthier reopened this Nov 4, 2024
@paul-gauthier
Copy link
Collaborator

CC: @malkoG

It would be fine to use a tags.scm that was adapted from an MIT-licensed repo. But the one in the PR was sourced from a repo with a custom copyright license.

@malkoG
Copy link
Contributor

malkoG commented Nov 4, 2024

I found tree-sitter-dart is MIT license, and in order to check whether if it is really custom license, I diffed those of them I found this:

license

left: https://opensource.org/license/mit
right: https://github.com/UserNobody14/tree-sitter-dart/blob/master/LICENSE

If removing line breaks, I got:

2024-11-05_07-08
https://www.diffchecker.com/text-compare/

@britannio
Copy link

@paul-gauthier is there still a licensing issue? Should I create a separate PR using https://github.com/UserNobody14/tree-sitter-dart/blob/master/queries/tags.scm? Or even a PR from scratch?

@malkoG
Copy link
Contributor

malkoG commented Nov 18, 2024

Actually I brought those queries from the repository. And I wrote those queries, too. As you can see the repository, I wrote tests for many cases. @britannio

So, you don't need to create separate PR

@albemala
Copy link

@malkoG thank you for working on this PR #2236 !
it is now available in the latest Aider v0.65.0
however, I now get the following error, when asking aider for the repo map:
dlsym(0x43268d10, tree_sitter_dart): symbol not found
this is when reading .dart files
cc @paul-gauthier

@malkoG
Copy link
Contributor

malkoG commented Nov 27, 2024

aider

This article describes how aider builds repo-map.
So I wanted to know reason why, I found here. https://github.com/grantjenks/py-tree-sitter-languages/blob/main/build.py

If I think is right,
we need to mention that
when adding additional language support, it will also have dependency to here

@paul-gauthier
Copy link
Collaborator

It appears that the PR does not work. I added test coverage after merging it, but there was a bug in my tests which made them pass incorrectly.

py-tree-sitter-languages does not support dart, so this seems unlikely to be salvageable in the short term. I'm looking into it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants