NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.27k stars 14.25k forks source link

Package request: GitHub Semantic #63098

Open matthew-piziak opened 5 years ago

matthew-piziak commented 5 years ago

Semantic is a Haskell library and command line tool for parsing, analyzing, and comparing source code.

Semantic uses tree-sitter to generate parse trees, but layers in a more generalized notion of syntax terms across all supported programming languages.

This means that is can produce syntax-aware diffs, in many programming languages.

matthewbauer commented 5 years ago

Probably requires https://github.com/github/semantic/issues/16

teto commented 5 years ago

maybe we should also package tree-sitter first ?

cdepillabout commented 5 years ago

@matthew-piziak I have a branch where I started working on this, but I lost steam:

https://github.com/cdepillabout/nixpkgs/commit/c68383502e2c29e3487b3c3aa4f6539560c3de19

I've gotten the semantic-core and semantic-python packages compiling, and some of the dependencies of the main semantic package compiling.

If you wanted to take this over, you'd just need to get packages like tree-sitter-json, tree-sitter-haskell, etc specified at the old version that semantic wants. I bet that would basically get semantic to compile.

Then of course you'd have to clean up all the mess I've made in that branch.

If you just wanted to build semantic with nix, it might be easier to use haskell.nix, since it can generate a package set from the cabal solver.

stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.
tobim commented 3 weeks ago

An older version of semantic is in haskellPackages. https://search.nixos.org/packages?channel=unstable&show=haskellPackages.semantic&type=packages&query=haskellPackages.semantic

Please try to update it in Hackage if you want a more recent version.

cdepillabout commented 3 weeks ago

The current version on Hackage appears to just be an empty placeholder: https://hackage.haskell.org/package/semantic-0.0.0

And the upstream issue about uploading semantic to Hackage is still open: https://github.com/github/semantic/issues/16

So the actual semantic package does not yet appear to be available in Nixpkgs, as far as I can tell.

As for whether or not anyone still wants this, that's a different question. Maybe we could go ahead and close this since there doesn't seem to have been any interest in the past 5 years.