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

chore(nix): add devShells.slim #6327

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

anmonteiro
Copy link
Collaborator

  • Add a lighter version of the default shell that can bootstrap an environment with nix develop .#slim
  • This is a little more cache-friendly with upstream, and avoids resolving all of opam-repository
    • Useful for a quick env bootstrap to test something out

Signed-off-by: Antonio Nuno Monteiro [email protected]

@anmonteiro anmonteiro requested a review from rgrinberg October 25, 2022 21:32
flake.nix Outdated
@@ -73,6 +73,11 @@
);
};

devShells.slim = with pkgs.ocamlPackages; pkgs.mkShell {
inputsFrom = [ dune_3 ];
buildInputs = [ merlin ];
Copy link
Member

@rgrinberg rgrinberg Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be a bit more useful if you included some of the deps needed to run the unit tests? At least ppx_expect for example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. added some of the test inputs that gets make test further

Add a lighter version of the default shell that can bootstrap an
environment with `nix develop .#slim`

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro anmonteiro force-pushed the anmonteiro/add-slim-shell branch from fd5d5ee to 7d100d5 Compare October 25, 2022 22:00
cinaps
menhir
odoc
lwt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is only needed because dune-rpc-lwt isn't it in nixpkgs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose that's the case. make test requests it:

File "otherlibs/dune-rpc-lwt/test/dune", line 17, characters 2-10:
17 |   lwt.unix
       ^^^^^^^^
Error: Library "lwt.unix" not found.
-> required by library "dune_rpc_lwt_tests" in
   _build/default/otherlibs/dune-rpc-lwt/test
-> required by
   _build/default/otherlibs/dune-rpc-lwt/test/.dune_rpc_lwt_tests.inline-tests/inline_test_runner_dune_rpc_lwt_tests.exe
-> required by alias otherlibs/dune-rpc-lwt/test/runtest in
   otherlibs/dune-rpc-lwt/test/dune:3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, in the future it would be nice to get inputsFrom from all the packages in the repo.

@rgrinberg rgrinberg merged commit 83aea14 into ocaml:main Oct 25, 2022
@anmonteiro anmonteiro deleted the anmonteiro/add-slim-shell branch October 25, 2022 22:09
@Alizter Alizter mentioned this pull request Oct 27, 2022
jchavarri added a commit to jchavarri/dune that referenced this pull request Oct 27, 2022
* main:
  makefile: bind on 0.0.0.0 for livedoc (ocaml#6336)
  ci: rewrite fmt job (ocaml#6334)
  refactor(ci): cleanup names (ocaml#6335)
  fix: create fake socket rpc file on windows (ocaml#6329)
  refactor(doc): improvements to hacking.rst (ocaml#6324)
  ci: Add documentation job (ocaml#6333)
  Fix bug in drop_suffix (ocaml#6321)
  fix: public binaries with absolute build path
  test: public binaries in a cram test
  chore: update dune-project to 3.5 (ocaml#6328)
  chore(nix): add `devShells.slim` (ocaml#6327)
  test: remove obsolete bisect tests (ocaml#6318)
  refactor: clarify matching for path comparison and add a docstring (ocaml#6322)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants