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

Lock: remove url section from generated lock file #5468

Merged
merged 2 commits into from
Mar 15, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ users)

## Lock
* Fix lock generation of multiple interdependent packages [#4993 @AltGr]
* Remove url section from lock file, it is ignored on pinning [#5465 @rjbou]

## Clean
* [NEW] Add `--untracked` option to remove interactively untracked files [{4915 @rjbou - fix #4831]
Expand Down
11 changes: 6 additions & 5 deletions src/client/opamLockCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,9 @@ let lock_opam ?(only_direct=false) st opam =
all_depends []
|> List.rev
in
opam |>
OpamFile.OPAM.with_depopts OpamFormula.Empty |>
OpamFile.OPAM.with_depends depends_formula |>
OpamFile.OPAM.with_conflicts conflicts |>
OpamFile.OPAM.with_pin_depends pin_depends
opam
|> OpamFile.OPAM.with_depopts OpamFormula.Empty
|> OpamFile.OPAM.with_depends depends_formula
|> OpamFile.OPAM.with_conflicts conflicts
|> OpamFile.OPAM.with_pin_depends pin_depends
|> OpamFile.OPAM.with_url_opt None
6 changes: 0 additions & 6 deletions tests/reftests/lock.test
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ name: "tolock"
opam-version: "2.0"
synopsis: "A word"
version: "1"
url {
src: "file://${BASEDIR}/tolock"
}
### opam lock tolock --lock-suffix new
Generated lock files for:
- tolock.1: ${BASEDIR}/tolock.opam.new
Expand Down Expand Up @@ -143,9 +140,6 @@ name: "tolock"
opam-version: "2.0"
synopsis: "A word"
version: "1"
url {
src: "file://${BASEDIR}/tolock"
}
### opam pin -n ./tolock --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to file://${BASEDIR}/tolock (version 1)
Expand Down