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

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

Open
begleynk opened this issue Jan 14, 2024 · 0 comments
Open

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

begleynk opened this issue Jan 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@begleynk
Copy link
Member

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.

@begleynk begleynk added the enhancement New feature or request label Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant