From 04b847b39ed2c54c9acc775ae0b9afa0ffa0c045 Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Wed, 28 Aug 2024 20:17:48 +0530 Subject: [PATCH] Subtle hint that topics is not a keyword (#10849) Number of projects in the opam-repository have the word topics as one of the tags, presumably because of the structure of the `tags` sexp in the dune-project file generated on `dune init`. See ocurrent/opam-ci-check#26 Signed-off-by: Puneeth Chaganti --- bin/dune_init.ml | 2 +- doc/changes/10849.md | 2 ++ test/blackbox-tests/test-cases/dune-init.t/run.t | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 doc/changes/10849.md diff --git a/bin/dune_init.ml b/bin/dune_init.ml index 59e660d140d..a01e608db72 100644 --- a/bin/dune_init.ml +++ b/bin/dune_init.ml @@ -391,7 +391,7 @@ module Component = struct ~dir ~synopsis:(Some "A short synopsis") ~description:(Some "A longer description") - ~tags:[ "topics"; "to describe"; "your"; "project" ] + ~tags:[ "add topics"; "to describe"; "your"; "project" ] ~depends: [ { Package_dependency.name = Package.Name.of_string "ocaml" ; constraint_ = None diff --git a/doc/changes/10849.md b/doc/changes/10849.md new file mode 100644 index 00000000000..7d2cebe1b8e --- /dev/null +++ b/doc/changes/10849.md @@ -0,0 +1,2 @@ +- Tweak the preset value for tags in the `dune-project` file to hint at topics + not having a special meaning. (#10849, @punchagan) diff --git a/test/blackbox-tests/test-cases/dune-init.t/run.t b/test/blackbox-tests/test-cases/dune-init.t/run.t index 420359ba7bc..9b13c2c9d33 100644 --- a/test/blackbox-tests/test-cases/dune-init.t/run.t +++ b/test/blackbox-tests/test-cases/dune-init.t/run.t @@ -359,7 +359,7 @@ In particular, the `dune-project` file has the expected content: (description "A longer description") (depends ocaml dune) (tags - (topics "to describe" your project))) + ("add topics" "to describe" your project))) ; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html @@ -379,7 +379,7 @@ And the opam file will be generated as expected maintainer: ["Maintainer Name "] authors: ["Author Name "] license: "LICENSE" - tags: ["topics" "to describe" "your" "project"] + tags: ["add topics" "to describe" "your" "project"] homepage: "https://github.com/username/reponame" doc: "https://url/to/documentation" bug-reports: "https://github.com/username/reponame/issues" @@ -469,7 +469,7 @@ In particular, the `dune-project` file has the expected content: (description "A longer description") (depends ocaml dune) (tags - (topics "to describe" your project))) + ("add topics" "to describe" your project))) ; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html @@ -489,7 +489,7 @@ And the opam file will be generated as expected maintainer: ["Maintainer Name "] authors: ["Author Name "] license: "LICENSE" - tags: ["topics" "to describe" "your" "project"] + tags: ["add topics" "to describe" "your" "project"] homepage: "https://github.com/username/reponame" doc: "https://url/to/documentation" bug-reports: "https://github.com/username/reponame/issues"