Skip to content

Commit

Permalink
Julia: try adding precompile setting noci
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Mar 13, 2024
1 parent 1ae75dc commit 7417049
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion languages/julia/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ let
juliaWithPackages = callPackage ./julia-modules {};

settingsSchema = [
{
target = "precompile";
title = "Precompile environment";
description = "Whether to precompile Julia code when building the environment for faster imports. In some cases, precompilation can make the build fail, so turning this off can help.";
type = "boolean";
defaultValue = true;
}
{
target = "lsp.LanguageServer.enable";
title = "Enable LanguageServer language server";
Expand Down Expand Up @@ -131,7 +138,7 @@ mapAttrs (attr: value:
let
settingsToUse = (common.makeDefaultSettings settingsSchema) // settings;

julia = value (
julia = (value.override { inherit (settingsToUse) precompile; }) (
["IJulia"]
++ packages
++ lib.optionals (common.isTrue settingsToUse "lsp.LanguageServer.enable") ["LanguageServer" "SymbolServer"]
Expand Down
5 changes: 4 additions & 1 deletion sample_environments/julia19.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ codedown.mkCodeDownEnvironment {
name = "julia19";
channel = "codedown";
args = {
packages = ["JSON3" "Plots"];
packages = ["JSON3" "Plots" "RDatasets"];
# settings = {
# precompile = false;
# };
};
})
];
Expand Down

0 comments on commit 7417049

Please sign in to comment.