Skip to content

Commit

Permalink
Deprecate no_keep_locs
Browse files Browse the repository at this point in the history
Fixes #1816

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
  • Loading branch information
jeremiedimino committed Feb 11, 2019
1 parent 48ec8fb commit 8607059
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ unreleased
- Add `DUNE_PROFILE` environment variable to easily set the profile. (#1806,
@rgrinberg)

- Deprecate the undocumented `(no_keep_locs)` field. It was only
necessary until virtual libraries were supported (#1822, fix #1816,
@diml)

1.6.2 (05/12/2018)
------------------

Expand Down
5 changes: 3 additions & 2 deletions doc/dune-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ to use the :ref:`include_subdirs` stanza.
- ``(allow_overlapping_dependencies)`` allows external dependencies to
overlap with libraries that are present in the workspace

- ``(no_keep_locs)`` undocumented, it is a necessary hack until this
is implemented: https://github.com/ocaml/dune/issues/921
- ``(no_keep_locs)`` does nothing. It used to be a necessary hack when
we were waiting for proper support for virtual libraries. Do not use
in new code, it will be deleted in dune 2.0

Note that when binding C libraries, dune doesn't provide special support for
tools such as ``pkg-config``, however it integrates easily with configurator_ by
Expand Down
1 change: 1 addition & 0 deletions src/dune_file.ml
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ module Library = struct
located (field "self_build_stubs_archive" (option string) ~default:None)
and no_dynlink = field_b "no_dynlink"
and no_keep_locs = field_b "no_keep_locs"
~check:(Syntax.deprecated_in Stanza.syntax (1, 7))
and sub_systems =
return () >>= fun () ->
Sub_system_info.record_parser ()
Expand Down

This file was deleted.

15 changes: 15 additions & 0 deletions test/blackbox-tests/test-cases/syntax-versioning/run.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$ echo '(lang dune 1.0)' > dune-project

$ echo '(jbuild_version 1)' > dune
$ dune build
File "dune", line 1, characters 0-18:
Expand Down Expand Up @@ -35,3 +37,16 @@
... %{x} ...
[1]
$ rm -f dune

$ echo '(lang dune 1.7)' > dune-project
$ cat > dune <<EOF
> (library
> (name foo)
> (no_keep_locs))
> EOF
$ dune build
File "dune", line 3, characters 1-15:
3 | (no_keep_locs))
^^^^^^^^^^^^^^
Warning: 'no_keep_locs' was deprecated in version 1.7 of the dune language
$ rm -f dune

0 comments on commit 8607059

Please sign in to comment.