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

Improve successes for the ocaml-ci (for OCaml ≤ 4.12 + lower bounds) #39

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

smondet
Copy link
Contributor

@smondet smondet commented Nov 12, 2024

No description provided.

@rr0gi rr0gi marked this pull request as ready for review November 12, 2024 20:03
@rr0gi rr0gi marked this pull request as draft November 12, 2024 20:04
@smondet
Copy link
Contributor Author

smondet commented Nov 12, 2024

This brings the lower bound from 4.13 to 4.12. Next failure is on the __FUNCTION__ macro-ish value; added in 4.12 https://ocaml.org/manual/5.2/api/Stdlib.html .

@smondet
Copy link
Contributor Author

smondet commented Nov 12, 2024

In case anybody is also curious, double-checked that __FUNCTION__ does not try to be smart about functors:

module F (P : sig val x : string end) = struct
  let p () = Printf.eprintf "x: %S, f: %S\n%!" P.x __FUNCTION__
end

module G = F(struct let x = "G-arg" end)
module H = F(struct let x = "H-arg" end)

let () =
  G.p ();
  H.p ();
  print_endline "Done."
 $ ocaml foo-bar.ml
x: "G-arg", f: "F.p"
x: "H-arg", f: "F.p"
Done.

@smondet smondet force-pushed the fix-ci-pre-413 branch 3 times, most recently from 8a1d4c8 to 8e2a8d7 Compare November 12, 2024 20:59
@smondet smondet changed the title WIP: try fix for the ocaml-ci (for OCaml ≤ 4.12) Improve successes for the ocaml-ci (for OCaml ≤ 4.12 + lower bounds) Nov 12, 2024
@smondet smondet marked this pull request as ready for review November 12, 2024 21:09
@smondet
Copy link
Contributor Author

smondet commented Nov 12, 2024

The remaining failures are from libevent (missing gcc or pkg-config on *BSD and such).

web.ml Outdated
@@ -301,7 +301,8 @@ module Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with
"url.full", `String url;
]
in
let explicit_span = Possibly_otel.enter_manual_span ~__FUNCTION__ ~__FILE__ ~__LINE__ ~data:describe action_name in
let explicit_span =
Possibly_otel.enter_manual_span ~__FUNCTION__:"Web.Http.add_if_absent" ~__FILE__ ~__LINE__ ~data:describe action_name in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why Web.Http.add_if_absent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what the value __FUNCTION__ gives there right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops actually not, misread, sorry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real value at that location seems to be "Devkit_core__Web.Http.http_request'.(fun)", at least from dune utop ., not sure how it shows up in other build contexts.

- `String.starts_with` added in 4.13.
- `__FUNCTION__` added in 4.12.
- Force version of PCRE bindings (from 2020, OCaml 4.08).
- Force version of Lwt (`Lwt.reraise` added in 5.7.0).
@rr0gi rr0gi merged commit 6ea2ff0 into ahrefs:master Nov 14, 2024
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants