fission icon indicating copy to clipboard operation
fission copied to clipboard

remove nix pure from shell environment

Open walkah opened this issue 3 years ago • 6 comments

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.

walkah avatar Jul 15 '22 14:07 walkah

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.

bgins avatar Jul 15 '22 14:07 bgins

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.

walkah avatar Jul 15 '22 14:07 walkah

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 avatar Jul 15 '22 14:07 icidasset

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).

icidasset avatar Jul 15 '22 14:07 icidasset

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.

bgins avatar Jul 15 '22 14:07 bgins

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 avatar Jul 15 '22 14:07 walkah

Closing this in favour of #615

walkah avatar Feb 27 '23 19:02 walkah