Skip to content

Commit

Permalink
Do not generate opam files by default
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed May 6, 2019
1 parent 3c53a3b commit 747dcba
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
(name dune)

(implicit_transitive_deps false)
(generate_opam_files true)

(license MIT)
(maintainers "Jane Street Group, LLC <opensource@janestreet.com>")
Expand Down
4 changes: 2 additions & 2 deletions src/dune_project.ml
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ let anonymous = lazy (
; parsing_context
; dune_version = lang.version
; allow_approx_merlin = true
; generate_opam_files = true
; generate_opam_files = false
})

let default_name ~dir ~packages =
Expand Down Expand Up @@ -672,7 +672,7 @@ in your project.")
in
let allow_approx_merlin =
Option.value ~default:false allow_approx_merlin in
let generate_opam_files = Option.value ~default:true generate_opam_files in
let generate_opam_files = Option.value ~default:false generate_opam_files in
{ name
; root = dir
; version
Expand Down
9 changes: 5 additions & 4 deletions src/install_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,13 @@ let install_file sctx (package : Local_package.t) entries =
:: docs
in
let files =
let project = Local_package.project package in
if Dune_project.generate_opam_files project then
let package = Local_package.package package in
match package.kind with
| Dune false -> files
| Dune true
| Opam ->
(None, Install.Entry.make Lib opam_file ~dst:"opam")
:: files
else
files
in
local_install_rules sctx ~package:package_name ~install_paths files
|> List.rev_append entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
(license ISC)
(authors "Anil Madhavapeddy" "Rudi Grinberg")

(generate_opam_files true)

(package
(name cohttp)
(synopsis "An OCaml library for HTTP clients and servers")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
(license ISC)
(authors "Anil Madhavapeddy" "Rudi Grinberg")

(generate_opam_files true)

(package
(name cohttp)
(synopsis "An OCaml library for HTTP clients and servers")
Expand Down

0 comments on commit 747dcba

Please sign in to comment.