• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ocaml / dune / 28273
7%

Build:
DEFAULT BRANCH: main
Ran 10 Sep 2024 10:21AM UTC
Jobs 1
Files 542
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Sep 2024 10:11AM UTC coverage: 6.886%. Remained the same
28273

push

github

web-flow
Fix url opened by "dune ocaml doc" (#10897)

Prior to this change, "dune ocaml doc" would attempt to open an
incorrect url in browsers: "file://_build/default/_doc/_html/index.html".
This is incorrect because it appears to be a path relative to the
project root, but browsers interpret "file://foo/some/path" as the
path "/some/path" on the host referred to by "foo". In my experiments
however, the "foo" component is ignored and the browser redirects to
"file:///some/path" instead. Indeed, when I run "dune ocaml doc" I end
up at "file:///default/_doc/_html/index.html", with the "_build"
component of the path being ignored, and the remainder of the path
treated as an absolute path (which obviously doesn't refer to the
correct file).

It seems like droppping the "file://" prefix of the url is enough to
get browers to accept the relative path and correctly navigate to
"file:///absolute/path/to/index.html". Alternatively we could fix the
logic for computing an absolute path to index.html and keep the
"file://" prefix of the url, but that seems more complicated. I've
updated a variable name from "absolute_toplevel_index_path" to
"relative_toplevel_index_path" to reflect that it is in fact a path
relative to the project root and not an absolute path.

On MacOS I found that without the "file://" component of the URL the
"-u" argument to the "open" command no longer works, but just running
"open path/to/index.html" opens a browser and navigates to the
absolute path to the file.

Signed-off-by: Stephen Sherratt <stephen@sherra.tt>

2900 of 42117 relevant lines covered (6.89%)

27046.73 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28273.1 10 Sep 2024 10:21AM UTC 0
6.89
GitHub Action Run
Source Files on build 28273
Detailed source file information is not available for this build.
  • Back to Repo
  • fa67187a on github
  • Prev Build on main (#28268)
  • Next Build on main (#28309)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc