Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

parse command parses unused TSG rules #166

Description

@robrix

This could be considered a bug or a feature I suppose, but I was certainly surprised that an error in my .tsg prevented me from successfully running cargo run -p tree-sitter-stack-graphs-java -- parse file.java.

Activity

  1. hendrikvanantwerpen commented on Jan 13, 2023

    @hendrikvanantwerpen
    Contributor

    That's an interesting one. I agree that ideally it wouldn't fail. Butt the way the project is setup, I'm not sure it can easily be avoided.

    The generic tree-sitter-stwck-graphs command that loads things from the file system wouldn't fail I think. But in the specialized tssg-java command, the language configuration is built up in memory before being used, and it's a little more eager.

  2. hendrikvanantwerpen commented on Feb 2, 2023

    @hendrikvanantwerpen
    Contributor

    Leaving a reference to https://docs.rs/lazy-init/latest/lazy_init/ here, in case we consider lazy rule parsing in language configurations.

  3. changed the title [-]Parsing runs tsg rules[/-] [+]`parse` command parses unused TSG rules[/+] on Feb 2, 2023
  4. dcreager commented on Feb 2, 2023

    @dcreager
    Contributor

    I think once_cell is preferred these days for all things lazily initialized.

  5. CleanCut commented on Sep 9, 2025

    @CleanCut

    The github/stack-graphs repository is no longer being maintained. As per #502, I'm closing all issues and pull requests before archiving the repository.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions