]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
dhall: BREAKING CHANGE update dhall config for 1.33+ compatibility 19/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Thu, 13 Aug 2020 14:01:49 +0000 (16:01 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Thu, 13 Aug 2020 14:32:20 +0000 (16:32 +0200)
Since dhall 1.33.0 lang version the `Optional/fold` function is
removed from the language and can be replaced by the usage of the
`merge` function which now works on Optional values ðŸŽ‰ since 1.29

https://github.com/dhall-lang/dhall-haskell/pull/1608

This new code is thus not compatible with versions of dhall
<1.29.0 (due to the new feature of the `merge` fonction).

.travis.yml
dhall-1.34.0.nix [moved from dhall-1.26.1.nix with 87% similarity]
dhall/server/service/plugin/correlationId.dhall

index 14ab868b529eae5894a46235d4d8934a6757c3b3..99c10c595d9cce9f6403c112c9513c241b6e900c 100644 (file)
@@ -14,7 +14,7 @@ install:
 
   # Install ansible
   - nix-env -i python3 ansible ansible-lint
-  - nix-env -if ./dhall-1.26.1.nix
+  - nix-env -if ./dhall-1.34.0.nix
 
   # Check ansible version
   - ansible --version
similarity index 87%
rename from dhall-1.26.1.nix
rename to dhall-1.34.0.nix
index 918a528a197ee1942ea3490c9ad3fdac850b0d74..a70d201f47ccfae3c5517f0b2343d2638dc5d6a1 100644 (file)
@@ -19,4 +19,4 @@ let
         '';
       };
 in
-  mkVersion "1.26.1" "0sl4r3mfairgd6kn26hs1r1lkh8rn992grd73078rhqf5w90ag05"
+  mkVersion "1.34.0" "0n64jkgbv7a3cmlv3gxpgc11p9b5w0k9nc0zm9am2pzmp6vm6b4n"
index d5d592860d0db6134576c57aa2fa40a5df22c08a..41c572098cfe26805366f3cd391a781fd0174984 100644 (file)
@@ -2,22 +2,16 @@ let Plugin = ./Plugin.dhall
 
 let config = ./Config.dhall
 
-in    Î»(generator : Optional Text)
-    â†’   { name =
-            "correlation-id"
+in  Î»(generator : Optional Text) â†’
+        { name = "correlation-id"
         , config =
             config.CorrelationId
-            { header_name =
-                "X-correl"
-            , echo_downstream =
-                True
-            , generator =
-                Optional/fold
-                Text
-                generator
-                Text
-                (λ(t : Text) â†’ t)
-                "uuid#counter"
-            }
+              { header_name = "X-correl"
+              , echo_downstream = True
+              , generator =
+                  merge
+                    { None = "uuid#counter", Some = Î»(x : Text) â†’ x }
+                    generator
+              }
         }
       : Plugin