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

Replace Dir_helpers with OpamFilename helpers #407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
9 changes: 5 additions & 4 deletions opam-ci-check/bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ let lint package_specs local_repo_dir =
| Some opam_repo_dir -> (
print_endline
@@ Printf.sprintf "Linting opam-repository at %s ..." opam_repo_dir;
Dir_helpers.with_temp_dir "opam-ci-check-lint-" @@ fun dir ->
OpamFilename.with_tmp_dir @@ fun dir ->
let process_package { pkg; src; newly_published } =
let opam = read_package_opam ~opam_repo_dir pkg in
let pkg_src_dir =
if Option.is_none src then
let dir = dir // OpamPackage.to_string pkg in
let dir =
OpamFilename.Dir.to_string dir // OpamPackage.to_string pkg
in
fetch_package_src ~dir ~pkg opam
else
src
else src
in
Lint.v ~pkg ~newly_published ~pkg_src_dir opam
in
Expand Down
42 changes: 0 additions & 42 deletions opam-ci-check/lib/dir_helpers.ml

This file was deleted.

1 change: 0 additions & 1 deletion opam-ci-check/lib/lint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Copyright (c) 2024 Puneeth Chaganti <[email protected]>, Shon Feder <[email protected]>, Tarides <[email protected]>
*)

module D = Dir_helpers
module O = Opam_helpers

let ( // ) = Filename.concat
Expand Down
1 change: 0 additions & 1 deletion opam-ci-check/lib/opam_ci_check.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ module Variant = Variant
module Opam_version = Opam_version
module Compiler_version = Compiler_version
module Spec = Spec
module Dir_helpers = Dir_helpers
module Opam_helpers = Opam_helpers
3 changes: 1 addition & 2 deletions opam-ci-check/lib/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*)

module H = Dune_helpers
module D = Dir_helpers

type error = OpamPackage.t * exn

Expand Down Expand Up @@ -59,7 +58,7 @@ let test_packages_with_dune opam_repository target_pkg packages =
OpamConsole.msg
"Installing latest version of reverse dependencies with pinned %s\n"
(OpamPackage.to_string target);
let parent = D.create_temp_dir "revdeps_" in
let parent = OpamFilename.mk_tmp_dir () |> OpamFilename.Dir.to_string in
(* FIXME: there can be 1000s of revdeps?! *)
let selected_packages = H.take 3 packages in
(* Prompt before creating the projects *)
Expand Down