Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ program-options
allow-newer:
, proto-lens-protoc:base
, proto-lens-protoc:ghc
, proto-lens-setup:Cabal
2 changes: 1 addition & 1 deletion integration/integration.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build-type: Custom
custom-setup
setup-depends:
, base
, Cabal
, Cabal >=3.12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this constraint needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

because otherwise cabal multi-repl doesn't work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should I put a note there?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't there only one version of Cabal available in the nix env? The project as is doesn't depend on cabal multi-repl right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

in theory yes, in practice no, Cabal is a boot library and hence belongs to the GHC, hence nixpkgs installs two versions, 3.12 and 3.10 (which comes with GHC and cannot be removed), that then leads to proto-lens tool to select the wrong (old) version because it is actually constrained to Cabal <3.12 for no particular reason. It's all a bit messed up, if we had purely nixpkgs deps, then this wouldn't cause any issues because cabal doesn't actually care about how these deps have been installed...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the reason why cabal multi-repl is not enabled by default in HLS. By fixing this for us though, it removes the bug wrt duplicate constraints and it also improves HLS because of multi-repl. I think adding this constraint (which is provisioned by the nix env anyway) is worth this improvement.

, containers
, directory
, filepath
Expand Down
2 changes: 1 addition & 1 deletion libs/types-common-journal/types-common-journal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extra-source-files:
custom-setup
setup-depends:
base
, Cabal
, Cabal >=3.12
, proto-lens-setup

library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extra-source-files:
custom-setup
setup-depends:
base
, Cabal
, Cabal >=3.12
, proto-lens-setup

library
Expand Down
2 changes: 1 addition & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let
docsPkgs = [
pkgs.plantuml
pkgs.texlive.combined.scheme-full
(pkgs.python3.withPackages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is because nixpkgs not too long ago bumped the default python version and now many python packages are broken

(pkgs.python310.withPackages
(ps: with ps; [
myst-parser
rst2pdf
Expand Down
7 changes: 0 additions & 7 deletions nix/haskell-pins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,6 @@ let
};
# end pinned dependencies for http2

# pinned for warp
warp-tls = {
version = "3.4.5";
sha256 = "sha256-3cDi/+n7wHfcWT/iFWAsGdLYXtKYXmvzolDt+ACJnaM=";
};
# end pinned for warp

# PR: https://github.com/wireapp/wire-server/pull/4027
HsOpenSSL = {
version = "0.11.7.7";
Expand Down
13 changes: 9 additions & 4 deletions nix/manual-overrides.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ libsodium, protobuf, hlib, mls-test-cli, fetchurl, curl, fetchpatch, ... }:
{ libsodium, protobuf, hlib, mls-test-cli, fetchurl, curl, ... }:
# FUTUREWORK: Figure out a way to detect if some of these packages are not
# actually marked broken, so we can cleanup this file on every nixpkgs bump.
hself: hsuper: {
Expand Down Expand Up @@ -55,7 +55,6 @@ hself: hsuper: {

# depend on an old version of hedgehog
polysemy-test = hlib.markUnbroken (hlib.doJailbreak hsuper.polysemy-test);
polysemy-conc = hlib.markUnbroken (hlib.doJailbreak hsuper.polysemy-conc);

# ------------------------------------
# okay but marked broken (nixpkgs bug)
Expand All @@ -67,12 +66,18 @@ hself: hsuper: {
# version overrides
# (these are fine but will probably need to be adjusted in a future nixpkgs update)
# -----------------
tls = hsuper.tls_2_0_5;
tls-session-manager = hsuper.tls-session-manager_0_0_5;
tls = hsuper.tls_2_1_0;
tls-session-manager = hsuper.tls-session-manager_0_0_6;
crypton-connection = hsuper.crypton-connection_0_4_1; # older version doesn't allow tls 2.1
amqp = hlib.dontCheck hsuper.amqp_0_23_0; # older version doesn't allow cryton-connection 0.4.1, this one has broken tests

# warp requires curl in its testsuite
warp = hlib.addTestToolDepends hsuper.warp [ curl ];

# cabal multirepl requires Cabal 3.12
Cabal = hsuper.Cabal_3_12_1_0;
Cabal-syntax = hsuper.Cabal-syntax_3_12_1_0;

# -----------------
# flags and patches
# (these are fine)
Expand Down
4 changes: 2 additions & 2 deletions nix/overlay-docs.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
self: super: rec {
python3 = super.python3.override {
python310 = super.python310.override {
packageOverrides = pself: psuper: {
rst2pdf = pself.callPackage ./pkgs/python-docs/rst2pdf.nix { };
sphinx-multiversion = pself.callPackage ./pkgs/python-docs/sphinx-multiversion.nix { };
Expand All @@ -9,5 +9,5 @@ self: super: rec {
};
};

python3Packages = python3.pkgs;
python310Packages = python310.pkgs;
}
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4a3fc4cf736b7d2d288d7a8bf775ac8d4c0920b4",
"sha256": "1ibmc6iijim53bpi1wc1b295l579wzxgs8ynmsi0ldgjrxhgli1a",
"rev": "f3834de3782b82bfc666abf664f946d0e7d1f116",
"sha256": "0kzp4d4hbsc968wavwyh31lzipd4cv7wvnca167y21l5rb1kx9az",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/4a3fc4cf736b7d2d288d7a8bf775ac8d4c0920b4.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/f3834de3782b82bfc666abf664f946d0e7d1f116.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
6 changes: 3 additions & 3 deletions nix/wire-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ in
pkgs.kind
pkgs.netcat
pkgs.niv
(hlib.justStaticExecutables pkgs.haskellPackages.apply-refact)
(pkgs.python3.withPackages
pkgs.haskellPackages.apply-refact
(pkgs.python310.withPackages
(ps: with ps; [
black
bokeh
Expand Down Expand Up @@ -547,7 +547,7 @@ in
++ pkgs.lib.optionals pkgs.stdenv.isLinux [
# linux-only, not strictly required tools
pkgs.docker-compose
pkgs.telepresence
(pkgs.telepresence.override { pythonPackages = pkgs.python310Packages; })
];
};

Expand Down
2 changes: 1 addition & 1 deletion services/federator/test/integration/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import Test.Federator.InwardSpec qualified
import Test.Federator.Util (TestEnv, mkEnvFromOptions)
import Test.Hspec
import Test.Hspec.Core.Format
import Test.Hspec.JUnit
import Test.Hspec.JUnit.Config.Env
import Test.Hspec.JUnit.Formatter
import Test.Hspec.Runner

main :: IO ()
Expand Down
4 changes: 2 additions & 2 deletions services/spar/test-integration/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import System.Random (randomRIO)
import Test.Hspec
import Test.Hspec.Core.Format
import Test.Hspec.Core.Runner
import Test.Hspec.JUnit
import Test.Hspec.JUnit.Config.Env
import Test.Hspec.JUnit.Formatter as JUnit
Comment thread
akshaymankar marked this conversation as resolved.
Outdated
import qualified Test.LoggingSpec
import qualified Test.MetricsSpec
import qualified Test.Spar.APISpec
Expand Down Expand Up @@ -77,7 +77,7 @@ hspecConfig = do
: configAvailableFormatters defaultConfig
}
where
checksAndJUnitFormatter :: JUnitConfig -> FormatConfig -> IO Format
checksAndJUnitFormatter :: JUnitConfig -> JUnit.FormatConfig -> IO JUnit.Format
checksAndJUnitFormatter junitConfig config = do
junit <- junitFormat junitConfig config
let checksFormatter = fromJust (lookup "checks" $ configAvailableFormatters defaultConfig)
Expand Down