1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
Commit graph

21194 commits

Author SHA1 Message Date
Rob Browning
51b7021de1 srfi-1 delete-duplicates: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_delete-duplicates): delete.
* libguile/srfi-1.h (scm_srfi1_delete-duplicates): delete.
* module/srfi/srfi-1.scm: add delete-duplicates.
2024-07-30 19:28:37 -05:00
Rob Browning
a94b4406b7 srfi-1 delete-duplicates!: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_delete-duplicates_x): delete.
* libguile/srfi-1.h (scm_srfi1_delete-duplicates_x): delete.
* module/srfi/srfi-1.scm: add delete-duplicates!.
2024-07-30 19:28:37 -05:00
Rob Browning
51e15d448f srfi-1 lset-difference: use remove
* module/srfi/srfi-1.scm (lset-difference): rely on remove like
lset-difference!; in addition to being simpler, this allows sharing a
common tail.
2024-07-30 19:28:37 -05:00
Rob Browning
945c97b14d srfi-1 lset-difference!: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_lset-difference_x): delete.
* libguile/srfi-1.h (scm_srfi1_lset-difference_x): delete.
* module/srfi/srfi-1.scm: add lset-difference!.
* test-suite/tests/srfi-1.test: extend lset-difference! tests to cover
lset-difference.
2024-07-30 19:28:37 -05:00
Rob Browning
3eb6afe738 srfi-1 partition!: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_partition_x): delete.
* libguile/srfi-1.h (scm_srfi1_partition_x): delete.
* module/srfi/srfi-1.scm: add partition!.
2024-07-30 19:28:37 -05:00
Rob Browning
925faf1f01 srfi-1 partition: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_partition): delete.
* libguile/srfi-1.h (scm_srfi1_partition): delete.
* module/srfi/srfi-1.scm: add partition.
2024-07-30 19:28:37 -05:00
Rob Browning
58246aee24 srfi-1 count: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_count): delete.
* libguile/srfi-1.h (scm_srfi1_count): delete.
* module/srfi/srfi-1.scm: add count.
2024-07-30 19:28:37 -05:00
Rob Browning
372a52e6aa srfi-1 length+: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_length_plus): delete.
* libguile/srfi-1.h (scm_srfi1_length_plus): delete.
* module/srfi/srfi-1.scm: add length+.
2024-07-30 19:28:37 -05:00
Rob Browning
3cb6309f62 srfi-1 append-reverse!: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_append_reverse_x): delete.
* libguile/srfi-1.h (scm_srfi1_append_reverse_x): delete.
* module/srfi/srfi-1.scm: add append-reverse!.
2024-07-30 19:28:37 -05:00
Rob Browning
17281519df srfi-1 append-reverse: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_append_reverse): delete.
* libguile/srfi-1.h (scm_srfi1_append_reverse): delete.
* module/srfi/srfi-1.scm: add append-reverse.
2024-07-30 19:11:34 -05:00
Rob Browning
c62d2962d4 srfi-1 concatenate concatenate!: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_concatenate, scm_srfi1_concatenate_x): delete.
* libguile/srfi-1.h (scm_srfi1_concatenate, scm_srfi1_concatenate_x): delete.
* module/srfi/srfi-1.scm: add concatenate and concatenate!.
2024-07-30 18:54:45 -05:00
Rob Browning
a816b2484b srfi-1 delete delete!: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_delete, scm_srfi1_delete_x): delete.
* libguile/srfi-1.h (scm_srfi1_delete, scm_srfi1_delete_x): delete.
* module/srfi/srfi-1.scm: add delete and delete!.
2024-07-30 18:54:45 -05:00
Rob Browning
c5f26d4c27 srfi-1 remove!: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_remove_x): delete.
* libguile/srfi-1.h (scm_srfi1_remove_x): delete.
* module/srfi/srfi-1.scm: add remove!.
2024-07-30 18:54:45 -05:00
Rob Browning
03d4a3b5df srfi-1 remove: move from C to Scheme
The Scheme implementation is an adapted version of the approach used by
delete-duplicates, which allows sharing any common tail.

* libguile/srfi-1.c (scm_srfi1_remove): delete.
* libguile/srfi-1.h (scm_srfi1_remove): delete.
* module/srfi/srfi-1.scm: add remove.
2024-07-30 18:54:45 -05:00
Rob Browning
aa44035ee8 srfi-1 list-copy: move from C to Scheme
* libguile/srfi-1.c (scm_srfi1_list_copy): delete.
* libguile/srfi-1.h (scm_srfi1_list_copy): delete.
* module/srfi/srfi-1.scm: add list-copy.
* test-suite/tests/srfi-1.test: ensure copied spine is independent.
2024-07-30 18:54:45 -05:00
Rob Browning
6bd70136d9 Ensure GUILE-VERSION changes propagate to .version and Makefiles
Have .version depend on the Makefile, and move our
CONFIG_STATUS_DEPENDENCIES setting to an AC_SUBST, as recommended by the
automake info pages "Rebuilding Makefiles" section, so that changes to
GUILE-VERSION will update the VERSION, etc. in the generated Makefiles.

* Makefile.am (CONFIG_STATUS_DEPENDENCIES): drop.
($(top_srcdir/.version)): depend on Makefile.
* configure: add GUILE-VERSION to CONFIG_STATUS_DEPENDENCIES via
AC_SUBST.
2024-07-26 16:37:41 -05:00
Richard Sent
8535682dda doc: Mention how to remove namespaces in xml->sxml.
* doc/ref/sxml.texi (Reading and Writing XML): Document behavior of #f
namespace prefix.

This documents behavior discussed in
https://lists.gnu.org/archive/html/guile-user/2024-07/msg00013.html.
2024-07-23 08:23:43 +02:00
Ludovic Courtès
15a656a77a
guix: Run one cross-compilation build out-of-tree.
* .guix/manifest.scm (out-of-source-tree): New procedure.
(cross-builds): Use it.
2024-07-17 00:02:24 +02:00
Ludovic Courtès
c117f8edc4
build: Fix in-tree cross-compilation build.
Commit 57a889b728 fixed out-of-tree
cross-compilation builds but broke in-tree cross-compilation builds.
With this change, we should have both.

* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Use ‘-iquote’ instead
of ‘-I’.
2024-07-17 00:00:00 +02:00
Rob Browning
ad1f56675b test-hashing: support 32-bit
* test-suite/standalone/test-hashing.c (test_hashing): add expected
value for 32-bit architectures.
2024-07-12 17:49:45 -05:00
Rob Browning
d99ae68f88 define-meta-command: mention effects of a missing category
module/system/repl/command.scm: add comment.
2024-07-12 17:49:45 -05:00
Maxim Cournoyer
522f368719 bug#71304: [PATCH] Add support for 'else' clause in R7RS cond-expand.
* module/ice-9/r7rs-libraries.scm (define-library)
<handle-cond-expand>: Add a pattern to match an 'else' clause.

Series-to: bug-guile@gnu.org
2024-07-01 23:38:01 +02:00
Andy Wingo
b2cc237a02 Fix distcheck problems with parallel tests
* test-suite/Makefile.am (EXTRA_DIST): Add (test-lib lib automake)
(TEST_LOG_DRIVER): Use srcdir.
2024-06-23 23:26:47 +02:00
Andy Wingo
b124f251fc Bump version to 3.0.10.
* GUILE-VERSION (GUILE_MICRO_VERSION):
(LIBGUILE_INTERFACE_CURRENT):
(LIBGUILE_INTERFACE_AGE): Bump.
2024-06-23 22:30:49 +02:00
Andy Wingo
c97d037cfa Add NEWS note about parallel tests
* NEWS: Add note.
2024-06-23 21:45:54 +02:00
Andy Wingo
b93dc62e03 Fix parallel test bug in r6rs-ports.test
* test-suite/tests/r6rs-ports.test (test-file): Use different file from
ports.test, to avoid problems during parallel tests.
2024-06-23 21:43:05 +02:00
Andy Wingo
1120efe375 Fix race in check-guile to make needless guile-procedures symlink
* check-guile.in (top_srcdir): Don't try to make guile-procedures.tx, as
this races with multiple checkers, and it's gross.
* meta/uninstalled-env.in (GUILE_DOCSTRINGS_PATH): Instead when
uninstalled, use this variable.
* module/ice-9/documentation.scm (documentation-files): Remove the
current directory from the search path for documentation files; this was
always a hack.  Instead allow GUILE_DOCSTRINGS_PATH to override the
built-in search path.
2024-06-23 11:13:18 +02:00
Andy Wingo
d7ed457620 Ensure the signal-delivery thread is completely stopped before fork
* libguile/scmsigs.c: Use raw pthread_create / pthread_join instead of
Guile's scm_spawn_thread, to ensure that the thread is entirely stopped
before a fork.
* libguile/scmsigs.h (scm_i_is_signal_delivery_thread): New internal
procedure, replacing a manual check against scm_i_signal_delivery_thread.
* libguile/threads.c: Use the new procedure.

Based on a patch by Rob Browning.  Thanks!
2024-06-21 11:11:46 +02:00
Rob Browning
0a8a1eb595 Document wait-condition-variable's spurious returns 2024-06-20 15:57:26 +02:00
Andy Wingo
2a4c095f79 Avoid stompling user TESTS_ENVIRONMENT var
* test-suite/standalone/Makefile.am (top_srcdir): Use
AM_TESTS_ENVIRONMENT.
2024-06-20 15:54:53 +02:00
Rob Browning
df04f5357a Switch to the preferred parallel automake test harness
Automake "strongly discourages" use of the serial driver, and switching
to the preferred parallel driver allows make -j4 check to run in about
half the time on a four core (not thread) host.

* Makefile.am (TESTS, TESTS_ENVIRONMENT): run ./check-guile from
test-suite/, not here.
* check-guile.in: let test harness handle progress output.
* configure.ac (AM_INIT_AUTOMAKE): allow parallel testing.
* test-suite/Makefile.am (SCM_TESTS): remove non-tests.
(EXTRA_DIST): move non-tests here.
(TESTS): include SCM_TESTS (now driven from here).
(TEST_EXTENSIONS): allow customization for .scm and .test.
(TESTS_ENVIRONMENT): stop defining (user only).
(AM_TESTS_ENVIRONMENT): replaces TESTS_ENVIRONMENT; drop guile.
(SCM_LOG_COMPILER): run .scm tests via meta/guile.
(AM_SCM_LOG_FLAGS): keep --no-auto-compile for .scm tests.
(TEST_LOG_DRIVER): run .test tests via custom automake ./driver.
* test-suite/driver: add automake test driver.
2024-06-20 15:35:48 +02:00
Rob Browning
590eb72c69 guile-test: support automake parallel test harness via --trs-file
Support an optional --trs-file PATH argument that causes guile-test to
write the status information expected by the automake parallel test
harness to PATH.

In addition, when --trs-file is specified, suppress the final test
summary (via print-counts) since it would be repeated per-test-file when
running in parallel, the automake harness prints its own summary.

cf. https://www.gnu.org/software/automake/manual/html_node/API-for-Custom-Test-Drivers.html

* test-suite/guile-test (main): support --trs-file and --log-file.
* test-suite/test-suite/lib.scm: add count-summary-line.
* test-suite/test-suite/lib/automake.scm: add automake custom test driver.
2024-06-20 15:35:48 +02:00
Rob Browning
08285b6894 check-guile.in: exit 2 on errors and direct output to stderr
Return 2 rather than 1 for errors so that 1 will be available for any
future boolean tests (as with say grep).

Direct error message to stderr rather than stdout.

* check-guile.in: send error message to stderr and exit 2 (not 1).
2024-06-20 15:35:48 +02:00
Andy Wingo
d261308088 Attempt to fix distcheck
* libguile/Makefile.am (install-data-hook): Remove temp GDB file.
2024-06-20 15:25:23 +02:00
Andy Wingo
eb3db96ce0 Add thanks for v3.0.10
* NEWS: Update.
2024-06-20 14:56:36 +02:00
Andy Wingo
7401ca75b3 Add link to foreign functions from gsubr doc
* doc/ref/api-procedures.texi (Primitive Procedures): Add link.
2024-06-20 14:39:41 +02:00
Andy Wingo
7d2ef990a0 Update NEWS
* NEWS: Update.
2024-06-20 14:12:10 +02:00
Andy Wingo
305b2fa70c Add documentation on embedded procedure properties
* doc/ref/api-procedures.texi (Procedure Properties): Document inline
procedure properties.
2024-06-20 13:54:31 +02:00
Andy Wingo
8b324bef74 Remove dead code in resolve-interface
* module/ice-9/boot-9.scm (resolve-interface): Remove dead code.
2024-06-20 13:51:59 +02:00
Arsen Arsenović
ddc5e63b00 build: Use PKG_INSTALL_DIR
This allows users to adjust their pkg-config install location.

* configure.ac: Call PKG_INSTALLDIR.
* meta/Makefile.am (pkgconfigdir): Remove.  It will be defined
automatically by the PKG_INSTALLDIR invocation.
2024-06-18 16:12:11 +02:00
Maxim Cournoyer
4fe6d19a5b bug#71303: [PATCH] doc: Fix typo in PEG example.
* doc/ref/api-peg.texi (PEG API Reference): Fix typo in PEG example.
2024-06-18 10:36:50 +02:00
Ludovic Courtès
461ff313fa
Rewrite ‘get-bytevector-all’ in Scheme.
* libguile/r6rs-ports.c (get_bytevector_all_var): New variable.
(init_bytevector_io_vars): New function.
(scm_get_bytevector_all): Rewrite as a proxy to ‘get-bytevector-all’
from (ice-9 binary-port).
* module/ice-9/binary-ports.scm (get-bytevector-all): New procedure.
* NEWS: Update.

Reported-by: Christopher Baines <mail@cbaines.net>
2024-06-16 15:05:09 +02:00
Ludovic Courtès
27feb2bfd3
wisp: Use uninterned symbols instead of UUIDs.
As suggested in
<https://lists.gnu.org/archive/html/guile-devel/2023-06/msg00008.html>.

* module/language/wisp.scm (wisp-uuid): Remove.
(repr-quote, repr-unquote, repr-quasiquote, repr-unquote-splicing)
(repr-syntax, repr-unsyntax, repr-quasisyntax, repr-unsyntax-splicing):
Turn into uninterned symbols.
(line-continues?, chunk-ends-with-period,
line-code-replace-inline-colons): Adjust comparisons accordingly.
(wisp-replace-paren-quotation-repr)[pred]: New procedure.
Use it to compare against the various ‘repr-’ values.
(wisp-make-improper)[dot?]: New procedure.
Use it to compare against ‘repr-dot’.
2024-06-01 11:50:16 +02:00
Ludovic Courtès
37f9fd865a
Update NEWS. 2024-06-01 11:50:16 +02:00
Arne Babenhauserheide
dce65edbaf
Add language/wisp, Wisp tests, and SRFI-119 documentation
* doc/ref/srfi-modules.texi (srfi-119): add node
* module/language/wisp.scm: New file.
* module/language/wisp/spec.scm: New file.
* test-suite/tests/srfi-119.test: New file.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-01 11:50:16 +02:00
Ludovic Courtès
7b92b22899
Don’t rely on integer wrapping in ‘scm_gc_register_allocation’.
* libguile/gc.c (scm_gc_register_allocation): Simplify condition.
2024-06-01 11:50:16 +02:00
Rob Browning
779a83d9c6 make-foreign-object-type: add #:super to provide superclasses
* module/system/foreign-object.scm (make-foreign-object-type): allow
specification of superclasses via #:super.
2024-05-17 12:53:39 -05:00
Daniel Llorens
34c13e7d94 Update NEWS. 2024-05-13 10:09:40 +02:00
Ludovic Courtès
f36342f9aa
guix: Use non-deprecated package name.
* .guix/modules/guile-package.scm (guile)[native-inputs]: Use
‘texlive-scheme-basic’ instead of the deprecated ‘texlive-base’.
2024-05-06 11:51:53 +02:00
Juliana Sims
a222503a89
Second argument of ‘unread-string’ is optional.
Fixes <https://bugs.gnu.org/67063>.

* doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string
procedure documentation in line with other procedures in the section.
* libguile/ports.c (scm_unread_string): Make port argument optional.
* test-suite/tests/ports.test: Test unread-char and unread-string
without ports.
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-06 11:51:53 +02:00