Skip to content

Commit

Permalink
refactor: remove Dune_project.parsing_context (#7530)
Browse files Browse the repository at this point in the history
Dune_project.set_parsing_context already exists

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Apr 11, 2023
1 parent 4fa0bfa commit 3650952
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/dune_rules/dune_file.ml
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,9 @@ module Mode_conf = struct
~eq:(fun (a, _) (b, _) -> equal a b)
~parse:(fun ~loc s ->
let mode =
Dune_lang.Decoder.parse decode
(Dune_project.parsing_context project)
Dune_lang.Decoder.parse
(Dune_project.set_parsing_context project decode)
Univ_map.empty
(Atom (loc, Dune_lang.Atom.of_string s))
in
(mode, Kind.Requested loc))
Expand Down
2 changes: 0 additions & 2 deletions src/dune_rules/dune_project.ml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ let equal = ( == )

let hash = Poly.hash

let parsing_context t = t.parsing_context

let packages t = t.packages

let version t = t.version
Expand Down
2 changes: 0 additions & 2 deletions src/dune_rules/dune_project.mli
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ val equal : t -> t -> bool

val hash : t -> int

val parsing_context : t -> Univ_map.t

(** Return the path of the project file. *)
val file : t -> Path.Source.t

Expand Down

0 comments on commit 3650952

Please sign in to comment.