Email or username:

Password:

Forgot your password?
Top-level
Ludovic Courtès

@graywolf Your implementation looks *much* nicer! Were you able to test it against existing test suites like that of Guix or maybe some smaller guile-* package?

If there are no known regressions, I’d be in favor of integrating it (as LGPLv3+).

4 comments
graywolf

@civodul Thanks :)

I did not test it with other projects (I did not expect non-me people to use it), but if it is heading in the direction of possible inclusion into Guile proper, I will find the time to do that. I will try with Guix, since that is probably the biggest project using it. I hope I will be able to get to it over the weekend.

Agree, as I said, I have no issues with re-licensing it.

graywolf

@civodul So quick testing suggests that it mostly works, there are few `definition in expression context` errors. I do not know enough about scheme to say if the implementation is wrong, or if the test is doing something it should not.

Specification says just "This evaluates the expression.", so it might be the test at fault?

Aaaanyway, changing the expansion in the implementation to `(let () expression)' instead of just `expression' seems to resolve it, and I am willing to do that, since it seems useful.

I will do more testing on Sunday.

@civodul So quick testing suggests that it mostly works, there are few `definition in expression context` errors. I do not know enough about scheme to say if the implementation is wrong, or if the test is doing something it should not.

Specification says just "This evaluates the expression.", so it might be the test at fault?

graywolf

@civodul

tl;dr: It looks good.

Long version:

So after few required compatibility tweaks I found that 4 extra tests fail with my implementation compared to the guile's on. Diff:

--- /tmp/log.guile 2024-08-11 07:33:03.383038595 +0000
+++ /tmp/log.wolfsden 2024-08-11 17:52:05.230543705 +0000
@@ -88,7 +88,7 @@
PASS: tests/elm.scm
PASS: tests/elm.scm
PASS: tests/elpa.scm
-PASS: tests/file-systems.scm
+FAIL: tests/file-systems.scm
PASS: tests/gem.scm
PASS: tests/gexp.scm
PASS: tests/git.scm
@@ -129,7 +129,7 @@
PASS: tests/scripts.scm
PASS: tests/search-paths.scm
PASS: tests/services.scm
-PASS: tests/services/file-sharing.scm
+FAIL: tests/services/file-sharing.scm
PASS: tests/services/configuration.scm
PASS: tests/services/configuration.scm
PASS: tests/services/configuration.scm
@@ -147,7 +147,7 @@
PASS: tests/store-database.scm
PASS: tests/store-deduplication.scm
PASS: tests/store-roots.scm
-PASS: tests/store.scm
+FAIL: tests/store.scm
PASS: tests/substitute.scm
PASS: tests/swh.scm
SKIP: tests/syscalls.scm
@@ -195,10 +195,10 @@
Testsuite summary for GNU Guix 1.3.0.63387-de714
============================================================================
# TOTAL: 2454
-# PASS: 2421
+# PASS: 2417
# SKIP: 25
# XFAIL: 2
-# FAIL: 6
+# FAIL: 10
# XPASS: 0
# ERROR: 0
============================================================================

Three of those extra fails are due to using string in test-error, in the spirit of:

(test-error "transmission-password-hash, salt value too long"
(transmission-password-hash
"transmission"
(make-string (+ %transmission-salt-length 1) #\a)))

I do not plan to include a special support for string error-type. It can (in the test file) be replaced with #t and the test will start passing. (I think it is likely the test author of the test just confused test-name and error-type in test-error.)

The 4th is this test:

(test-equal "store-path-package-name #f"
#f
(store-path-package-name
"/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))

Which relies on bug in guile's implementation. The specification says that if expression raises an exception, the test should fail. Guile just returns #f instead. So the test passes, since #f equals #f. This test should be switched to test-error.

Of course, this is something that should probably be double checked by someone else.

@civodul

tl;dr: It looks good.

Long version:

So after few required compatibility tweaks I found that 4 extra tests fail with my implementation compared to the guile's on. Diff:

--- /tmp/log.guile 2024-08-11 07:33:03.383038595 +0000
+++ /tmp/log.wolfsden 2024-08-11 17:52:05.230543705 +0000
@@ -88,7 +88,7 @@
PASS: tests/elm.scm
PASS: tests/elm.scm
PASS: tests/elpa.scm
-PASS: tests/file-systems.scm
+FAIL: tests/file-systems.scm
PASS: tests/gem.scm
PASS: tests/gexp.scm
PASS: tests/git.scm
@@ -129,7 +129,7 @@

Ludovic Courtès

@graywolf Nice. Looks like these two Guix tests you mention should be fixed/adjusted, actually.

That it reveals issues with tests rather than with the framework itself looks like a good sign!

Go Up