side question
@Emilio Jesús Gallego Arias do you use nix flakes or do you still use nix channels?
I opened https://github.com/ejgallego/coq-lsp/pull/284 however I didn't document anything related to nix-channels and replaced the previous outdated default.nix with compat that probably doesn't work as there's no way to explicitly pass in submodules
, well outside of course just cloning the project with submodules in the first place (should work then).
p.s the previous flake didn't build and the default.nix seemed to have been outdated
Hi @r-muhairi , @Ali Caglayan knows about the Nix setup, thanks a lot for the PR.
2 messages were moved here from #coq-lsp > General Chat by Emilio Jesús Gallego Arias.
I'm very happy with whatever setup is best for Nix, I myself don't use Nix yet (opam is very convenient for certain OCaml workflows)
Emilio Jesús Gallego Arias said:
I'm very happy with whatever setup is best for Nix, I myself don't use Nix yet (opam is very convenient for certain OCaml workflows)
Oh you weren't a nix user? My bad, I made an assumption based on the mention of nix in the Serapi README
I am using flakes. You need to do nix develop
in the repo. And there is a way to pull submodules, have a look at CONTRIBUTING.
Default.nix is out of date however
So things like nix build .?submodules=1
work
You also do the same submodules trick in the URL for other flake inputs
The only issue is that there is no good way to keep the submodule coq and whatever coq you are using the same atm.
So if anybody can write a flake without submodules that would be cool.
Ali Caglayan said:
The only issue is that there is no good way to keep the submodule coq and whatever coq you are using the same atm.
That's where your mistaken, i'm not pinning coq as a flake input nor mentioning it anywhere in the flake
dune vendors it for me
only thing actually added as an input is coq-serapi
you do need the submodules to develop anyhow so i presume any developer would just clone/initwith submodules
on nix build just asking to pass ?submodules=1 shouldn't be that problematic
Ali Caglayan said:
So if anybody can write a flake without submodules that would be cool.
the submodules are apart of the project they're necessary for building, you could have a makeshift situation where you vendor them manually with nix however that would be unnecessary and redundant
@Ali Caglayan ocaml-lsp is there, i don't know why there was a ocamlformat detection in the first place
i asked rgrinberg the same question
here is what i asked him exactly
Is there any reason why you'd use a different nixpkgs version of ocamlformat?
If you wanted to lock the default profile at a specific version does newer versions of ocamlformat not support previous versions defined in .ocamlformat?
he hasn't responded yet.
Well each version of ocaml format makes some formatting changes so it's best to stick to the one in the OCaml format file.
yeah but you can restrict the version in the ocamlformat file no?
The code in the flake reads the file and pulls that one from nixpkgs
do read this, https://github.com/ocaml-ppx/ocamlformat#-usage
there is a version option
It's Rudis code originally btw
in regards to the CONTRIBUTING.md, I guess I can remove the in this repository
part of the nix README modification i added
the instructions still apply as long as they clone with submodules btw
however i did introduce a new devShell for the vscode client if you want to document that as well? I don't personally think its necessary
edit: pushed documentation for it anyhow alongside the vscode-extension instructions
@Ali Caglayan I see why the detection was there in the first place
however there's no need for the detection in this flake, i'll push something up too treefmt-nix in the ocamlformat nix module
https://github.com/numtide/treefmt-nix/pull/41/files
once it is merged we can just pass ./.ocamlformat to the package option
@Ali Caglayan https://github.com/numtide/treefmt-nix/issues/42
manually setting each exclude for the formatters works but its fine just to wait for the issue to resolve as to also get the other PR for extracting the version merged alongside it
@Ali Caglayan I excluded the vendor directory from formatting as the treefmt PR for that went through, however for the version detection, not yet, not sure if it will, so i just added a modified version in the last commit.
its merge-able if everything is ok
OK, I will test it out later
@Ali Caglayan rebased, got it building with the latest deps (menhir, uri)
I'll check it out later
Hi folks, I had some reports that coq-lsp under Nix was not in the right version for 8.18 , is there an easy way to check what is going on here?
I still know 0 about Nix but I'm trying to learn and ensure things are friendly for Nix users.
Last updated: Mar 28 2024 at 23:01 UTC