Skip to content

Shorter path for inline-tests#11307

Merged
rgrinberg merged 3 commits intoocaml:mainfrom
hhugo:shorter-path
Feb 8, 2025
Merged

Shorter path for inline-tests#11307
rgrinberg merged 3 commits intoocaml:mainfrom
hhugo:shorter-path

Conversation

@hhugo
Copy link
Copy Markdown
Collaborator

@hhugo hhugo commented Jan 16, 2025

The PR uses shorter path names for inline-tests.
I believe there is little value repeating the libname information in the path under .<LIBNAME>.inline-tests

With this PR

_build/default/compiler/tests-jsoo/.jsoo_testsuite_parsing.inline-tests/inline_test_runner_jsoo_testsuite_parsing.bc.wasm.assets/dune__exe__Inline_test_runner_jsoo_testsuite_parsing-2efd143a.wasm.map

becomes

_build/default/compiler/tests-jsoo/.jsoo_testsuite_parsing.inline-tests/run.bc.wasm.assets/dune__exe__Run-65ca7159.wasm.map

and

_build/default/compiler/tests-jsoo/.jsoo_testsuite_parsing.inline-tests/.jsoo_testsuite_parsing.inline-tests.eobjs/jsoo/dune__exe__Inline_test_runner_jsoo_testsuite_parsing.wasmo

becomes

_build/default/compiler/tests-jsoo/.jsoo_testsuite_parsing.inline-tests/.run.eobjs/jsoo/dune__exe__Run.wasmo

@hhugo
Copy link
Copy Markdown
Collaborator Author

hhugo commented Jan 16, 2025

This PR fixes all long path related issue in ocsigen/js_of_ocaml#1799

@hhugo hhugo marked this pull request as ready for review January 16, 2025 14:46
@hhugo hhugo added windows Issues that relate to Dune on Microsoft Windows and removed windows Issues that relate to Dune on Microsoft Windows labels Jan 16, 2025
Copy link
Copy Markdown
Collaborator

@nojb nojb left a comment

Choose a reason for hiding this comment

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

LGTM

inline_test_runner_test_lib2 alias test2/runtest
run alias test2/runtest
run alias test2/runtest
run alias test2/runtest
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One could argue that the new output is less informative than the old one, but I don't see how we can do better while keeping the paths short.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've pushed alternative names. the inline-test executable in now called inline-test-runner. Its entry point is main.ml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks. I'm a bit hesitatnt to merge because I have never used inline tests myself so I am not 100% sure I am not missing any details. A quick glance from someone familiar with this part of the code (or @rgrinberg) would be good.

@hhugo
Copy link
Copy Markdown
Collaborator Author

hhugo commented Jan 27, 2025

The second commits changes names a bit and avoid duplication between inline_tests.ml and dir_status.ml.

@hhugo hhugo force-pushed the shorter-path branch 3 times, most recently from 6dd5d4f to 52fd9bd Compare January 27, 2025 08:56
hhugo added 2 commits February 7, 2025 13:56
Signed-off-by: Hugo Heuzard <hugo.heuzard@gmail.com>
Signed-off-by: Hugo Heuzard <hugo.heuzard@gmail.com>
@hhugo
Copy link
Copy Markdown
Collaborator Author

hhugo commented Feb 7, 2025

@rgrinberg, I'd like to make progress with this PR. @nojb suggested you might be able to review it ..

_
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg merged commit 01ec6fd into ocaml:main Feb 8, 2025
15 of 22 checks passed
maiste added a commit to maiste/opam-repository that referenced this pull request Mar 31, 2025
CHANGES:

### Fixed

- Support HaikuOS: don't call `execve` since it's not allowed if other pthreads
  have been created. The fact that Haiku can't call `execve` from other threads
  than the principal thread of a process (a team in haiku jargon), is a
  discrepancy to POSIX and hence there is a [bug about
  it](https://dev.haiku-os.org/ticket/18665). (@Sylvain78, ocaml/dune#10953)
- Fix flag ordering in generated Merlin configurations (ocaml/dune#11503, @voodoos, fixes
  ocaml/merlin#1900, reported by @vouillon)

### Added

- Add `(format-dune-file <src> <dst>)` action. It provides a replacement to
  `dune format-dune-file` command.  (ocaml/dune#11166, @nojb)
- Allow the `--prefix` flag when configuring dune with `ocaml configure.ml`.
  This allows to set the prefix just like `$ dune install --prefix`. (ocaml/dune#11172,
  @rgrinberg)
- Allow arguments starting with `+` in preprocessing definitions (starting with
  `(lang dune 3.18)`). (@amonteiro, ocaml/dune#11234)
- Support for opam `(maintenance_intent ...)` in dune-project (ocaml/dune#11274, @art-w)
- Validate opam `maintenance_intent` (ocaml/dune#11308, @art-w)
- Support `not` in package dependencies constraints (ocaml/dune#11404, @art-w, reported
  by @hannesm)

### Changed

- Warn when failing to discover root due to reads failing. The previous
  behavior was to abort. (@KoviRobi, ocaml/dune#11173)
- Use shorter path for inline-tests artifacts. (@hhugo, ocaml/dune#11307)
- Allow dash in `dune init` project name (ocaml/dune#11402, @art-w, reported by @saroupille)
- On Windows, under heavy load, file delete operations can sometimes fail due to
  AV programs, etc. Guard against it by retrying the operation up to 30x with a
  1s waiting gap (ocaml/dune#11437, fixes ocaml/dune#11425, @MSoegtropIMC)
- Cache: we now only store the executable permission bit for files (ocaml/dune#11541,
  fixes ocaml/dune#11533, @ElectreAAS)
- Display negative error codes on Windows in hex which is the more customary
  way to display `NTSTATUS` codes (ocaml/dune#11504, @MisterDA)
maiste added a commit to maiste/opam-repository that referenced this pull request Apr 3, 2025
CHANGES:

### Fixed

- Support HaikuOS: don't call `execve` since it's not allowed if other pthreads
  have been created. The fact that Haiku can't call `execve` from other threads
  than the principal thread of a process (a team in haiku jargon), is a
  discrepancy to POSIX and hence there is a [bug about
  it](https://dev.haiku-os.org/ticket/18665). (@Sylvain78, ocaml/dune#10953)
- Fix flag ordering in generated Merlin configurations (ocaml/dune#11503, @voodoos, fixes
  ocaml/merlin#1900, reported by @vouillon)

### Added

- Add `(format-dune-file <src> <dst>)` action. It provides a replacement to
  `dune format-dune-file` command.  (ocaml/dune#11166, @nojb)
- Allow the `--prefix` flag when configuring dune with `ocaml configure.ml`.
  This allows to set the prefix just like `$ dune install --prefix`. (ocaml/dune#11172,
  @rgrinberg)
- Allow arguments starting with `+` in preprocessing definitions (starting with
  `(lang dune 3.18)`). (@amonteiro, ocaml/dune#11234)
- Support for opam `(maintenance_intent ...)` in dune-project (ocaml/dune#11274, @art-w)
- Validate opam `maintenance_intent` (ocaml/dune#11308, @art-w)
- Support `not` in package dependencies constraints (ocaml/dune#11404, @art-w, reported
  by @hannesm)

### Changed

- Warn when failing to discover root due to reads failing. The previous
  behavior was to abort. (@KoviRobi, ocaml/dune#11173)
- Use shorter path for inline-tests artifacts. (@hhugo, ocaml/dune#11307)
- Allow dash in `dune init` project name (ocaml/dune#11402, @art-w, reported by @saroupille)
- On Windows, under heavy load, file delete operations can sometimes fail due to
  AV programs, etc. Guard against it by retrying the operation up to 30x with a
  1s waiting gap (ocaml/dune#11437, fixes ocaml/dune#11425, @MSoegtropIMC)
- Cache: we now only store the executable permission bit for files (ocaml/dune#11541,
  fixes ocaml/dune#11533, @ElectreAAS)
- Display negative error codes on Windows in hex which is the more customary
  way to display `NTSTATUS` codes (ocaml/dune#11504, @MisterDA)
anmonteiro pushed a commit to anmonteiro/dune that referenced this pull request Apr 22, 2025
* Reduce path size for inline-tests artifacts

Signed-off-by: Hugo Heuzard <hugo.heuzard@gmail.com>
@hhugo hhugo deleted the shorter-path branch June 6, 2025 08:41
Sudha247 pushed a commit to Sudha247/dune that referenced this pull request Jul 23, 2025
* Reduce path size for inline-tests artifacts

Signed-off-by: Hugo Heuzard <hugo.heuzard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants