Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow . in c_names and cxx_names #2036

Merged
merged 2 commits into from Apr 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -41,6 +41,8 @@ unreleased
`binaries` fields would be ignored, but instead they should be combined.
(#2029, @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
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
10 changes: 10 additions & 0 deletions test/blackbox-tests/dune.inc
Expand Up @@ -595,6 +595,14 @@
test-cases/github20
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name github2033)
(deps (package dune) (source_tree test-cases/github2033))
(action
(chdir
test-cases/github2033
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name github24)
(deps (package dune) (source_tree test-cases/github24))
Expand Down Expand Up @@ -1443,6 +1451,7 @@
(alias github1856)
(alias github1946)
(alias github20)
(alias github2033)
(alias github24)
(alias github25)
(alias github534)
Expand Down Expand Up @@ -1606,6 +1615,7 @@
(alias github1856)
(alias github1946)
(alias github20)
(alias github2033)
(alias github24)
(alias github25)
(alias github534)
Expand Down
3 changes: 3 additions & 0 deletions test/blackbox-tests/test-cases/github2033/dune
@@ -0,0 +1,3 @@
(library
(name hello_world)
(c_names file.xx))
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/github2033/dune-project
@@ -0,0 +1 @@
(lang dune 1.8)
Empty file.
2 changes: 2 additions & 0 deletions test/blackbox-tests/test-cases/github2033/run.t
@@ -0,0 +1,2 @@
. should be allowed in c names
$ dune build