1234567891011121314151617181920212223242526272829303132333435363738394041424344454647openImportopenTypes(* This list of methods and generations is exactly the list of existing methods
as of commit [3cd240e], which the initial versioning implementation was based
on. *)letcompatibility_menu=Method.Name.Map.of_list_exn["ping",1;"diagnostics",1;"shutdown",1;"subscribe",1;"unsubscribe",1;"build",1;"status",1;"notify/abort",1;"notify/diagnostic",1;"notify/log",1;"notify/progress",1];;typet=Method.Version.tMethod.Name.Map.tletdefault=compatibility_menuletfind=Method.Name.Map.findletselect_common~local_versions~remote_versions=letselected_versions=List.filter_mapremote_versions~f:(fun(method_,remote_versions)->letremote_versions=Method.Version.Set.of_listremote_versionsinletopenOption.Oinlet*local_versions=Method.Name.Map.findlocal_versionsmethod_inlet+greatest_common_version=Method.Version.Set.max_elt(Method.Version.Set.interremote_versionslocal_versions)inmethod_,greatest_common_version)inmatchselected_versionswith|[]->None|_::_->Some(Method.Name.Map.of_list_exnselected_versions);;letof_list=Method.Name.Map.of_listletto_list=Method.Name.Map.to_listletto_dyn=Method.Name.Map.to_dynInt.to_dyn