Skip to content

Commit

Permalink
Allow . in c_names and cxx_names
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Apr 9, 2019
1 parent 5ac44ec commit 2cb6a98
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ unreleased
- Do not exit dune if some source directories are unreadable. Instead, warn the
user that such directories need to be ignored (#2004, fix #310, @rgrinberg)

- Allow "." in `c_names` and `cxx_names` (#2036, fix #2033, @rgrinberg)

1.8.2 (10/03/2019)
------------------

Expand Down
2 changes: 1 addition & 1 deletion src/c.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Kind = struct
| Recognized of string * t

let split_extension fn ~dune_version =
match String.lsplit2 fn ~on:'.' with
match String.rsplit2 fn ~on:'.' with
| Some (obj, "c") -> Recognized (obj, C)
| Some (obj, "cpp") -> Recognized (obj, Cxx)
| Some (obj, "cxx") ->
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/github2033/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 1.8)
8 changes: 0 additions & 8 deletions test/blackbox-tests/test-cases/github2033/run.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
. should be allowed in c names
$ dune build
Info: creating file dune-project with this contents:
| (lang dune 1.9)

File "dune", line 3, characters 10-17:
3 | (c_names file.xx))
^^^^^^^
Error: file.xx does not exist as a C source. file.xx.c must be present
[1]

0 comments on commit 2cb6a98

Please sign in to comment.