fission-codes / fission

Fission CLI & server
https://runfission.com/docs
119 stars 14 forks source link

remove nix pure from shell environment #622

Closed walkah closed 1 year ago

walkah commented 2 years ago

Using stack's nix integration with --nix-pure seems to be (sometimes?) creating segfaults in stack specifically on aarch64-darwin. This PR simply removes --nix-pure from the stack wrapper.

bgins commented 2 years ago

Tried this out and build, cli-install, and server-install all work for me, but quality segfaults:

[nix-shell:~/code/fission/fission]$ quality
⚙️  Running quality...
/private/tmp/nix-shell-29850-0/rc: line 3: 30030 Segmentation fault: 11  '/nix/store/a6qyw1maymr5589nmw6lzqpanm2xr1ff-stack-2.7.5/bin/stack' $STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=2.7.5' '--nix' '--nix-shell-file=nix/stack-integration.nix' 'test' '--test-arguments=--color=always'

Hadn't noticed a segfault from quality before, but the cli-install and server-install ones have also been intermittent.

walkah commented 2 years ago

Hadn't noticed a segfault from quality before, but the cli-install and server-install ones have also been intermittent.

just to be super clear - you used a new / fresh shell (clean ENV) before trying your tests? quality works for me with this change.

icidasset commented 2 years ago

quality doesn't work for me either. Interestingly if I run stack build --nix --nix-shell-file=nix/stack-integration.nix, I get the segfault too. Whereas running build, which is the same command, runs fine. How weird is that?

icidasset commented 2 years ago

I do notice that the quality command has some additional single quotes in its command, whereas the others do not, might have something to do with it (because of the wrapper).

bgins commented 2 years ago

just to be super clear - you used a new / fresh shell (clean ENV) before trying your tests? quality works for me with this change.

Yep, this was in a clean environment.

walkah commented 2 years ago

Yep, this was in a clean environment.

sorry for the "did you plug it in" question 🙈 I am a little stumped why this is happening sometimes.

I do notice that the quality command has some additional single quotes in its command, whereas the others do not, might have something to do with it (because of the wrapper).

yea, this is the stack wrapper script in entirety (from my machine):

#! /nix/store/lkw407y1x1v5bg6hc290c5ry1qaabbgl-bash-5.1-p16/bin/bash -e
exec -a "$0" "/nix/store/1aw7295bi6kxlvqb9a5kp9276aym4970-stack/bin/.stack-wrapped"      --nix     --nix-shell-file=nix/stack-integration.nix    "$@"

I don't think the single quotes should cause an issue here.

walkah commented 1 year ago

Closing this in favour of #615