Skip to content

Commit 428f1a2

Browse files
committed
Rename lockdirs to discourage checking them into version control
Dune's lock directories are currently not portable. Naming them "dune.lock" might suggest to users of other packgae managers that it is safe to check them into version control and share them between developers potentially using different machines. To discourage this behaviour, lockdirs are renamed from "dune.lock" to ".dune-solution-cache". The fact that this directory begins with a period and contains the word "cache" should hopefully discourage users from checking them into version control. For the same reason, the collection of dev tool lockdirs is renamed from "dev-tools.locks" to ".dune-tools-solution-cache". In the future it's likely we will enable portable lock directories by default, at which point they will become safe to check into version control. At this point we can change the default lock directory name back to "dune.lock" and encourage checking them into version control. Signed-off-by: Stephen Sherratt <[email protected]>
1 parent 13d972e commit 428f1a2

File tree

170 files changed

+534
-533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+534
-533
lines changed

bin/common.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ module Options_implied_by_dash_p = struct
246246
& opt_all ~vopt:true bool [ false ]
247247
& info [ "require-dune-project-file" ] ~docs ~doc)
248248
and+ ignore_lock_dir =
249-
let doc = "Ignore dune.lock/ directory." in
249+
let doc = "Ignore .dune-solution-cache/ directory." in
250250
Arg.(value & flag & info [ "ignore-lock-dir" ] ~docs ~doc)
251251
in
252252
{ root

bin/pkg/outdated.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ let info =
9393
; `P "For example:"
9494
; `Pre " \\$ dune pkg outdated"
9595
; `Noblank
96-
; `Pre " 1/2 packages in dune.lock are outdated."
96+
; `Pre " 1/2 packages in .dune-solution-cache are outdated."
9797
; `Noblank
9898
; `Pre " - ocaml 4.14.1 < 5.1.0"
9999
; `Noblank

bin/pkg/pkg_common.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ module Lock_dirs_arg = struct
181181
[]
182182
~docv:"LOCKDIRS"
183183
~doc:
184-
"Lock directories to check for outdated packages. Defaults to dune.lock.")
184+
"Lock directories to check for outdated packages. Defaults to \
185+
.dune-solution-cache.")
185186
in
186187
Selected (List.map arg ~f:Path.Source.of_string))
187188
(let+ _all =

doc/explanation/package-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ archives to download (since there is no central location for all archives), the
101101
build instructions (since each package can use its own way of building), and
102102
additional metadata like the system packages it depends upon.
103103

104-
The information is stored in a directory (`dune.lock` by default) as separate
104+
The information is stored in a directory (`.dune-solution-cache` by default) as separate
105105
files, to reduce potential merge conflicts and simplify code review. Storing
106106
additional files like patches is also simpler this way.
107107

doc/reference/dune-workspace/context.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the description of an opam switch, as follows:
1717

1818
- ``(lock_dir <path>)`` specifies the lock directory that will be used for
1919
building this context (if any). If no lock directory is specified
20-
``dune.lock`` will be used. See the
20+
``.dune-solution-cache`` will be used. See the
2121
:doc:`/reference/dune-workspace/lock_dir` stanza for lock directory
2222
configuration options.
2323

doc/reference/dune-workspace/lock_dir.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ changed if desired.
1919
.. describe:: (path <string>)
2020

2121
The location in the source tree where the lock directory will be
22-
created or read from. If not specified defaults to ``dune.lock``.
22+
created or read from. If not specified defaults to ``.dune-solution-cache``.
2323

2424
.. describe:: (repositories <name list>)
2525

doc/tutorials/dune-package-management/dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ to update our lock directory with the new packages.
2626

2727
```
2828
$ dune pkg lock
29-
Solution for dune.lock:
29+
Solution for .dune-solution-cache:
3030
- base-unix.base
3131
- fmt.0.9.0
3232
- ocaml.5.2.0
@@ -112,7 +112,7 @@ package is locked:
112112

113113
```
114114
$ dune pkg lock
115-
Solution for dune.lock:
115+
Solution for .dune-solution-cache:
116116
- base-unix.base
117117
- fmt.0.9.0
118118
- ocaml.5.2.0

doc/tutorials/dune-package-management/pinning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ the information from the selected package repositories.
3131

3232
```
3333
$ dune pkg lock
34-
Solution for dune.lock:
34+
Solution for .dune-solution-cache:
3535
- base-unix.base
3636
- fmt.dev
3737
- ocaml.5.0.0

doc/tutorials/dune-package-management/repos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies changes accordingly:
3535

3636
```
3737
$ dune pkg lock
38-
Solution for dune.lock:
38+
Solution for .dune-solution-cache:
3939
- base-unix.base
4040
- fmt.0.9.0
4141
- ocaml.5.0.0

doc/tutorials/dune-package-management/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ This is easily done with a new Dune command:
6363

6464
```
6565
$ dune pkg lock
66-
Solution for dune.lock:
66+
Solution for .dune-solution-cache:
6767
- ocaml.5.2.0
6868
- ocaml-base-compiler.5.2.0
6969
- ocaml-config.3

0 commit comments

Comments
 (0)