Skip to content

Commit

Permalink
Default maintenance_intent to (latest)
Browse files Browse the repository at this point in the history
Signed-off-by: ArthurW <[email protected]>
  • Loading branch information
art-w committed Jan 10, 2025
1 parent be0a9b6 commit 5353bb8
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 8 deletions.
1 change: 1 addition & 0 deletions otherlibs/dune-site/test/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Test with an opam like installation
]
["dune" "install" "-p" name "--create-install-files" name]
]
x-maintenance-intent: ["(latest)"]

$ dune build -p a --promote-install-files=false @install

Expand Down
1 change: 1 addition & 0 deletions otherlibs/dune-site/test/run_2_9.t
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Test with an opam like installation
]
["dune" "install" "-p" name "--create-install-files" name]
]
x-maintenance-intent: ["(latest)"]

$ dune build -p a --promote-install-files="false" @install

Expand Down
2 changes: 1 addition & 1 deletion src/dune_config_file/dune_config_file.ml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ module Dune_config = struct
; project_defaults =
{ authors = Some [ "Author Name <[email protected]>" ]
; maintainers = Some [ "Maintainer Name <[email protected]>" ]
; maintenance_intent = Some [ "(latest)" ]
; maintenance_intent = None
; license = Some [ "LICENSE" ]
}
; experimental = []
Expand Down
5 changes: 4 additions & 1 deletion src/dune_rules/opam_create.ml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ let opam_fields project (package : Package.t) =
in
let list_fields =
[ "maintainer", Package_info.maintainers info
; "x-maintenance-intent", Package_info.maintenance_intent info
; ( "x-maintenance-intent"
, match Package_info.maintenance_intent info with
| None -> Some [ "(latest)" ]
| x -> x )
; "authors", Package_info.authors info
; ( "license"
, match Package_info.license info with
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/describe/describe.t
Original file line number Diff line number Diff line change
Expand Up @@ -1373,4 +1373,5 @@ opam file listing
\"@doc\" {with-doc}
]
]
x-maintenance-intent: [\"(latest)\"]
"))
2 changes: 2 additions & 0 deletions test/blackbox-tests/test-cases/dune-init.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ And the opam file will be generated as expected
]
]
dev-repo: "git+https://github.com/username/reponame.git"
x-maintenance-intent: ["(latest)"]

We can build and run the resulting executable:

Expand Down Expand Up @@ -513,6 +514,7 @@ And the opam file will be generated as expected
]
]
dev-repo: "git+https://github.com/username/reponame.git"
x-maintenance-intent: ["(latest)"]

And we we can run the tests:

Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-package.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Install as opam does
"@doc" {with-doc}
]
]
x-maintenance-intent: ["(latest)"]

$ (cd a; "dune" "build" "-p" a "@install")

Expand Down
3 changes: 3 additions & 0 deletions test/blackbox-tests/test-cases/dune-project-meta/dune-dep.t
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ the doc dependencies:
]
["dune" "install" "-p" name "--create-install-files" name]
]
x-maintenance-intent: ["(latest)"]

$ cat > dune-project <<EOF
> (lang dune 3.0)
Expand All @@ -215,6 +216,7 @@ the doc dependencies:
"@doc" {with-doc}
]
]
x-maintenance-intent: ["(latest)"]

$ cat > dune-project <<EOF
> (lang dune 3.0)
Expand All @@ -240,3 +242,4 @@ the doc dependencies:
"@doc" {with-doc}
]
]
x-maintenance-intent: ["(latest)"]
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ Reproduction case for #2927
"@doc" {with-doc}
]
]
x-maintenance-intent: ["(latest)"]
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-project-meta/v11-1.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Generation of opam files with lang dune >= 1.11
"@doc" {with-doc}
]
]
x-maintenance-intent: ["(latest)"]
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/opam-constraints.t
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ constraints.
"@doc" {with-doc}
]
]
x-maintenance-intent: ["(latest)"]
12 changes: 6 additions & 6 deletions test/expect-tests/dune_config_file/dune_config_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ let%expect_test "cache-check-probability 0.1" =
; project_defaults =
{ authors = Some [ "Author Name <[email protected]>" ]
; maintainers = Some [ "Maintainer Name <[email protected]>" ]
; maintenance_intent = Some [ "(latest)" ]
; maintenance_intent = None
; license = Some [ "LICENSE" ]
}
; experimental = []
}
|}]
|}]
;;

let%expect_test "cache-storage-mode copy" =
Expand All @@ -54,12 +54,12 @@ let%expect_test "cache-storage-mode copy" =
; project_defaults =
{ authors = Some [ "Author Name <[email protected]>" ]
; maintainers = Some [ "Maintainer Name <[email protected]>" ]
; maintenance_intent = Some [ "(latest)" ]
; maintenance_intent = None
; license = Some [ "LICENSE" ]
}
; experimental = []
}
|}]
|}]
;;

let%expect_test "cache-storage-mode hardlink" =
Expand All @@ -78,10 +78,10 @@ let%expect_test "cache-storage-mode hardlink" =
; project_defaults =
{ authors = Some [ "Author Name <[email protected]>" ]
; maintainers = Some [ "Maintainer Name <[email protected]>" ]
; maintenance_intent = Some [ "(latest)" ]
; maintenance_intent = None
; license = Some [ "LICENSE" ]
}
; experimental = []
}
|}]
|}]
;;

0 comments on commit 5353bb8

Please sign in to comment.