Partially fix tests #1

Merged
reynir merged 2 commits from fix-test into main 2024-10-25 09:42:28 +00:00
Owner

Since mgit is not a public executable it will not be present in $PATH - so we must use %{exe:...} over %{bin:...}.

The fix is partial because the (enabled_if ...) stanza doesn't work correctly for me at least. To fix it I tried the following without success...

Error: This value must be either true or false
File "test/dune", line 19, characters 13-31:
19 |  (enabled_if {%read:git-daemon})
                  ^^^^^^^^^^^^^^^^^^
Since mgit is not a public executable it will not be present in $PATH - so we must use %{exe:...} over %{bin:...}. The fix is partial because the (enabled_if ...) stanza doesn't work correctly for me at least. To fix it I tried the following without success... ``` Error: This value must be either true or false File "test/dune", line 19, characters 13-31: 19 | (enabled_if {%read:git-daemon}) ^^^^^^^^^^^^^^^^^^ ```
reynir added 1 commit 2024-10-25 09:05:43 +00:00
Since mgit is not a public executable it will not be present in $PATH -
so we must use %{exe:...} over %{bin:...}.

The fix is partial because the (enabled_if ...) stanza doesn't work
correctly for me at least.
Author
Owner

Oh! I see, it's %{read:...} not {%read:...}! But I still get an error:

File "test/dune", line 12, characters 13-31:
12 |  (enabled_if %{read:git-daemon})
                  ^^^^^^^^^^^^^^^^^^
Error: %{read:..} isn't allowed in this position.
Oh! I see, it's `%{read:...}` not `{%read:...}`! But I still get an error: ``` File "test/dune", line 12, characters 13-31: 12 | (enabled_if %{read:git-daemon}) ^^^^^^^^^^^^^^^^^^ Error: %{read:..} isn't allowed in this position. ```
Author
Owner

I tried as well to move git_daemon_exists.ml to a subdirectory as suggested here without luck https://dune.readthedocs.io/en/stable/concepts/variables.html#:~:text=The%20reason%20you,creates%20a%20cycle.

I tried as well to move git_daemon_exists.ml to a subdirectory as suggested here without luck https://dune.readthedocs.io/en/stable/concepts/variables.html#:~:text=The%20reason%20you,creates%20a%20cycle.
Author
Owner

So, the existing (enabled_if ...) stanza basically disables the tests always :/ I opened an issue with dune because the documentation seems to suggest it's possible to use (enabled_if %{read:git_daemon_exists}), but I can't find a configuration where it doesn't complain about %{read:..} not being allowed in this position.

https://github.com/ocaml/dune/issues/11042

So, the existing `(enabled_if ...)` stanza basically disables the tests **always** :/ I opened an issue with dune because the documentation seems to suggest it's possible to use `(enabled_if %{read:git_daemon_exists})`, but I can't find a configuration where it doesn't complain about `%{read:..}` not being allowed in this position. https://github.com/ocaml/dune/issues/11042
Owner

could we remove the enabled_if entirely, and live with the situation that we need some conf-git-daemon for tests?

could we remove the `enabled_if` entirely, and live with the situation that we need some `conf-git-daemon` for tests?
Owner

for me, the proposed changes here look fine.

for me, the proposed changes here look fine.
reynir added 1 commit 2024-10-25 09:40:46 +00:00
Author
Owner

Yes, I think it is fine to remove. We can add it back if the dune issue gets resolved.

Yes, I think it is fine to remove. We can add it back if the dune issue gets resolved.
reynir merged commit 492f57f850 into main 2024-10-25 09:42:28 +00:00
reynir deleted branch fix-test 2024-10-25 09:42:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: robur/git-kv#1
No description provided.