From e852c13342e78994300f1cb329fc146b17d93f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Lafuente?= Date: Sat, 21 Sep 2024 15:59:22 +0200 Subject: [PATCH] writers: disable broken test (fsharp) --- pkgs/build-support/writers/test.nix | 48 +++++++++++++++-------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/pkgs/build-support/writers/test.nix b/pkgs/build-support/writers/test.nix index 656d127930fa..d515dc2d5714 100644 --- a/pkgs/build-support/writers/test.nix +++ b/pkgs/build-support/writers/test.nix @@ -245,30 +245,32 @@ recurseIntoAttrs { # print(y[0]['test']) #''); - fsharp = expectSuccess (makeFSharpWriter { - libraries = { fetchNuGet }: [ - (fetchNuGet { pname = "FSharp.SystemTextJson"; version = "0.17.4"; sha256 = "1bplzc9ybdqspii4q28l8gmfvzpkmgq5l1hlsiyg2h46w881lwg2"; }) - (fetchNuGet { pname = "System.Text.Json"; version = "4.6.0"; sha256 = "0ism236hwi0k6axssfq58s1d8lihplwiz058pdvl8al71hagri39"; }) - ]; - } "test-writers-fsharp" '' + # Commented out because fails with 'error FS0039: The value or constructor 'JsonFSharpConverter' is not defined.' - #r "nuget: FSharp.SystemTextJson, 0.17.4" - - module Json = - open System.Text.Json - open System.Text.Json.Serialization - let options = JsonSerializerOptions() - options.Converters.Add(JsonFSharpConverter()) - let serialize<'a> (o: 'a) = JsonSerializer.Serialize<'a>(o, options) - let deserialize<'a> (str: string) = JsonSerializer.Deserialize<'a>(str, options) - - type Letter = A | B - let a = {| Hello = Some "World"; Letter = A |} - if a |> Json.serialize |> Json.deserialize |> (=) a - then "success" - else "failed" - |> printfn "%s" - ''); + # fsharp = expectSuccess (makeFSharpWriter { + # libraries = { fetchNuGet }: [ + # (fetchNuGet { pname = "FSharp.SystemTextJson"; version = "0.17.4"; sha256 = "1bplzc9ybdqspii4q28l8gmfvzpkmgq5l1hlsiyg2h46w881lwg2"; }) + # (fetchNuGet { pname = "System.Text.Json"; version = "4.6.0"; sha256 = "0ism236hwi0k6axssfq58s1d8lihplwiz058pdvl8al71hagri39"; }) + # ]; + # } "test-writers-fsharp" '' + # + # #r "nuget: FSharp.SystemTextJson, 0.17.4" + # + # module Json = + # open System.Text.Json + # open System.Text.Json.Serialization + # let options = JsonSerializerOptions() + # options.Converters.Add(JsonFSharpConverter()) + # let serialize<'a> (o: 'a) = JsonSerializer.Serialize<'a>(o, options) + # let deserialize<'a> (str: string) = JsonSerializer.Deserialize<'a>(str, options) + # + # type Letter = A | B + # let a = {| Hello = Some "World"; Letter = A |} + # if a |> Json.serialize |> Json.deserialize |> (=) a + # then "success" + # else "failed" + # |> printfn "%s" + # ''); #pypy2NoLibs = expectSuccess (writePyPy2 "test-writers-pypy2-no-libs" {} '' # print("success")