Skip to content

Commit 2cf63d7

Browse files
committed
dead_code_analyzer:state: cleanup fields and constrs
1 parent ef339aa commit 2cf63d7

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

src/state/opamStateTypes.mli

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,6 @@ type +'lock switch_state = {
200200
reinstall: package_set Lazy.t;
201201
(** The set of packages which need to be reinstalled *)
202202

203-
invalidated: package_set Lazy.t;
204-
(** The set of packages which are installed but no longer valid, e.g. because
205-
of removed system dependencies. Only packages which are unavailable end up
206-
in this set, they are otherwise put in {!field:reinstall}. *)
207-
208203
overwrote_opams: (bool * OpamFile.OPAM.t) package_map;
209204
(** In case of simulated pins, keep the old information of opam files. The
210205
boolean is set to true if the package was previously pinned. *)

src/state/opamSwitchState.ml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -637,12 +637,6 @@ let load lock_kind gt rt switch =
637637
(Lazy.force ext_files_changed %% Lazy.force available_packages) ++
638638
Lazy.force sys_packages_changed
639639
) in
640-
let invalidated = lazy (
641-
Lazy.force changed ++
642-
Lazy.force ext_files_changed ++
643-
Lazy.force sys_packages_changed
644-
-- Lazy.force available_packages
645-
) in
646640
let st = {
647641
switch_global = (gt :> unlocked global_state);
648642
switch_repos = (rt :> unlocked repos_state);
@@ -651,7 +645,7 @@ let load lock_kind gt rt switch =
651645
repos_package_index; installed_opams;
652646
installed; pinned; installed_roots;
653647
opams; conf_files;
654-
packages; available_packages; sys_packages; reinstall; invalidated;
648+
packages; available_packages; sys_packages; reinstall;
655649
overwrote_opams = OpamPackage.Map.empty;
656650
} in
657651
log "Switch state loaded in %.3fs" (chrono ());
@@ -696,7 +690,6 @@ let load_virtual ?repos_list ?(avail_default=true) gt rt =
696690
sys_packages = lazy OpamPackage.Map.empty;
697691
available_packages;
698692
reinstall = lazy OpamPackage.Set.empty;
699-
invalidated = lazy (OpamPackage.Set.empty);
700693
overwrote_opams = OpamPackage.Map.empty;
701694
}
702695

0 commit comments

Comments
 (0)