X Tutup
The Wayback Machine - https://web.archive.org/web/20260131050634/https://github.com/github/semantic/pull/623
Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Conversation

@314eter
Copy link

@314eter 314eter commented Sep 8, 2020

The tests are currently failing because it depends on some unreleased changes to haskell-tree-sitter (tree-sitter/haskell-tree-sitter#290, tree-sitter/haskell-tree-sitter#291) and tree-sitter-ocaml.

@314eter
Copy link
Author

314eter commented Sep 8, 2020

I'm working on tagging, but I have a question.

Semantic currently only tracks function definitions and references, no ordinary variables. But in a functional language, that can be a difficult (and without type checker even impossible) distinction to make. So there are two options

  • only track easily recognizable functions
  • treat all variables as functions and track everything

What is the best option for now?

@patrickt
Copy link
Contributor

patrickt commented Sep 8, 2020

@314eter FYI, though this patch is still valuable for our long-term work, the fastest way to unblock tagging is to use the tree-sitter query API, like how Ruby and friends do it: https://github.com/tree-sitter/tree-sitter-ruby/blob/master/queries/tags.scm. Our new internal systems are bypassing Semantic for the simple syntax-based tagging, so it might be a better use of your time to start there.

Note that due to database capacity concerns on our side, tagging (via tree-sitter queries or Haskell-side stuff) will take a while to arrive for any new language—however, we really appreciate the work you’re putting in!

@patrickt
Copy link
Contributor

patrickt commented Sep 8, 2020

Re. the questions about tagging, that’s a good question. Maybe @robrix has some thoughts?

@314eter
Copy link
Author

314eter commented Sep 8, 2020

Ok, I'll start with the tree-sitter queries then, thanks.

If you have database capacity concerns, the second approach will generate much more data.

@XVilka
Copy link

XVilka commented Jun 10, 2021

  1. Seems Bazel CI job stuck
  2. Had been there any updates since? I see there are regular updates in tree-sitter-ocaml and queries already supported. Should be this PR updated too then?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup