Skip to content

Commit

Permalink
refactor(rules): remove pointless qualification (#7021)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Feb 8, 2023
1 parent c8f392f commit 06dde72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dune_rules/expander.ml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ let expand_version { scope; _ } ~source s =
let libname = Lib_name.of_string s in
let pkgname = Lib_name.package_name libname in
if not (String.equal (Package.Name.to_string pkgname) s) then
User_error.raise ~loc:source.Dune_lang.Template.Pform.loc
User_error.raise ~loc:source.loc
[ Pp.textf
"Library names are not allowed in this position. Only package \
names are allowed"
Expand All @@ -150,7 +150,7 @@ let expand_version { scope; _ } ~source s =
Lib.DB.find (Scope.libs scope) libname >>| function
| Some lib -> value_from_version (Lib_info.version (Lib.info lib))
| None ->
User_error.raise ~loc:source.Dune_lang.Template.Pform.loc
User_error.raise ~loc:source.loc
[ Pp.textf
"Package %S doesn't exist in the current project and isn't \
installed either."
Expand Down

0 comments on commit 06dde72

Please sign in to comment.