Rumor has it a codeq version 2 was made. Is that something that could be open sourced with some work?
Any particular use case you have in mind for a tool like codeq?
Universal semantic code repository.
Content addressable something like unison language or convex project's orthogonal persistence.
All code and versions can be merged into one graph.
Then build out tooling on top of that.
Have you thought about how a codeqβs identity does or does not change w.r.t. the codeqs it depends on? Eg if codeq-a depends on codeq-b and codeq-b has a bug fixed in it, does codeq-a now transitively get a rev bump as well? Its the difference between identity based on code as text or identity being based on code-as-text+the codeqs it depends on. If you were to build, say, a repository of generative test seeds and results, and wanted to only rerun tests for codeqs that changed, the transitive dep being part of a codeqs identity matters.
content hashes and merkle trees
so if code changes it gets a new hash
similar to this https://www.unison-lang.org/docs/the-big-idea/
What if you donβt have the source of a fn, just the lib version it came from?
not sure. seems like blobs would not be able to participate semantically
could just use the hash of the blob in that case
eg. if the lib is in nix packages for example, it would already have a deterministic reproducible hash
The coordinates, right? βcom.foo/lib mvn/version 123, containing codeq-bβ + hash of codeq-a
no coordinates needed just a hash
coordinates could just be pointers to a hash
more like tags
so the idea is a bit bigger than codeq. more like a new thing that combines code repos and package management etc.
the convex project has a notion of orthogonal persistence also using merkle trees https://docs.convex.world/docs/tutorial/convex-lisp/convex-lisp
could be a product that is broader than just clojure
mostly though i just wanted semantic version control that would let you merge all repos into one and build tooling on that
was curious about datomic / codeq as an inspiration or base for that
curious if you have any thoughts
So many thoughts haha Codeq is one of my favorite ideas and Iβve thought about it for many years. I'm on mobile now and running errands but lets keep the convo going async. I will look at the convex project
thanks! doing some hiking in a bit but async works
> if you were to build, say, a repository of generative test seeds and results, and wanted to only rerun tests for codeqs that changed, the transitive dep being part of a codeqs identity matters. Btw, I did build this (based on codeq), never released it
tests could certainly be optimized around when merkle hashes change
polylith seems to get some mileage out of testing only modules that change. a more fine grained capability would be even more powerful
That whole work grew out of the idea of specs and generative testing as a core. You don't want to check specs at runtime, you want to exhaustively (slowly) test each unit of code generatively and you do not need to retest things you have not changed
sometimes you have oddball third parties though where you can't predict what they will send but that is more at the service api layer
I am also interested in this. Think there are a lot of opportunities for something like codeq or related tools