From 925bc8442702c42ddf18ecfe7f5bc35f3b4634df Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 7 Aug 2018 19:53:51 +0300 Subject: [PATCH] Fix error message Signed-off-by: Rudi Grinberg --- src/jbuild.ml | 6 +++--- test/blackbox-tests/test-cases/no-name-field/run.t | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jbuild.ml b/src/jbuild.ml index 3859512c..bdbd5c13 100644 --- a/src/jbuild.ml +++ b/src/jbuild.ml @@ -51,7 +51,7 @@ end = struct type t = string let error_message = - "Error: invalid library name\n\ + "invalid library name.\n\ Hint: library names must be non-empty and composed only of \ the following characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'" @@ -934,8 +934,8 @@ module Library = struct of_sexp_errorf loc "%s.\n\ Public library names don't have this restriction. \ - You can either change this public name to be a valid \ - library name or add a `name` field with a valid library name." + You can either change this public name to be a valid library \ + name or add a \"name\" field with a valid library name." Lib_name.error_message else of_sexp_error loc "name field cannot be omitted before version \ diff --git a/test/blackbox-tests/test-cases/no-name-field/run.t b/test/blackbox-tests/test-cases/no-name-field/run.t index 86b8a2d2..563dbccd 100644 --- a/test/blackbox-tests/test-cases/no-name-field/run.t +++ b/test/blackbox-tests/test-cases/no-name-field/run.t @@ -22,7 +22,7 @@ there's only a public name but it's invalid as a name $ dune build --root public-name-invalid-name File "dune", line 1, characters 22-28: - Error: Error: invalid library name + Error: invalid library name. Hint: library names must be non-empty and composed only of the following characters: 'A'..'Z', 'a'..'z', '_' or '0'..'9'. - Public library names don't have this restriction. You can either change this public name to be a valid library name or add a `name` field with a valid library name. + Public library names don't have this restriction. You can either change this public name to be a valid library name or add a "name" field with a valid library name. [1]