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

Keep Parser.y ASCII to avoid happy locale issues #3640

Merged
merged 1 commit into from
May 14, 2019

Conversation

jmackie
Copy link
Contributor

@jmackie jmackie commented May 14, 2019

Small change to fix some weird locale issues I've ran into with NixOS.

Despite locale reporting a utf-8 locale, when I stack build that locale is lost and happy crashes with an encoding error. Probably something to do with how stack manages Nix, but in any case this seems like a straightforward way of avoiding similar issues in future.

@matthew-hilty
Copy link
Contributor

Pull request #3639 also addresses this issue.

@matthew-hilty
Copy link
Contributor

A version of stack (version 1.10.0) specifies the LANG env variable. However, it's not even released, let alone available in nixpkgs. However, a haskell utility function "buildStackProject" in nixpkgs already exists that likewise sets the LANG env variable. Invoking it via a nix flag in stack.yaml seems to do the trick.

Perhaps ASCII would be better in general -- since it's a simpler, more constrained standard, but keeping Parser.y ASCII to work around the strange behavior of "readFile" by Happy may not be necessary.

@natefaubion
Copy link
Contributor

I'm fine with merging this, since it unfortunately seems to be the most robust way to deal with this way until a Stack version is released to deal with this issue.

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.

4 participants