Skip to content

Figure out a way to make parsers work like plugins #1

@begleynk

Description

@begleynk

Currently we build one binary from Dossier, and it has as dependencies the dossier-ts and dossier-py crates.

This is fine, but has a critical downside: you can't add new languages without adding them as direct dependencies to the CLI. This makes it hard to develop, test, and eventually add new languages to Dossier.

What instead we'd like is a plugin system. You install the "core" of Dossier, perhaps with all officially supported languages, and users can then add more languages themselves as plugins.

How would this work?

https://github.com/rust-lang/cargo is a great example of how we could achieve this. If you have anything in your $PATH with the prefix cargo, it becomes a cargo subcommand. Similarly, the Dossier CLI could e.g. look for any programs starting with dossier-${language file extension}, and invoke it to do the actual parsing of the code.

What the API contract between the main CLI and language implementation is, is not yet clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions