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

Getting tests working on Nix #8203

Open
10 of 11 tasks
Alizter opened this issue Jul 13, 2023 · 0 comments
Open
10 of 11 tasks

Getting tests working on Nix #8203

Alizter opened this issue Jul 13, 2023 · 0 comments
Labels
chore Something that just needs to be done. nix

Comments

@Alizter
Copy link
Collaborator

Alizter commented Jul 13, 2023

Currently the tests don't all work on Nix. This issue serves as a tracker to fixing them. Eventually we will be able to run the test suite in the Nix CI jobs.

Here are the ones that don't:

@Alizter Alizter added chore Something that just needs to be done. nix labels Jul 13, 2023
emillon added a commit to emillon/dune that referenced this issue Apr 29, 2024
In a nutshell:

    # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e"
    Some "d/e"

This improves the test situation on nix (ocaml#8203) in the default devshell,
because the paths in `OCAMLPATH` can have trailing slashes.

Signed-off-by: Etienne Millon <me@emillon.org>
emillon added a commit to emillon/dune that referenced this issue Apr 30, 2024
In a nutshell:

    # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e"
    Some "d/e"

This improves the test situation on nix (ocaml#8203) in the default devshell,
because the paths in `OCAMLPATH` can have trailing slashes.

More precisely, the `--sanitize-for-tests` options uses
`Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the
`FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes,
these prefixes are not sanitized properly.

Signed-off-by: Etienne Millon <me@emillon.org>
emillon added a commit to emillon/dune that referenced this issue May 6, 2024
In a nutshell:

    # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e"
    Some "d/e"

This improves the test situation on nix (ocaml#8203) in the default devshell,
because the paths in `OCAMLPATH` can have trailing slashes.

More precisely, the `--sanitize-for-tests` options uses
`Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the
`FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes,
these prefixes are not sanitized properly.

Signed-off-by: Etienne Millon <me@emillon.org>
emillon added a commit that referenced this issue May 6, 2024
* fix: handle trailing / in Path.drop_prefix

In a nutshell:

    # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e"
    Some "d/e"

This improves the test situation on nix (#8203) in the default devshell,
because the paths in `OCAMLPATH` can have trailing slashes.

More precisely, the `--sanitize-for-tests` options uses
`Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the
`FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes,
these prefixes are not sanitized properly.

Signed-off-by: Etienne Millon <me@emillon.org>

* refactor: get rid of [Path.External.drop_prefix]

Just as easily replaced by [Path.drop_prefix]. None of its uses were
performance critical, so the reduced complexity is more important here.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Co-authored-by: Rudi Grinberg <me@rgrinberg.com>
anmonteiro pushed a commit to anmonteiro/dune that referenced this issue Nov 17, 2024
* fix: handle trailing / in Path.drop_prefix

In a nutshell:

    # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e"
    Some "d/e"

This improves the test situation on nix (ocaml#8203) in the default devshell,
because the paths in `OCAMLPATH` can have trailing slashes.

More precisely, the `--sanitize-for-tests` options uses
`Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the
`FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes,
these prefixes are not sanitized properly.

Signed-off-by: Etienne Millon <me@emillon.org>

* refactor: get rid of [Path.External.drop_prefix]

Just as easily replaced by [Path.drop_prefix]. None of its uses were
performance critical, so the reduced complexity is more important here.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Co-authored-by: Rudi Grinberg <me@rgrinberg.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Something that just needs to be done. nix
Projects
None yet
Development

No branches or pull requests

1 participant