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

Shorter path for inline-tests #11307

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Shorter path for inline-tests #11307

wants to merge 2 commits into from

Conversation

hhugo
Copy link
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
Collaborator Author

hhugo commented Jan 16, 2025

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

Copy link
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

src/dune_rules/inline_tests.ml Outdated Show resolved Hide resolved
inline_test_runner_test_lib2 alias test2/runtest
run alias test2/runtest
run alias test2/runtest
run alias test2/runtest
Copy link
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
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
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
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
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.

3 participants