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

SCIP sqlite database? #233

Open
michaelpj opened this issue Mar 6, 2024 · 1 comment
Open

SCIP sqlite database? #233

michaelpj opened this issue Mar 6, 2024 · 1 comment

Comments

@michaelpj
Copy link

I was taking a look at this project, it seems very cool. In particular, I think we could potentially use it as an intermediary format between the information files that the Haskell compiler GHC produces (HIE files) and the Haskell Language Server.

One thing we do at the moment with HIE files is that we index them and put them into a sqlite database (https://github.com/wz1000/HieDb). That way we can query things like references conveniently without having to maintain specialised data structures for our specific querying patterns.

Since SCIP is generic, I wonder if there could be a space for a generic SCIP sqlite schema and ingestor? Or is it just that everyone has sufficiently different application-specific needs that there is no point?

@varungandhi-src
Copy link
Contributor

I've had the same idea but primarily for the debugging use case (not as API) -- it'd be nice to be able to quickly convert a SCIP index to a SQL database to perform ad-hoc queries to check well-formedness, counts etc. Currently, you can do some scripting using the scip print --json functionality and then using JQ on top of that.

Right now, the scip lint subcommand does a bunch of custom tracking and traversals - it would be nice to specify those as SQL queries instead.

If we're making this a stable thing, it would require some care around maintaining backwards compatibility as we add new things (or explicitly stating that there aren't any compatibility guarantees, which would be frustrating through from a tooling POV).

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

No branches or pull requests

2 participants