-
Notifications
You must be signed in to change notification settings - Fork 244
Add example of how to enable profiling for executables and libraries to docs #793
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
Comments
It looks like this is going to do the trick for adding profiling to haskell-language-server installed via hls-nix: (hls { version = "8.8.3"; }).exes.haskell-language-server.override(_: {enableExecutableProfiling = true;}); Full shell.nix{...}:
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
hls = import sources.hls-nix;
hsPkgs = import ./default.nix {};
hlsWithProfilng = (hls { version = "8.8.3"; }).exes.haskell-language-server.override(_: {enableExecutableProfiling = true;});
in
hsPkgs.shellFor {
# Include only the *local* packages of your project.
packages = ps: with ps; [
mylib
];
# Builds a Hoogle documentation index of all dependencies,
# and provides a "hoogle" command to search the index.
withHoogle = true;
# You might want some extra tools in the shell (optional).
# Some common tools can be added with the `tools` argument
tools = { cabal = "3.2.0.0"; hlint = "2.2.11"; brittany = "0.12.1.1";};
# See overlays/tools.nix for more details
# Some you may need to get some other way.
buildInputs = with pkgs.haskellPackages;
[ hspec-discover stack ghcid pkgs.postgresql hlsWithProfilng ];
# Prevents cabal from choosing alternate plans, so that
# *all* dependencies are provided by Nix.
exactDeps = true;
} |
I find that (at least, when using flakes) this ( Whilst it works to profile
It does not work to profile via To get profiling-via-cabal working, I found it sufficed to have
(In the future, it seems that just adding |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think this is correct (my in progress build with
*.p_o
implies so at least):How does that work actually? If nothing is specified in any list of the module list the value applies to all?
The text was updated successfully, but these errors were encountered: