Closed hendi closed 3 years ago
The problem has also been reported on gitter. Likely a new nix-shell or make -B .envrc
will fix the issue
Tried both, neither helped.
Hi ! I worked around this by completely restarting from updating ihp-new and everything else . Then suddently it worked again. I am using debian10 and calling ./start a second time will bring back the error ....
I'm having the same problem too :( Is it not picking up the new wai-cors
dependency? Is there a way to force cabal to install it?
Inside the default.nix
of your project, is there ihp = ./IHP;
(line 4) or is it set to something like ihp = fetchgit ...
?
The line number doesn't quite line up, so let me post my entire default.nix
file:
let
ihp = builtins.fetchGit {
url = "https://github.com/digitallyinduced/ihp.git";
ref = "refs/tags/v0.11.0";
};
haskellEnv = import "${ihp}/NixSupport/default.nix" {
ihp = ihp;
haskellDeps = p: with p; [
cabal-install
base
wai
text
hlint
p.ihp
haskell-to-elm
];
otherDeps = p: with p; [
# Native dependencies, e.g. imagemagick
];
projectPath = ./.;
};
in
haskellEnv
Try this:
let
ihp = ./IHP;
haskellEnv = import "${ihp}/NixSupport/default.nix" {
ihp = ihp;
haskellDeps = p: with p; [
cabal-install
base
wai
text
hlint
p.ihp
haskell-to-elm
];
otherDeps = p: with p; [
# Native dependencies, e.g. imagemagick
];
projectPath = ./.;
};
in
haskellEnv
Otherwise it's using v0.11.0 for the dev environment (v0.11.0 doesn't contain the CORS middleware) :) With the ./IHP
it's picking up your local files for the dev env.
Hmm, I seem to run into an error when running make
now. This could be my relative ignorance of nix...
✗ make -B .envrc
rm -f .envrc
echo "PATH_add $(nix-shell -j auto --cores 0 --pure --run 'printf %q $PATH')" > .envrc
error: getting status of '/nix/store/1k4dv4vyls5r5gs2ggc821razyiz1lxd-IHP/NixSupport/default.nix': No such file or directory
Do you have the ihp repo cloned inside your project directory at IHP
?
I actually have it symlinked to another folder, which had been working for me before.
Can you try to set it to the absolute path of where the symlink points to like ihp = /some/where/the/symlink/is/IHP;
?
Okay, I got it. At firs it didn't like that my symlink was relative. Then I got more errors when it was absolute. But setting it directly in default.nix
seems to be the trick. I wonder why the relative symlink worked before and now didn't like it. Thanks for your help, sorry for all the minute questions!
I think the symlink problem is caused because nix copies the IHP version into the nix store and then the symlink is resolved from within there. Glad it's working now :)
Hi ! I am trying to put a relative path ihp = ./IHP;
into my default.nix and I am stopped now at
[ 23 of 174] Compiling IHP.IDE.SchemaDesigner.Parser ( IHP/IDE/SchemaDesigner/Parser.hs, dist/build/IHP/IDE/SchemaDesigner/Parser.o, dist/build/IHP/IDE/SchemaDesigner/Parser.dyn_o )
/nix/store/7d2w3lafm8cla7n6ii5jskhsnqg4zv3a-stdenv-linux/setup: line 1309: 27378 Killed ./Setup build
builder for '/nix/store/k113zrfjm930aabrbfyamwn6hjiwf720-ihp-v0.11.0.drv' failed with exit code 137
cannot build derivation '/nix/store/lyjjfbn9yzbfpcricd4bpyz09rjgnjnb-ghc-8.10.3-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/lyjjfbn9yzbfpcricd4bpyz09rjgnjnb-ghc-8.10.3-with-packages.drv' failed
direnv: loading .envrc
./start: Zeile 17: RunDevServer: Kommando nicht gefunden.
direnv: loading .envrc
Still my workaround is to create everything new and run start or make only once. Weird - but maybe my understanding of the solution just isn't good enough ;-)
Is there some error above these lines? Otherwise the kill could indicate the system is out of memory. Do you have a swap set up?
ah indeed I have got oom_reaper: reaped process 2032 (ghc), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
in my /var/log/messages
Just increased RAM permissions to 10G on my development server and it works !
Seems like 16gb is nothing these days.........
I run on 64 GB 😄
Is this problem still happening or can we close this one? :)
It did not happen to me two days ago, and I haven't changed anything locally AFAIK.
Following the "Running an application against a local copy of the framework" guide from CONTRIBUTING.md,
:l Main
fails with