-
Notifications
You must be signed in to change notification settings - Fork 325
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
Work around a locale issue in Ormolu #1520
Conversation
Otherwise ormolu doesn't work
* Removes the Data.Qualified.OptionallyQualified data type from types-common
* Refactor: Move Brig.User.Event* to brig-types * Make notification checkers give complete call stack with error in galley legalhold integration tests. * mkApp also returns finalizer for logs * Use real brig event types in galley tests. Co-authored-by: Matthias Fischmann <mf@zerobuzz.net>
* Add legalhold status to user profile * Work around bug in test utils. see https://wearezeta.atlassian.net/browse/SQSERVICES-471 Co-authored-by: Matthias Fischmann <mf@zerobuzz.net>
* Encode golden jsons using prettyEncode for easier diffs * Re-encode golden test jsons so they are pretty * Reformat generated golden tests for easier reviews Reformatting done like this: - Install hindent - Write .hindent.yaml as (note that couple of extensions are missing as hindent doesn't support them yet): ``` indent-size: 2 line-length: 120 force-trailing-newline: true extensions: - BangPatterns - ConstraintKinds - DataKinds - DefaultSignatures - DerivingStrategies - DerivingVia - DeriveFunctor - DeriveGeneric - DeriveTraversable - EmptyCase - FlexibleContexts - FlexibleInstances - FunctionalDependencies - GADTs - InstanceSigs - KindSignatures - LambdaCase - MultiParamTypeClasses - MultiWayIf - NamedFieldPuns - NoImplicitPrelude - OverloadedStrings - PackageImports - PatternSynonyms - PolyKinds - QuasiQuotes - RankNTypes - ScopedTypeVariables - StandaloneDeriving - TemplateHaskell - TupleSections - TypeApplications - TypeFamilies - TypeFamilyDependencies - TypeOperators - UndecidableInstances - ViewPatterns ``` - Run ormolu on the whole project
@arianvp and @pcapriotti , I just updated the PR to use the |
shell.nix
Outdated
@@ -58,6 +58,7 @@ let | |||
}; | |||
in pkgs.mkShell { | |||
name = "shell"; | |||
LOCAL_ARCHIVE=${glibcLocales}/lib/locale/locale-archive; # works around https://github.com/tweag/ormolu/issues/38 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be pkgs.glibcLocales
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am an absolute beginner at Nix. Should I replace "glibcLocales" with "pkgs.glibcLocales"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to wrap it in quotes and qualify glibcLocales
with pkgs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right. LOCALE_ARCHIVE
should be an environment variable, not an attribute.
@pcapriotti attributes of a derivation are exposed as environment variables.
https://nixos.org/manual/nix/unstable/expressions/derivations.html |
Ah, I didn't know that, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be LOCALE_ARCHIVE
, not LOCAL_ARCHIVE
, right? Have you tried to see if it fixes your issue?
shell.nix
Outdated
@@ -58,6 +58,7 @@ let | |||
}; | |||
in pkgs.mkShell { | |||
name = "shell"; | |||
LOCAL_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"; # works around https://github.com/tweag/ormolu/issues/38 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOCAL_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"; # works around https://github.com/tweag/ormolu/issues/38 | |
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; # works around https://github.com/tweag/ormolu/issues/38 |
Otherwise ormolu doesn't work