-
Notifications
You must be signed in to change notification settings - Fork 466
Open
Description
Expected Behavior
When (lock_dir (path ...)) is configured in dune-workspace, running dune pkg lock without arguments should create/update the lock directory at the path specified in the stanza, as per the documentation:
The location in the source tree where the lock directory will be created or read from. If not specified defaults to dune.lock.
Actual Behavior
dune pkg lock ignores the configured lock_dir stanza's path and always creates the lock at dune.lock. The custom path is only used when explicitly passed as an argument: dune pkg lock foo.
This is where the potential bug is: pkg_common.ml#L189 - for example assuming (lock_dir (path foo)):
dune pkg lock(with no argument) defaults todefault_path(=dune.lock), completely ignoring thelock_dirstanza.dune pkg lock fooworks as intended as creates the locks infoo, anddune pkg lock barresults in:
$ dune pkg lock bar
Error: The following directories are not lock directories in this workspace:
- bar
This workspace contains the following lock directories:
- dune.lock
- foo
Happy to submit a patch, but is this an expected behavior?
Specifications
- dune@3.21.1
- aarch64-darwin
Reactions are currently unavailable