github / stack-graphs

Rust implementation of stack graphs
https://docs.rs/stack-graphs/*/stack_graphs/
Apache License 2.0
717 stars 122 forks source link

Index/Parse does not support .tsx files #431

Closed shirelga closed 2 months ago

shirelga commented 2 months ago

Hi,

I'm trying to index a typescript project that combines .ts and .tsx files. I have indexed the project from source and from binary. cargo run --features cli -- index PROJ_DIR tree-sitter-stack-graphs-typescript index PROJ_DIR After Indexing I have ran but could find only .ts files. cargo run --features cli -- status PROJ_DIR

In order to validate myself I have ran cargo run --features cli -- parse SOME_TSX_FILE The output is:

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.37s
     Running '~/repos/stack-graphs/target/debug/tree-sitter-stack-graphs-typescript parse SOME_TSX_FILE`
Error: No stack graph language found

Last validation I have done is to find any pull request related to tsx and found it was recently added.

Am I doing anything wrong? Did someone succeed where I failed?

Thanks

shirelga commented 2 months ago

The solution is to use --dialect <DIALECT> argument which is not optimal and solved in #433 . cargo run --features cli -- --dialect <DIALECT> [COMMAND] args

hendrikvanantwerpen commented 2 months ago

@shirelga Thanks for reporting this. The interface was indeed not right and I'm working on a fix!