Skip to content
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

remove nix pure from shell environment #622

Closed
wants to merge 1 commit into from
Closed

Conversation

walkah
Copy link
Member

@walkah walkah commented Jul 15, 2022

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 walkah requested review from icidasset and bgins July 15, 2022 14:17
@bgins
Copy link
Contributor

bgins commented Jul 15, 2022

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
Copy link
Member Author

walkah commented Jul 15, 2022

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

bgins commented Jul 15, 2022

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
Copy link
Member Author

walkah commented Jul 15, 2022

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.

Copy link
Contributor

@icidasset icidasset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only quality doesn't work for me, fix later? 🤷 I can run the quality command by doing .stack-wrapped test --nix --nix-shell-file=nix/stack-integration.nix --test-arguments='--color=always' in nix develop.

Also, I would've thought .stack-wrapped would run stack with the additional flags defined the flake.nix file. But I guess it doesn't? Because if I leave the --nix flag from the command above, it starts to download GHC.

@walkah
Copy link
Member Author

walkah commented Feb 27, 2023

Closing this in favour of #615

@walkah walkah closed this Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants