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

feat: add params to symbols table #397

Merged

Conversation

lucacervello
Copy link
Contributor

No description provided.

@lucacervello
Copy link
Contributor Author

@mhanberg it was pretty easy but I don't know if storing the parameters as text is the way to go.

Right now my implementation is very naive, it works for basic function like

def foo(bar,baz) do
  :ok
end 

bar, baz is stored in the table

when dealing this function like this

def foo({1, _} = bar, baz) do
  :ok
end 

I don't know how we should store it

Maybe text is not the best way to represent params?

@mhanberg
Copy link
Collaborator

You can store them as a blob using termtobinary and then after querying them do binary to term

@lucacervello lucacervello marked this pull request as ready for review March 13, 2024 17:02
@mhanberg
Copy link
Collaborator

Fix the tests and then I'll review

lib/next_ls/db.ex Outdated Show resolved Hide resolved
@mhanberg mhanberg merged commit 7c6941b into elixir-tools:main Mar 14, 2024
14 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.

2 participants