Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ users)

## Clean

* Use the [dead_code_analyzer](https://github.com/LexiFi/dead_code_analyzer) to remove unused exported values, fields and constructors [#6954 @fantazio]

## Env

## Opamfile
Expand Down Expand Up @@ -210,10 +212,24 @@ users)
* `OpamSolution` remove the heuristic of recomputing depexts of additional (pinned) packages. [#6489 @arozovyk]
* `OpamClient` update the system package status check for dependencies during `opam install --deps-only`, including support for pinned packages; also update this in `OpamAuxCommands.autopin` [#6489 @arozovyk]
* `OpamSolution.get_depexts` remove no longer needed `recover` option that was used with `--depext-only` option [#6489 @arozovyk]
* `OpamAdminCheck`: remove `installability_check`, `cycle_check`, and `get_obsolete` [#6954 @fantazio]
* `OpamArg`: remove `cli2_5`, `escape_path`, `name_list`, `param_list`, `atom_list`, `nonempty_atom_list`, `locked`, `package_with_version`, `atom_or_local`, `atom_or_dir`, `opamlist_columns`, and `scrubbed_environment_variables` [#6954 @fantazio]
* `OpamAuxCommands`: remove `name_and_dir_of_opam_file`, and `resolve_locals` [#6954 @fantazio]
* `OpamCliMain`: remove `check_and_run_external_commands`, `main_catch_all`, `json_out`, and `run` [#6954 @fantazio]
* `OpamClient`: remove `reinstall_t`, `upgrade_t`, and `PIN.post_pin_action` [#6954 @fantazio]
* `OpamClientConfig`: remove `search_files` [#6954 @fantazio]
* `OpamConfigCommand`: remove `parse_whole` [#6954 @fantazio]
* `OpamInitDefaults`: remove `default_compiler`, and `eval_variables` [#6954 @fantazio]
* `OpamListCommand`: remove `field_of_string`, `pattern_selector.ext_fields`, and `selector.Atoms` [#6954 @fantazio]
* `OpamCommand`: remove `update_global_selection` [#6954 @fantazio]
* `OpamSolution`: remove `eq_atom`, and `sum` [#6954 @fantazio]

## opam-repository
* `OpamRepositoryPath` was moved to `opam-format` [#6917 @rjbou]
* `OpamRepositoryRoot` was added [#6680 @kit-ty-kate @rjbou]
* `OpamRepository`: remove `find_backend` [#6954 @fantazio]
* `OpamRepositoryBackend`: remove `to_json`, `compare`, and `check_digest` [#6954 @fantazio]
* `OpamRepositoryConfig`: remove `E.curl`, and `E.fetch` [#6954 @fantazio]

## opam-state
* `OpamStateConfig.t`: replace `no_depexts` fields that contains disabling informations by `depexts` field that returns if the depexts mechanism is enabled. This field is automatically update by global config value in `OpamStateConfig.load_defaults` [#6489 @rjbou]
Expand All @@ -236,9 +252,21 @@ users)
* `OpamUpdate.get_sys_available`: factorize depexts availability computation logic from `OpamUpdate.repositories` [#6489 @arozovyk]
* `OpamRepositoryState`: add `syspkgs_available` that returns the stored depext availability status in repository state [#6489 @rjbou]
* `OpamSysInteract`: add `available_packages_and_family` that returns availability status and the os family [#6489 @rjbou]
* `OpamEnv`: remove `get_opam`, `get_opam_raw`, `cygwin_non_shadowed_programs`, `path`, `update_user_setup`, `write_static_init_scripts`, and `clear_dynamic_init_scripts` [#6954 @fantazio]
* `OpamFileTools`: remove `lint_string` [#6954 @fantazio]
* `OpamFormatUpgrade`: remove `latest_version` [#6954 @fantazio]
* `OpamGlobalState`: remove `all_installed`, and `unlock` [#6954 @fantazio]
* `OpamRepositoryState`: remove `load_repo`, and `cleanup` [#6954 @fantazio]
* `OpamScript`: remove `prompt` [#6954 @fantazio]
* `OpamStateConfig`: remove `safe_load`, and `load_config_root` [#6954 @fantazio]
* `OpamSwitchState`: remove `get_conflicts_t`, `unlock`, `descr`, `descr_opt`, and `dev_packages` [#6954 @fantazio]
* `OpamUpdate`: remove `dev_package`, `pinned_packages, and `pinned_package` [#6954 @fantazio]
* `OpamStateTypes`: remove `switch_state.invalidated` [#6954 @fantazio]


## opam-solver
* `OpamCudf`: remove `Package.equal`, `Package.compare`, `Package.to_json`, `Package.of_json`, `diff`, `check_request`, `get_final_universe`, `actions_of_diff`, `remove`, `uninstall_all`, `install`, `remove_all_uninstalled_versions_but`, `opam_invariant_package_name`, `opam_deprequest_package_name`, `unavailable_package`, `is_unavailable_package`, `string_of_vpkgs`, `string_of_explanation`, `conflict_cycles`, `string_of_atom`, `string_of_request`, `string_of_universe`, `string_of_packages`, `packages`, `to_cudf`, and `Json` [#6954 @fantazio]
* `OpamSolver`: remove `empty_universe`, `string_of_request`, `solution_to_json`, `solution_of_json`, `cudf_versions_map`, `check_for_conflicts`, and `coinstallability_check` [#6954 @fantazio]

## opam-format
* `OpamFile.Descr` was moved to `OpamFile.Descr_legacy` and a simpler `OpamFile.Descr` module was created only containing non-IO functions removing the outdated `descr` file support [#6827 @kit-ty-kate]
Expand All @@ -254,6 +282,25 @@ users)
* `OpamRepositoryPath` was moved from `opam-repository` [#6917 @rjbou]
* `OpamRepositoryPath.{root,repo,packages_dir,packages,opam,files,descr,url}: have been moved to a new `OpamRepositoryPath.Make` functor [#6680 @rjbou @kit-ty-kate]
* `OpamFilter.expand_interpolations_in_file`: changed argument type from `basename` to `filename` [#6910 @NathanReb]
* `OpamFile.Config`: remove `with_best_effort_prefix`, `with_solver`, and `with_dl_tool` [#6954 @fantazio]
* `OpaFile.InitConfig`: remove `opam_version`, `with_jobs`, `with_dl_jobs`, `with_dl_cache`, `with_solver_criteria`, `with_solver`, and `with_global_variables` [#6954 @fantazio]
* `OpamFile.Descr_legacy`: remove `of_string`, and `full` [#6954 @fantazio]
* `OpamFile.URL`: remove `with_mirrors`, `with_swhid`, `with_subpath`, and `with_subpath_opt` [#6954 @fantazio]
* `OpamFile.Environment`: remove `read`, `read_from_channel`, and `read_from_string` [#6954 @fantazio]
* `OpamFile.Comp`: remove `create_preinstalled`, `opam_version`, `name`, `src`, `configure`, `make`, `make`, `env`, `tags`, `with_src`, `with_patches`, `with_configure`, `with_make`, `with_build`, and `with_packages` [#6954 @fantazio]
* `OpamFile.Dot_installed`: remove `with_bin`, `with_sbin`, `with_lib`, `with_toplevel`, `with_stublibs`, `with_share`, `with_share_root`, `with_etc`, `with_doc`, `with_man`, `with_libexec`, `with_lib_root`, `with_libexec_root`, and `with_misc` [#6954 @fantazio]
* `OpamFile.Dot_config: remove `variables` [#6954 @fantazio]
* `OpamFile.Report`: remove `browse`, `with_browse`, `with_upstream`, `with_announce`, and `with_stamp_opt` [#6954 @fantazio]
* `OpamFile.Syntax`: remove `pp_channel`, `to_channel`, `to_string`, and `to_string_with_preserved_format` [#6954 @fantazio]
* `OpamFilter`: remove `string_interp_regex`, `eval_to_string`, `ident_value`, `ident_bool`, `expand_interpolations_in_file_full`, and `gen_filter_formula` [#6954 @fantazio]
* `OpamFormat`: remove `value_pos`, `V.simple_arg`, `V.group`, `V.map_group`, `V.filter_ident`, `V.package_atom`, `I.file`, `I.item`, and `I.extract_field` [#6954 @fantazio]
* `OpamFormula`: remove `compare_relop`, `compare_version_constraint`, `string_of_disjunction`, `string_of_cnf`, `string_of_dnf`, `compare`, `compare_nc`, `formula_to_cnf`, `dnf_of_formula`, `simplify_ineq_formula`, `to_conjunction`, `of_conjunction`, `to_disjunction`, and `of_disjunction` [#6954 @fantazio]
* `OpamPath`: remove `backup`, `plugins`, `plugin`, `Switch.meta_dirname`, `Switch.extra_file`, `Switch.Default.lib_dir`, `Switch.Default.stublibs`, `Switch.Default.toplevel`, `Switch.Default.doc_dir`, `Switch.Default.share_dir`, `Switch.Default.etc_dir`, `Switch.Default.man_dir`, `Switch.Default.man_dirs`, `Switch.Default.sbin`, `Switch.DefaultF.doc_dir`, `Switch.DefaultF.etc_dir`, and `Switch.DefaultF.man_dirs` [#6954 @fantazio]
* `OpamPp`: remove `ignore` [#6954 @fantazio]
* `OpamSysPkg`: remove `string_of_status`, and `string_of_to_install` [#6954 @fantazio]
* `OpamTypesBase`: remove `map_atomic_action`, `map_highlevel_action`, `map_concrete_action`, `nullify_pos_map`, `pos_best`, `iter_success`, `env_update`, `switch_selections_compare`, `simple_arg_equal`, and `arg_equal` [#6954 @fantazio]
* `OpamTypes`: remove `universe.u_action` [#6954 @fantazio]
* `OpamTypes`: make type `lock` private [#6954 @fantazio]

## opam-core
* `OpamCmdliner` was added. It is accessible through a new `opam-core.cmdliner` sub-library [#6755 @kit-ty-kate]
Expand All @@ -277,3 +324,19 @@ users)
* `OpamSystem.in_dir`: removed [#6910 @NathanReb]
* `OpamSystem.chdir`: removed [#6910 @NathanReb]
* `OpamSystem.{command,commands,read_command_output}`: add a `?dir: dirname` optional arg to launch the command in a specific directory [#6910 @NathanReb]
* `Cmdliner_msg`: remove `pp_try_help` [#6954 @fantazio]
* `Cmdliner_trie`: remove `is_empty` [#6954 @fantazio]
* `OpamCmdliner.Manpage`: remove `title`, `t`, `s_name`, `s_synopsis`, `s_environment_intro`, `s_see_also`, `s_none`, and `print` [#6954 @fantazio]
* `OpamCmdliner.Term`: remove `app`, `map`, `product`, `Syntax`, `term_result`, `term_result'`, `cli_parse_result`, `cli_parse_result'`, `main_name`, `with_used_args`, `exit_info`, `default_exits`, `default_error_exits`, `env_info`, `name`, `eval_choice`, `eval_peek_opts`, `exit_status_success`, `exit_status_cli_error`, `exit_status_internal_error`, `exit_status_of_result`, `exit_status_of_status_result`, `exit`, `exit_status`, `pure`, and `man_format` [#6954 @fantazio]
* `OpamCmdliner.Cmd`: remove `Exit.ok`, `Exit.some_error`, `Exit.cli_error`, `Exit.internal_error`, `Exit.info`, `Exit.info_code`, `Exit.defaults`, `Env.var`, `Env.info`, `eval`, `eval'`, `eval_result`, `eval_result'`, `eval_exit`, `eval_value'`, and `eval_peek_opts` [#6954 @fantazio]
* `OpamCmdliner.Arg`: remove `conv`, `conv'`, `conv_parser`, `conv_printer`, `conv_docv`, `parser_of_kind_of_string`, `some'`, `pos_left`, `last`, `bool`, `char`, `nativeint`, `int32`, `int64`, `float` `file`, `dir`, `non_dir_file`, `array`, `t2`, `t3`, `t4`, `doc_quote`, `doc_alts`, `converter`, `pconv`, `env`, and `env_var` [#6954 @fantazio]
* `OpamConsole`: remove `color`, `utf8_extended`, `acolor`, `acolor_w`, `Symbols.latin_capital_letter_o_with_stroke`, and `Tree.get_default_symbols` [#6954 @fantazio]
* `OpamCoreConfig`: remove `E.confirmlevel`, `E.yes`, `set`, and `setk` [#6954 @fantazio]
* `OpamDirTrack`: remove `is_empty`, and `string_of_change` [#6954 @fantazio]
* `OpamFilename`: remove `env_of_list`, `to_list_dir`, `with_open_out_bin`, `with_tmp_file`, `with_tmp_file_job`, `with_contents`, `copy_in`, `extract_generic_file`, `with_flock_write_then_read`, `Attribute.to_string_list`, and `Attribute.of_string_list` [#6954 @fantazio]
* `OpamHash`: remove `md5`, `sha256`, and `sha512` [#6954 @fantazio]
* `OpamProcess`: remove `is_verbose`, `Job.seq_map`, and `t.p_info` [#6954 @fantazio]
* `OpamSHA`: remove `sha1_file`, `sha256_file`, `sha512_file`, `sha1_string`, `sha256_string`, and `sha512_string` [#6954 @fantazio]
* `OpamSystem`: remove `verbose_for_base_commands`, `get_files`, `files_with_links`, `directories_with_links`, `lock_max`, `register_printer`, and `classify_executable` [#6954 @fantazio]
* `OpamVersion`: remove `major`, `git`, and `message` [#6954 @fantazio]
* `OpamVersionCompare`: remove `equal` [#6954 @fantazio]
1 change: 0 additions & 1 deletion src/client/opamAdminCheck.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ let get_universe opams =
let packages = OpamPackage.keys opams in
{
u_packages = packages;
u_action = Query;
u_installed = OpamPackage.Set.empty;
u_available = lazy packages;
u_depends =
Expand Down
13 changes: 0 additions & 13 deletions src/client/opamAdminCheck.mli
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@

open OpamTypes

(** Analyses a given package universe, and returns
[uninstallable_roots,uninstallable]. The first is a subset of the second,
where internal dependents have been removed. *)
val installability_check: universe -> package_set * package_set

(** Analyses a universe for dependency cycles. Returns the set of packages
involved, and the cycles (reduced to formula lists) *)
val cycle_check: universe -> package_set * formula list list

(** Runs checks on the repository at the given repository. Returns
[all_packages], [uninstallable_roots], [uninstallable], [cycle_packages],
[obsolete_packages]. If the corresponding option was disabled, the returned
Expand All @@ -27,7 +18,3 @@ val check:
quiet:bool -> installability:bool -> cycles:bool -> obsolete:bool ->
OpamRepositoryRoot.Dir.t ->
package_set * package_set * package_set * package_set * package_set

(** Returns a subset of "obsolete" packages, i.e. packages for which a strictly
better version exists *)
val get_obsolete: universe -> OpamFile.OPAM.t package_map -> package_set
18 changes: 0 additions & 18 deletions src/client/opamArg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,15 +1209,6 @@ let formula_flag ?section cli =
dependencies in package definition files, e.g. '\"foo\" {>= \"1.1\"}'"
dep_formula OpamFormula.Empty

let name_list =
arg_list "PACKAGES" "List of package names." package_name

let atom_list =
arg_list "PACKAGES"
"List of package names, with an optional version or constraint, \
e.g `pkg', `pkg.1.0' or `pkg>=0.5'."
atom

let atom_or_local_list =
arg_list "PACKAGES"
(Printf.sprintf
Expand All @@ -1234,15 +1225,6 @@ let atom_or_dir_list =
description, with explicit directory (e.g. `.%ssrcdir' or `.')" dir_sep)
atom_or_dir

let nonempty_atom_list =
nonempty_arg_list "PACKAGES"
"List of package names, with an optional version or constraint, \
e.g `pkg', `pkg.1.0' or `pkg>=0.5'."
atom

let param_list =
arg_list "PARAMS" "List of parameters." Arg.string

(* Options common to all commands *)
let global_options cli =
let section = global_option_section in
Expand Down
30 changes: 0 additions & 30 deletions src/client/opamArg.mli
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ val cli2_1: OpamCLIVersion.t
val cli2_2: OpamCLIVersion.t
val cli2_3: OpamCLIVersion.t
val cli2_4: OpamCLIVersion.t
val cli2_5: OpamCLIVersion.t

(* [cli_from ?platform ?experimental since] validity flag since [since], and no
removal version. If [experimental] is true, it is marked as is (warning and
Expand Down Expand Up @@ -96,9 +95,6 @@ val mk_vflag_all:
manpage strings *)
val dir_sep: string

(* Escape Windows path *)
val escape_path: string -> string

(** {2 Flags} *)

(** --short *)
Expand All @@ -125,18 +121,6 @@ val jobs_flag:
val formula_flag:
?section:string -> OpamCLIVersion.Sourced.t -> formula Term.t

(** package names *)
val name_list: name list Term.t

(** parameters *)
val param_list: string list Term.t

(** package list with optional constraints *)
val atom_list: OpamFormula.atom list Term.t

(** package list with optional constraints *)
val nonempty_atom_list: OpamFormula.atom list Term.t

val atom_or_local_list:
[ `Atom of atom | `Filename of filename | `Dirname of dirname ] list
Term.t
Expand Down Expand Up @@ -213,7 +197,6 @@ val subpath: ?section:string -> OpamCLIVersion.Sourced.t -> subpath option Term.
val apply_build_options: OpamCLIVersion.Sourced.t -> build_options -> unit

(** Lock options *)
val locked: ?section:string -> OpamCLIVersion.Sourced.t -> bool Term.t
val lock_suffix: ?section:string -> OpamCLIVersion.Sourced.t -> string Term.t

(** Checksum options *)
Expand Down Expand Up @@ -278,19 +261,9 @@ val package_version: version Arg.conv
(** [name{.version}] (or [name=version]) *)
val package: (name * version option) Arg.conv

(** [name.version] (or [name=version]) *)
val package_with_version: package Arg.conv

(** [name{(.|=|!=|>|<|>=|<=)version}] converter*)
val atom: atom Arg.conv

(** Accepts [atom] but also (explicit) file and directory names *)
val atom_or_local:
[ `Atom of atom | `Filename of filename | `Dirname of dirname ] Arg.conv

val atom_or_dir:
[ `Atom of atom | `Dirname of dirname ] Arg.conv

(** Formula, in the same format as [depends:] in opam files *)
val dep_formula: formula Arg.conv

Expand All @@ -300,8 +273,6 @@ val variable_bindings: (OpamVariable.t * string) list Arg.conv
(** Warnings string ["+3..10-4@12"] *)
val warn_selector: (int * [`Enable | `Disable | `EnableError]) list Arg.conv

val opamlist_columns: OpamListCommand.output_format list Arg.conv

val hash_kinds : OpamHash.kind Arg.conv

(** {2 Subcommands} *)
Expand Down Expand Up @@ -384,4 +355,3 @@ val help_sections: OpamCLIVersion.Sourced.t -> Manpage.block list

val preinit_opam_env_variables: unit -> unit
val init_opam_env_variabes: OpamCLIVersion.Sourced.t -> unit
val scrubbed_environment_variables: string list
14 changes: 0 additions & 14 deletions src/client/opamAuxCommands.mli
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ val remove_files_from_destdir: 'a switch_state -> dirname -> package_set -> unit
suffixing `#current-branch` if no branch/tag/hash was specified. *)
val url_with_local_branch: url -> url

(** From an in-source opam file, return the corresponding package name if it can
be found, and the corresponding source directory *)
val name_and_dir_of_opam_file: ?locked:string -> filename -> name option * dirname

(** From a directory, retrieve its opam files and returns packages name, opam
file and subpath option *)
val opams_of_dir:
Expand All @@ -49,16 +45,6 @@ val opams_of_dir_w_target:
?same_kind:(OpamUrl.t -> bool) -> OpamUrl.t -> OpamFilename.Dir.t ->
name_and_file_w_url list

(** Resolves the opam files and directories in the list to package name and
location, and returns the corresponding pinnings and atoms. May fail and
exit if package names for provided [`Filename] could not be inferred, or if
the same package name appears multiple times.
*)
val resolve_locals:
?quiet:bool -> ?locked:string -> ?recurse:bool -> ?subpath:subpath ->
[ `Atom of atom | `Filename of filename | `Dirname of dirname ] list ->
name_and_file_w_url list * atom list

(** Resolves the opam files and directories in the list to package name and
location, according to what is currently pinned, and returns the
corresponding list of atoms. Prints warnings for directories where nothing
Expand Down
22 changes: 0 additions & 22 deletions src/client/opamCliMain.mli
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,5 @@

exception InvalidCLI of OpamCLIVersion.Sourced.t

(** Handles calling opam plugins (à la git). E.g. [opam publish] runs
[opam-publish] from PATH, with specific addition of OpamPath.plugins_bin and
the current switch bin directory).

Note that this does load some configuration and env, but only handles a
leading [--yes] argument.
@raise InvalidCLI *)
val check_and_run_external_commands:
unit -> OpamCLIVersion.Sourced.t * string list

(** Handles flushing buffers and catching exceptions from the main call,
including special cases like {!OpamStd.Sys.Exec} that is expected to do a
{!Unix.exec}, but after all proper cleanup has been done. *)
val main_catch_all: (unit -> unit) -> unit

(** Handling of debug JSON output, according to {!OpamClientConfig.json_out} *)
val json_out: unit -> unit

(** [run default command_list] runs command-line argument parsing and processing
of the command *)
val run: unit -> unit

(** Default entry point with handling of debug finalisers *)
val main: unit -> unit
Loading