Skip to content

Commit

Permalink
Migrate init to cmdliner nested subcommands
Browse files Browse the repository at this point in the history
Closes #6161

Signed-off-by: Shon Feder <[email protected]>
  • Loading branch information
shonfeder authored and emillon committed Oct 11, 2022
1 parent 3f7b77e commit 8d1c35a
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 238 deletions.
21 changes: 0 additions & 21 deletions bin/dune_init.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,6 @@ module Dialect = Dune_engine.Dialect
syntax tree (CST) a good deal. *)
module Cst = Dune_lang.Cst

module Kind = struct
type t =
| Executable
| Library
| Project
| Test

let to_string = function
| Executable -> "executable"
| Library -> "library"
| Project -> "project"
| Test -> "test"

let commands =
[ ("executable", Executable)
; ("library", Library)
; ("project", Project)
; ("test", Test)
]
end

(** Abstractions around the kinds of files handled during initialization *)
module File = struct
type dune =
Expand Down
13 changes: 0 additions & 13 deletions bin/dune_init.mli
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

open! Stdune

(** Supported kinds of components for initialization *)
module Kind : sig
type t =
| Executable
| Library
| Project
| Test

val to_string : t -> string

val commands : (string * t) list
end

(** The context in which the initialization is executed *)
module Init_context : sig
type t =
Expand Down
Loading

0 comments on commit 8d1c35a

Please sign in to comment.