Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packages (2022-03) #125

Open
24 of 38 tasks
emillon opened this issue Mar 9, 2022 · 7 comments
Open
24 of 38 tasks

Update packages (2022-03) #125

emillon opened this issue Mar 9, 2022 · 7 comments

Comments

@emillon
Copy link
Contributor

emillon commented Mar 9, 2022

I created a list of outdated packages (packages that have a newer version in the upstream repo than here).

(list based on ocaml/opam-repository@4e30c15 and c750941)

This does not always mean that an action is required - sometimes it means that dune support has been merged upstream.

We can do that process later and try to automate this down the line but let's keep this manual for now.

Code used to run this
let latest_versions set =
  let module M = OpamPackage.Name.Map in
  OpamPackage.Set.fold
    (fun pkg acc ->
      let name = OpamPackage.name pkg in
      let version = OpamPackage.version pkg in
      match M.find_opt name acc with
      | None -> M.safe_add name version acc
      | Some v ->
          if OpamPackage.Version.compare version v > 0 then
            M.add name version acc
          else acc)
    set M.empty

let latest_versions_in_dir str =
  str |> OpamFilename.Dir.of_string |> OpamRepository.packages
  |> latest_versions

let main upstream overlays =
  let base_packages = latest_versions_in_dir upstream in
  let overlays_packages = latest_versions_in_dir overlays in
  OpamPackage.Name.Map.iter
    (fun name overlays_ver ->
      match OpamPackage.Name.Map.find_opt name base_packages with
      | None ->
          Printf.printf "%s: no upstream\n" (OpamPackage.Name.to_string name)
      | Some upstream_ver ->
          if OpamPackage.Version.compare upstream_ver overlays_ver > 0 then
            Printf.printf "%s: %s > %s\n"
              (OpamPackage.Name.to_string name)
              (OpamPackage.Version.to_string upstream_ver)
              (OpamPackage.Version.to_string overlays_ver))
    overlays_packages

let info = Cmdliner.Cmd.info "diff"

let repo n =
  let open Cmdliner.Arg in
  required & pos n (some string) None & info []

let term =
  let open Cmdliner.Term in
  const main $ repo 0 $ repo 1

let () = Cmdliner.Cmd.v info term |> Cmdliner.Cmd.eval |> Stdlib.exit
@Leonidas-from-XIV
Copy link
Contributor

Checked the menhir bits because menhir now comes with dune files (at least the release tarballs do).

@Leonidas-from-XIV
Copy link
Contributor

bheap 2.0.0 also uses dune now, I tested it and it locks, pulls and dune builds so I assume it is fine.

@Leonidas-from-XIV
Copy link
Contributor

sexplib v0.14 uses dune and builds in a duniverse (lock, pull & dune build tested).

@Leonidas-from-XIV
Copy link
Contributor

dose3 7.0.0 depends upstream on dune but can't be installed at the moment due to depending on extlib 1.7.8. This PR might fix it.

@Leonidas-from-XIV
Copy link
Contributor

ppx_tools 6.4 and 6.5 build with dune (and in fact it seems all 6.x releases seem to use dune upstream, our duniverse port is somewhat strange).

@Leonidas-from-XIV
Copy link
Contributor

io-page 2.4.0 builds with dune (again, 2.3.0 also does, I am confused what our dune port does)

@Leonidas-from-XIV
Copy link
Contributor

ocamlgraph 2.0.0 uses dune upstream too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants