From 6103f6fc56f978c847ba7c1f2d9f38ee93a5e337 Mon Sep 17 00:00:00 2001 From: Sonja Heinze Date: Tue, 9 Mar 2021 12:57:47 +0100 Subject: [PATCH] Adapt to Ppxlib's API change Ppxlib is removing Lexer.keyword_table from the API in exchange for the more lightweight Keyword.is_keyword. Signed-off-by: Sonja Heinze --- Patch from . ppx_variants_conv.opam | 2 +- src/ppx_variants_conv.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ppx_variants_conv.opam b/ppx_variants_conv.opam index 7e7148d..b56040f 100644 --- a/ppx_variants_conv.opam +++ b/ppx_variants_conv.opam @@ -15,7 +15,7 @@ depends: [ "base" {>= "v0.14" & < "v0.15"} "variantslib" {>= "v0.14" & < "v0.15"} "dune" {>= "2.0.0"} - "ppxlib" {>= "0.14.0"} + "ppxlib" {>= "0.23.0"} ] synopsis: "Generation of accessor and iteration functions for ocaml variant types" description: " diff --git a/src/ppx_variants_conv.ml b/src/ppx_variants_conv.ml index 8d60086..112fc78 100644 --- a/src/ppx_variants_conv.ml +++ b/src/ppx_variants_conv.ml @@ -66,7 +66,7 @@ end let variant_name_to_string v = let s = String.lowercase v in - if Caml.Hashtbl.mem Lexer.keyword_table s + if Keyword.is_keyword s then s ^ "_" else s '/guix/diff/tests/opam.scm?id=5d4b721b7d924d434266f2ccbda1e247c9969970'>diff
AgeCommit message (Expand)Author
2021-05-28import: opam: Generate license for package....* guix/import/opam.scm (opam->guix-package): Generate license for the ‘license’ field. * tests/opam.scm (test-opam-file): Update accordingly. ("opam->guix-package"): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Xinglu Chen
2020-12-08import: opam: Adjust test to latest 'opam->guix-package' changes....This is a followup to a8dccd4bdc1e58219d4ba08fe1649bf0b8325f44, which broke the test. * guix/import/opam.scm (get-opam-repository): Prevent inlining. * tests/opam.scm ("opam->guix-package"): Mock 'get-opam-repository'. Ludovic Courtès
2020-12-08guix: opam: Pass default repository to recursive importer....* guix/import/opam.scm (opam->guix-package): Rename #:repository key to #:repo. (opam-recursive-import): Pass #:repo keyword. * tests/opam.scm (opam->guix-package): Rename #:repository to #:repo. Julien Lepiller
2020-10-02tests: opam: Test additional syntax....* tests/opam.scm (test-comment): New test. (test-lists): Add more tests for complex list patterns. Julien Lepiller
2020-10-02tests: opam: Factorize tests....* tests/opam.scm: Remove duplicate code. Julien Lepiller
2020-01-17import: opam: Avoid uses of '@@' in tests....* guix/import/opam.scm (string-pat, multiline-string, list-pat) (dict, condition): Export. (opam-fetch): Add optional 'repository' parameter. (opam->guix-package): Add #:repository parameter and pass it to 'opam-fetch'. * tests/opam.scm ("opam->guix-package"): Remove use of 'mock' and pass TEST-REPO to 'opam->guix-package' instead. ("parse-strings", "parse-multiline-strings") ("parse-lists", "parse-dicts", "parse-conditions"): Remove uses of '@@', which are no longer needed. Ludovic Courtès
2019-09-07tests: opam: Fix input type in import test....* tests/opam.scm: Expect propagated-inputs instead of inputs. Julien Lepiller
2019-02-05import: opam: Fix conditions....* guix/import/opam.scm (condition-eq, condition-neq): The first argument can be empty. * tests/opam.scm: Add test case. Julien Lepiller