﻿__group__	ticket	summary	difficulty	component	version	type	owner	status	created	_changetime	_description	_reporter
Milestone 6.0.0	1146	create-temporary-file and create-temporary-directory are subject to race conditions	medium	core libraries	4.10.x	defect		new	2014-08-05T16:46:58+02:00	2023-11-07T00:23:48+01:00	"Both use the non-atomic strategy of checking if a file system object exists then act, which may lead to race conditions.

{{{create-temporary-directory}}} is specially more fragile because it uses {{{directory-exists?}}} to check if a file system object exists.  So, for example, if a regular file with the same name as the attempted one exists, create-temporary-directory will fail."	Mario Domenech Goulart
Milestone 6.0.0	1303	File ports should be nonblocking	hard	unknown	4.11.0	defect		new	2016-06-30T19:14:45+02:00	2023-11-06T23:43:46+01:00	"As shown by this ugly little program, reading from regular files blocks.

{{{
(use srfi-18)

(thread-start! (lambda () (let lp () (print ""spinning"") (thread-sleep! 0.2) (lp))))
(thread-start! (lambda () (with-input-from-file ""/dev/tty"" (lambda () (let lp () (print (cons 'read-from-tty (read))) (lp))))))

(thread-sleep! 1000)
}}}"	sjamaan
Milestone 6.0.0	1355	define strips hygiene from defined identifiers at top-level	hard	expander	4.12.0	defect		new	2017-03-20T15:08:46+01:00	2023-11-06T23:52:22+01:00	"The following program with tests passes in chibi and scheme48, but fails in chicken.  The expander handles inserted ""tmp"" identifiers and disambiguates correctly for readers and predicates, but it appears define-record-type treats all the setters the same.

{{{
(cond-expand
 (chibi (import (scheme base) (chibi test)))
 (chicken (use test)))

;; other (,open srfi-9 srfi-23 in scheme48)
;; (define (read-string k in)
;;   (let lp ((i k) (res '()))
;;     (if (zero? i)
;;         (list->string (reverse res))
;;         (lp (- i 1) (cons (read-char in) res)))))
;; (define (test-begin) #f) (define (test-end) #f)
;; (define (test e x)
;;   (if (not (equal? e x))
;;       (error ""test failed"" e '!= x)))

;; utility primitive type consisting of a predicate, reader and writer

(define-syntax define-binary-type
  (syntax-rules ()
    ((define-binary-type name pred reader writer)
     (define-syntax name
       (syntax-rules (pred: read: write:)
         ((name pred: args) (pred args))
         ((name read: args) (reader args))
         ((name write: args) (writer args)))))))

;; a fixed-length string

(define-binary-type fixed-string
  (lambda (args)
    (let ((len (car args)))
      (lambda (x) (and (string? x) (= (string-length x) len)))))
  (lambda (args)
    (let ((len (car args)))
      (lambda (in)
        (read-string len in))))
  (lambda (args)
    (lambda (str out)
      (write-string str out))))

;; wrapper around define-record-type to provide type checking and
;; (de)serialization

(define-syntax defrec
  (syntax-rules ()
    ;; all fields processed: expand record, reader and setters
    ((defrec name (make . make-fields) pred reader ()
       (field (type . args) read-field get %set set) ...)
     (begin
       (define-record-type name (make . make-fields) pred
         (field get %set) ...)
       (define set
         (let ((field? (type pred: 'args)))
           (lambda (x val)
             (if (not (field? val))
                 (error ""invalid field"" '(type . args) val))
             (%set x val))))
       ...
       (define reader
         (let ((read-field (type read: 'args)) ...)
           (lambda (in)
             (let ((field (read-field in)) ...)
               (make . make-fields)))))))
    ;; step: insert read-field and %set bindings
    ((defrec name make pred reader
       ((field (type . args) get set) . rest)
       fields ...)
     (defrec name make pred reader rest fields ...
       (field (type . args) read-field get %set set)))))

(define-syntax define-binary-record-type
  (syntax-rules ()
    ((define-binary-record-type name make pred reader . fields)
     (defrec name make pred reader fields))))

;; example

(define-binary-record-type stuff (make-stuff foo bar) stuff?
  read-stuff
  (foo (fixed-string 2) stuff-foo stuff-foo-set!)
  (bar (fixed-string 3) stuff-bar stuff-bar-set!))

(test-begin)
(let ((x (make-stuff ""ab"" ""bar"")))
  (test ""ab"" (stuff-foo x))
  (test ""bar"" (stuff-bar x))
  (stuff-foo-set! x ""xy"")    ;; <----- this checks the right field type
                             ;;        but uses the sets the wrong %set
  (test ""xy"" (stuff-foo x))
  (test ""bar"" (stuff-bar x)))
(test-end)
}}}
"	Alex Shinn
Milestone 6.0.0	1464	ir-macro-expander's compare + define-syntax + modules don't mix		expander	5.0.0	defect		new	2018-05-22T08:18:26+02:00	2023-11-06T23:45:16+01:00	"This snippet is supposed to print ""it is x"", but doesn't if there's a macro called `x` in the module.

{{{
module
 m
 (foo)
 ;; (import chicken scheme)
 (import (chicken syntax) scheme)

 ;; (define-syntax x (ir-macro-transformer (lambda _ `(begin))))

 ;; (define (x) (begin)) ;; This is OK

 (define-syntax foo
   (ir-macro-transformer
    (lambda (e inj cmp)
      (apply
       (lambda (a)
         (if (cmp 'x a) ""it is x"" ""fail""))
       (cdr e))))))

(import m)
(print (foo x))

}}}"	megane
Milestone 6.0.0	1486	Reading and writing to a pipe set up by process can cause scheduler assertion errors	hard	core libraries	4.13.0	defect		new	2018-07-15T13:52:24+02:00	2023-11-06T22:10:38+01:00	"As pointed out in [[https://stackoverflow.com/questions/51344859/connecting-to-interactive-tools-using-chicken-schemes-process|this StackOverflow post]]:

{{{
(use posix)
(let-values (((in out pid) (process ""bc"")))
  (begin
    (display ""2 + 2\n"" out)
    (print (read-line in))))
}}}

Causes the following crash when evaluated:

{{{
thread is registered for I/O on unknown file-descriptor: 4 (expected 3)
[] 
...more...
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<syntax>
<eval>
<eval>
<eval>
<eval>
<eval>  <--
}}}

This bug is not easy to trigger.  I happened to get ""lucky"" and it crashed the first time, but after that I tried again several times and it just worked."	sjamaan
Milestone 6.0.0	1564	srfi-18: (mutex-unlock) Internal scheduler error		extensions	5.0.0	defect		new	2018-11-30T10:26:07+01:00	2023-11-06T22:11:53+01:00	"{{{
(import srfi-18)
(import (chicken random))

(define m (make-mutex))
(define (rt) (/ (pseudo-random-integer 100) 1000))
(define (y)
  (let lp4 ()
    (unless (= 0 (pseudo-random-integer 10))
      (print (current-thread) "" "" ""yield"")
      (thread-yield!)
      (lp4))))

(thread-start!
 (make-thread (lambda ()
                (let lp ()
                  (print (current-thread) "" "" ""lock"")
                  (mutex-lock! m (rt))
                  (print (current-thread) "" "" ""unlock"")
                  (mutex-unlock! m)
                  (y)
                  (lp)))))

(let lp2 ()
  (print (current-thread) "" "" ""lock"")
  (mutex-lock! m (rt))
  (print (current-thread) "" "" ""sleep"")
  (thread-sleep! (rt))
  (print (current-thread) "" "" ""unlock"")
  (mutex-unlock! m)
  (lp2))

}}}

{{{
Warning (#<thread: thread1>): in thread: (mutex-unlock) Internal scheduler error: unknown thread state
#<thread: primordial>
ready

        Call history:

        t.scm:7: chicken.random#pseudo-random-integer
        t.scm:7: scheme#/
        t.scm:19: srfi-18#mutex-lock!
        t.scm:20: srfi-18#current-thread
        t.scm:20: chicken.base#print
        t.scm:21: srfi-18#mutex-unlock!         <--
#
}}}"	megane
Milestone 6.0.0	1695	Exception handler bug when compiled with -O5?	hard	compiler	5.2.0	defect		new	2020-04-10T18:30:26+02:00	2023-11-06T22:13:03+01:00	"Reported by NieDzejkob on IRC:

Compile the following program with -O4 or lower and it terminates. With -O5 it gets stuck in an endless loop in the `with-exception-handler` lambda.

{{{
(import (chicken condition))
(display
  (handle-exceptions exn
                      (if (eq? exn 'two)
                        3
                        (abort exn))
    (let [(orig (current-exception-handler))]
      (with-exception-handler
        (lambda (exn)
          (if (eq? exn 'one)
              (abort 'two)
              (orig exn)))
        (lambda ()
          (abort 'one))))))
}}}"	sjamaan
Milestone 6.0.0	1803	Avoid getrusage system calls in GC	medium	core libraries	5.3.0	defect		new	2022-05-31T13:16:34+02:00	2023-11-06T22:13:54+01:00	To calculate GC time statistics, `C_cpu_milliseconds` is currently used, which results in an getrusage(2) system call on many platforms. This should be avoided, preferrably by using a faster alternative like clock(3).	felix winkelmann
Milestone 6.0.0	1812	Modules leaking define-for-syntax variables and functions		core libraries	5.3.0	defect		new	2022-10-13T15:47:54+02:00	2023-11-10T16:18:45+01:00	"{{{
(module foo
(foo-deluxe)
(import scheme (chicken base) (chicken syntax))
(define-for-syntax (bar) (print ""hi!""))
(define-syntax foo-deluxe
  (syntax-rules ()
    ((foo-deluxe) (bar))))
)

(import foo)
(foo-deluxe)
(bar)
(set! bar #f)
(foo-deluxe)
}}}

Is this intentional?"	Idiomdrottning
Milestone 6.0.0	1837	create-directory doesn't raise an error when the requested directory already exists	easy	core libraries	5.3.0	defect	Mario Domenech Goulart	assigned	2024-06-24T15:57:51+02:00	2024-06-25T11:36:51+02:00	"Changing that behavior in C5 would cause too much trouble, but we can change that in C6.

{{{
$ touch foo
$ csi -e '(begin (import (chicken file)) (create-directory ""foo""))'
$ echo $?
0
}}}

If the new behavior is implemented, please update https://wiki.call-cc.org/porting-c5-to-c6"	Mario Domenech Goulart
Milestone 6.0.0	1466	Try to get rid of evaluated imports in generated import libraries	hard	compiler	5.0.0	enhancement	sjamaan	new	2018-05-24T10:13:03+02:00	2023-11-06T23:53:26+01:00	"As we found out in #1457 and #1172, `merge-se` is quadratic in complexity. This means that every `import` we do is potentially really slow.

Now that we only emit `eval` calls when generating import libraries of modules with syntax exports, it might be worthwhile to see if we can get rid of them altogether. As [http://lists.nongnu.org/archive/html/chicken-hackers/2018-05/msg00024.html|I proposed earlier], one way to do this would be to attach the syntax environment as an alist to each macro in the import library, instead of deriving it via imports (which will actually provide a much larger environment than necessary)."	sjamaan
Milestone 6.0.0	1504	Eggs compiled with -O2	medium	extensions	5.0.0	enhancement		new	2018-08-11T11:49:56+02:00	2023-11-06T23:36:29+01:00	"Some eggs are being compiled with -O2.  Maybe their runtime performance can be improved by compiling them with -O3.  Here's an initial list of the ones I observed being compiled with -O2:


* base64
* defstruct
* matchable
* memory-mapped-files
* posix-groups
* sendfile
* simple-md5
* simple-sha1
* srfi-18
* uri-common
"	Mario Domenech Goulart
Milestone 6.0.0	1611	Restructure checks for inlinable intrinsics	medium	compiler		enhancement	sjamaan	new	2019-04-24T17:16:19+02:00	2023-11-06T22:10:10+01:00	"Currently, we have a lot of intrinsics which are inlinable. Sometimes the safe inlineable versions are missing, sometimes the unsafe ones are missing. It also means there is a *lot* of handwritten C code with duplications.

There would be less duplication if the compiler knew that the safe version is actually (roughly) an argument check followed by an unsafe call.

For example:

- `C_a_i_log` is just `C_check_real` followed by `C_flonum(a, log(f))`
- `C_a_i_flonum_log` is `C_flonum(a, C_log(C_flonum_magnitude(x)))` (it should actually have a `_u_` in its name)

Same is true for all the arithmetic operators in `(chicken flonum)`. At least for flonums, I think it's quite doable to have just the unsafe version and have some sort of ""rewrite"" in the compiler which will do the check followed by a call to the unsafe one.

This can be done for a lot of other intrinsics too; think all the `char=`, `char<`, `char-upcase`, etc.

This would give us a lot of faster implementations of safe operations ""for free"" by rewriting them to the unsafe ones, and if I'm not mistaken, we'd end up with a lot of calls to the ""check"" procedures, which ties in nicely with lfa2, which means all but the first can be eliminated.


I'm thinking something like this:

{{{
(define-intrinsic (chicken.flonum#fp+ x y)
  (check-flonum x)
  (check-flonum y)
  (##core#inline_allocate (""C_a_i_flonum_plus"" 4) x y) ;; to be renamed to C_a_u_i_flonum_plus?
)

(define-intrinsic (scheme#integer->char n)
  (check-fixnum n 'integer->char)
  (##core#inline ""C_make_character"" (##core#inline ""C_unfix"" n))
)
}}}

This could even replace the definitions in `library.scm`; then when we are compiling, we could process this code to generate an intrinsics database file, which the compiler can use like types.db.  The above `define-intrinsic` would collapse to a simple `define` while generating `library.so`.

When the compiler is compiling with an intrinsics database, it can replace all calls with the inlinable versions.

Perhaps this is simply a more controlled way of doing `-emit-inline-file`?

This isn't difficult but a lot of work and some care needs to be taken with regards to backwards C API/binary compatibility."	sjamaan
Milestone 6.0.0	1656	Refactor TCP unit to make ipv6 work from core	medium	core libraries	5.1.0	enhancement		new	2019-11-26T09:37:56+01:00	2023-11-06T22:15:09+01:00	With the IPv4 address space having [https://www.ripe.net/publications/news/about-ripe-ncc-and-ripe/the-ripe-ncc-has-run-out-of-ipv4-addresses officially run out], I think we should start planning to make the [https://wiki.call-cc.org/eggref/5/tcp6 tcp6] egg part of core.	sjamaan
Milestone 6.0.0	1821	Have big-chicken-like feature in the core		core libraries	5.3.0	enhancement		new	2023-06-04T00:11:46+02:00	2023-11-07T18:18:52+01:00	"This is about having the ability to conveniently import all core modules, like what the big-chicken egg provides.
"	Mario Domenech Goulart
Milestone 6.0.0	1828	Keep R5RS syntax-rules?	easy	expander	5.3.0	task		new	2023-11-06T23:22:26+01:00	2023-11-06T23:22:26+01:00	For C6, syntax-rules has been changed to comply with R7RS. We could keep the old semantics as a separate export, since it can parameterized via an additional argument to make-transformer (as suggested by sjamaan). Since the default environmnet is still R5RS, providing R5RS syntax-rules by default seems to me to risk confusion, so I'm inclined to default to R7RS.	felix winkelmann
Milestone 6.0.0	1436	Don't disable inline file generation with -O5 (disable-interrupts)		compiler	5.0.0	change request		new	2018-01-02T11:27:37+01:00	2023-11-06T23:30:46+01:00	"(I'm assuming here that disable-interrupts is enough to implement critical sections in concurrency related code.)

The disable-interrupts declaration correctly disables the global inline file generation. My belief is that inlining is more of an optimization than disabling the interrupt checks.

So removing the disable-interrupts from O5 would be one choice.

But wouldn't it be OK to always disable the checks in inlined code? The functions made available for global inlining are controlled explicitly by the  user by the use of the inline declaration. So if you need interrupt checks (a function doing some heavy computation perhaps) just don't make it available for global inlining.
 "	megane
Milestone 6.0.0	125	cross-chicken should prefer loading uncompiled import libraries	medium	core tools	4.2.x	defect		assigned	2009-11-21T12:38:13+01:00	2023-11-06T22:15:30+01:00	Unless in `-host` mode, `chicken(1)` should prefer loading import libraries from the current directory in source form (`.scm`), or it will possibly load import libs compiled for the target architecture.	felix winkelmann
Milestone 6.0.0	1348	improvement to manual pages	easy	documentation	4.12.0	defect		new	2017-02-27T08:28:28+01:00	2023-11-06T23:37:42+01:00	It would be greatly helpful if each manual on the website had a link to the level right above it.   Right now, to know which chapter you are in, you have to scroll to the bottom of each page and click the link to go to the previous section until you get to the beginning.	vigilancetech
Milestone 6.0.0	1370	Build-dependencies between import libraries and core units don't seem to be completely right	medium	build system	5.0.0	defect		new	2017-05-09T16:19:05+02:00	2023-11-06T22:15:49+01:00	"During some messing around with my working copy, I deleted all generated `*.import.c` and
`*.import.scm` files. Running `make` again resulted in build errors, reporting missing import libraries (more specifically: unresolved imports.) To fix this, the unit holding the module that produces the missing import libraries has to be recompiled from the `.scm` spurce.

It seems that the dependencies between Scheme files and import libraries are not fully specified in `rules.make`.
"	felix winkelmann
Milestone 6.0.0	1619	Specialization ignores fixnum mode, leading to suboptimal code		compiler	5.0.0	defect		new	2019-05-29T16:33:06+02:00	2023-11-06T22:16:39+01:00	"As we found with #1604, when running with `-fixnum-arithmetic`, specialization happens before optimization.

Because the scrutinizer doesn't know about fixnum mode, this is still something of an issue, because we'd specialize to code that supports bignums, which is allocating. This is problematic in two ways: one is that the generated code that doesn't get replaced will not be able to deal with bignums (resulting in extremely strange behaviour on overflow or when the code results in ratnums), and it's less than optimal because fixnum ops aren't allocating, so they should be faster still.

Perhaps we could stop the scrutinizer from doing replacements that deal with numerics in fixnum mode?"	sjamaan
Milestone 6.0.0	1823	Ship chicken.version module		unknown	5.3.0	defect	Mario Domenech Goulart	accepted	2023-06-04T01:01:36+02:00	2025-10-03T18:26:59+02:00	"CHICKEN 4's setup-api provides {{{version>=?}}}, whose code is in CHICKEN 5 but not exposed to users.  That leads to a lot of copy&paste of that procedure into the source of eggs.

This code could be an egg, but then it is needed by CHICKEN anyway, and has been stable enough not to require any modification along the entire time CHICKEN 5 has been available, so unlikely to require a lot of maintenance in the future.

The following eggs copy&paste the definition from CHICKEN 4:

* [https://github.com/mario-goulart/test-new-egg/blob/635eb6abe29890b23c906b50c3ecd02f4146b7ec/test-new-egg.scm#L26-L44 test-new-egg]
* [https://github.com/mario-goulart/henrietta-cache-git/blob/344ed10b82c03e539d45bc953cd1bac7e43c03f6/version.scm#L6-L24 henrietta-cache-git]
* [http://bugs.call-cc.org/browser/project/release/5/henrietta/trunk/henrietta.scm#L66 henrietta]
* [https://code.call-cc.org/cgi-bin/gitweb.cgi?p=eggs-5-latest.git;a=blob;f=git/0.2.0/custom-build.scm;h=ac99a6441d286b2f59a36b36cbd5985f86756a2f;hb=HEAD#l18 git]
* [https://github.com/mario-goulart/egg-tarballs/blob/fa18fc9d0b4ceccd08c7b4a03213aa670edf9f3c/egg-tarballs-index.scm#L24-L42 egg-tarballs]
* [https://git.sr.ht/~dieggsy/chicken-update/tree/f473ed256bde58b5bfd030db4ec3cc2eaf0aac52/item/chicken-update.scm#L86-103 chicken-update]

Additionally, the following CHICKEN code not packaged as eggs duplicate {{{version>=?}}}:

* [https://github.com/mario-goulart/egg-layer/blob/628367314e87c0fc99d269db740eba5d7c371dde/egg-layer.scm#L71-L89 egg-layer]
"	Mario Domenech Goulart
Milestone 6.0.0	1856	srfi-69 egg hash-table-remove! operation doesn't operate over the entire table	trivial	extensions	5.4.0	defect		new	2025-08-20T00:34:01+02:00	2025-08-20T00:34:01+02:00	hash-table-remove! when a match will remove the bucket, but ignore the rest of the chain.	Kon Lovett
Milestone 6.0.0	1857	srfi-69 egg hash-table-update![/default] always attempts table resize	easy	extensions	5.4.0	defect		new	2025-08-20T02:55:05+02:00	2025-08-20T02:55:05+02:00	assumes the entry to be updated doesn't exist so attempts to grow the table by 1	Kon Lovett
Milestone 6.0.0	1858	srfi-69 egg uses list for table of primes & vector better	trivial	extensions	5.4.0	defect		new	2025-08-20T03:02:15+02:00	2025-08-20T03:02:15+02:00	vector is better for size & access, especially since during a growth spurt the table is frequently referenced. the table is never accessed except thru one function so any representation change is isolated.	Kon Lovett
Milestone 6.0.0	938	Feature Request: Load type files for units	medium	compiler	4.8.x	enhancement	felix winkelmann	assigned	2012-10-21T14:42:52+02:00	2023-11-06T22:18:08+01:00	"Currently type files for units not installed in the repository are not loaded.

I've attached a patch that does something like this, but it's just a quick hack that works for my needs.

You should probably use `##sys#resolve-include-filename` to find the types file, like it's used to find the inline files.
"	megane
Milestone 6.0.0	1286	define-constant and define-inline should shadow imported identifiers	hard	compiler	4.10.x	enhancement		new	2016-05-22T07:28:29+02:00	2023-11-06T22:18:34+01:00	"The following should print {{{yes}}} rather than the procedure {{{exact}}}:

{{{
(use (only data-structures exact))
(define-constant exact 'yes)
(print exact) ; => #<procedure (numbers#inexact->exact x1007)> instead of 'yes
}}}

The same applies for {{{define-inline}}}:

{{{
(use (only numbers exact))
(define-inline (exact n) 'yes)
(print (exact 1.0)) ; => 1 instead of 'yes
}}}

This happens because variables are module-resolved (via {{{lookup}}} against the current environment) in {{{resolve-variable}}} before they're keyed into the constant and inline tables. I think the raw identifier should be used when looking up inlined and constant idenfifiers instead ({{{x0}}} rather than {{{x}}}), but haven't looked too deeply at this issue yet."	evhan
Milestone 6.0.0	1605	Display compiler warnings for macros with missing imports	hard	compiler	5.0.0	enhancement		new	2019-04-10T12:07:55+02:00	2023-11-06T23:54:29+01:00	The compiler already displays warnings for procedures with missing imports which is super useful, especially when compiling code that's not wrapped in a module (wrapping it in a module will turn the warnings into errors).  However there is no equivalent for macros with missing imports and neither does wrapping them into a module produce a warning or error.  This leads to less than obvious errors if you later import such a macro into other code and compile it, you'll then get an error for the import you forgot to add for the macro's module.  See #1603 for an example.	Vasilij Schneidermann
Milestone 6.0.0	1705	Module names should be unique	medium	compiler	5.2.0	enhancement		new	2020-07-21T09:34:10+02:00	2023-11-06T23:07:44+01:00	"When you compile a program which uses a module and defines a module of the same name, the compiler should probably give a warning or error.

A practical (simplified) example of this which alicemaz ran into:

http://paste.call-cc.org/paste?id=59272bcd1450867b3db94a2b7a6148fbd39d4f44

I think we can't really do this in the interpreter because re-evaluating an existing module should be possible on the REPL (think incremental development from Emacs etc)."	sjamaan
Milestone 6.0.0	1746	Improve chicken-install cyclic dependencies error		core tools	5.2.0	enhancement		new	2021-04-12T23:18:40+02:00	2023-11-06T23:35:17+01:00	"Currently with cyclic dependencies in a complex egg file, {{{chicken-install}}} throws an error like e.g.:

{{{
Error: cyclic dependencies: ((math.polynomial.chebyshev math.flonum.functions math.racket-shim math.base) (math.functions.stirling-error math.base math.flonum.functions math.flonum.polyfun math.polynomial.chebyshev math.racket-shim) (math.vector.base) (math.number-theory.tangent-number) (math.number-theory.quadratic-residues math.number-theory.divisibility math.number-theory.modular-arithmetic math.number-theory.base math....
}}}

This is quite hard to make sense of (and not to mention incomplete)"	Diego
Milestone 6.0.0	1824	Change locatives representation	medium	core libraries	5.3.0	enhancement	sjamaan	assigned	2023-06-27T09:24:25+02:00	2023-06-27T09:24:25+02:00	"As pointed out [https://lists.nongnu.org/archive/html/chicken-hackers/2023-06/msg00029.html here], we can change the representation of locatives such that they take up less space, and we only have to traverse the live '''weak''' locatives for update during GC.

The idea is to drop the extra ""object"" slot, and store it in the pointer slot instead. When the locative is weak, set {{{C_SPECIALBLOCK_BIT}}}.  When it is strong, do not set it (so that the object is referenced normally). For weak locatives, we traverse the live ones using the ""chained"" approach and update the object.

We don't need to do the pointer recalculation on every GC.  Instead, we calculate the pointer on-the-fly during {{{locative_ref}}}.

NOTE: Perhaps we also want to expose a version of locative-ref that doesn't error out when the object has been collected, but returns {{{bwp-object}}} instead? This means handling of such locatives is a bit simpler and doesn't require exception handling."	sjamaan
Milestone 6.0.0	1354	Clean up the expander a bit	hard	expander	5.0.0	task	sjamaan	new	2017-03-18T22:40:20+01:00	2023-11-06T23:08:03+01:00	"Currently the expander is full of hooks and hacks, mostly for maintaining the line number database and various syntactic environments.  It would be nice if we can clean things up a bit. A few ideas:

* {{{##sys#syntax-context}}} and {{{##sys#syntax-error/context}}} are weird and can maybe be cleaned up if we can make {{{##sys#check-syntax}}} work better with line number info.
* {{{##sys#syntax-error-culprit}}} seems to be unnecessary, because while expanding {{{##sys#check-syntax}}} should have access to the input form already?
* {{{##sys#line-number-database}}} is defined in expander, but only really used in {{{core.scm}}} (except for getting the line number)
* The new {{{expansion-result-hook}}} is yet another hook, and can perhaps be combined with the previous two.
* The special-cased hack in {{{##sys#canonicalize-body}}} that prevents expansion of {{{import}}} and hands back control to the compiler after expansion of {{{##core#module}}}) (in a currently pending patch) needs to die. No clue yet how to do this..."	sjamaan
Milestone someday	1112	Figure out a way to safely release objects	hard	core libraries	4.8.x	defect		new	2014-04-16T17:11:17+02:00	2017-08-25T14:05:30+02:00	"The {{release-object}} procedure will just call {{free()}} on the object's pointer.  This means that any Scheme variable still referring to the object will now point to free memory, which may get overwritten with arbitrary values.

The GC will not touch memory outside the heap, but it's possible that the freed object's memory gets ""pulled in"" when resizing the heap upon major GC, which means the GC's tests for whether it's in the heap space will succeed, causing it to treat the object as ""valid"", even if something else has temporarily written bogus stuff to that memory space in between.

We need a way for the GC to kill all references to the released object, but this is currently impossible: these references are plain pointers, and there is no way to ensure a GC won't find any references to these objects.

The trick used by object-become is to collect these objects on a special stack, and force a major GC, which then treats these objects specially. This is probably too much of performance impact though, because object-evict generally tends to be used for performance reasons.

Perhaps some form of ""weak evicted object pointers"" can be introduced?"	sjamaan
Milestone someday	1293	eq?-hash tables calculcate different value for objects after they're mutated and lose locatives after GC	hard	core libraries	4.10.x	defect		new	2016-05-27T08:43:10+02:00	2017-10-28T21:49:45+02:00	"If you mutate a pair, it's still `eq?` to itself, but the `hash-by-identity` / `eq?-hash` doesn't calculate the same hash anymore, which means the hash table cannot find the key, unless the randomization factor happens to be such that it finds the same bucket, of course, but that's highly unlikely for simple cases like the one below:

{{{
#;1> (use srfi-69)
; loading /home/sjamaan/chickens/4.11.0/lib/chicken/8/srfi-69.import.so ...
; loading library srfi-69 ...
#;2> (define x (cons 1 2))
#;3> (hash-by-identity x)
380849329
#;4> (set-car! x 3)
#;5> (hash-by-identity x)
380718257
#;6> (= #3 #5)
#f
#;7> 
}}}

Originally [[http://paste.call-cc.org/paste?id=982e393227789ab1a6c471ada66e729eb28f83b8|pointed out by John Croisant]]:

{{{#!scm

;; Even though the filler slots are not used, if you remove any of
;; them, the hash of the instance will change after GC, causing the
;; hash table lookup to fail.

(use srfi-69 lolevel)

(define table (make-hash-table test: eq? hash: eq?-hash))

(define-record-type box
  (make-box contents)
  box?
  ;; Remove or comment out any of the next three lines:
  (filler1  box-filler1)
  (filler2  box-filler2)
  (filler3  box-filler3)
  (contents box-contents))

(define my-box (make-box (make-locative ""foo"")))

(hash-table-set! table my-box #t)

(printf ""before gc, hash table contains ~S? ~S~N""
        my-box
        (hash-table-exists? table my-box))

(gc)

(printf ""after gc,  hash table contains ~S? ~S~N""
        my-box
        (hash-table-exists? table my-box))

(printf ""hash table as alist: ~S~N""
        (hash-table->alist table))
}}}"	sjamaan
Milestone someday	488	SLIME completion does not complete up to first non-unique point in string	hard	extensions	4.6.x	defect	Nick Gasson	new	2011-01-30T13:59:06+01:00	2023-11-06T21:57:47+01:00	"When I type in {{{(with-i<TAB>)}}}, I'd expect SLIME to complete {{{(with-input-from-)}}} and then offer me the options with-input-from-file, with-input-from-port, with-input-from-string and with-input-from-pipe.

Right now it only offers options for completion but does not fill out the parts that can already be filled out, requiring me to switch to the completion buffer and choose an option or type it out myself until there's only one option left; this it does complete.

According to Christian, this may be a problem with the way the swank server replies to the completions request."	sjamaan
Milestone someday	731	couchdb-view-server: segfault in tests		extensions	4.7.x	defect	Moritz Heidkamp	new	2011-11-18T18:26:22+01:00	2023-11-06T21:58:32+01:00	See http://tests.call-cc.org/master/linux/x86/2011/11/18/salmonella-report/tests/couchdb-view-server.html	Mario Domenech Goulart
Milestone someday	779	hyde: support trailing slashes on directories	trivial	extensions	4.7.x	defect		new	2012-01-19T03:31:25+01:00	2023-11-06T21:59:31+01:00	"hyde serve (hyde 0.15) fails to serve index content when the request url has a trailing slash on the end of the directory.  For example, make a hyde project with a file like the following in the src/ dir:

  about/index.wiki

Run hyde serve and try the following urls:

  http://localhost:8080/about/index.html → OK
  http://localhost:8080/about            → OK
  http://localhost:8080/about/           → FAIL

The problem is in the procedure 'page-by-path', which is called by 'serve' to find the page object for the given uri path.  In the case where the directory has a trailing slash, the path object (a list that was returned by 'uri-path') has as its last term an empty string, and page-by-path fails to deal with this.

A patch showing one way to fix this is attached.
"	John Foerch
Milestone someday	813	Extension tiger-hash fails on big-endian machines	hard	extensions	4.7.x	defect	Kon Lovett	accepted	2012-04-07T19:43:00+02:00	2023-11-06T21:59:48+01:00	Doesn't pass self-test.	Kon Lovett
Milestone someday	945	html-parser supports only a few entities	easy	extensions	4.8.x	defect	Alex Shinn	assigned	2012-10-31T00:59:05+01:00	2017-08-25T14:10:09+02:00	The html-parser egg supports only a few entities (&nbsp;, &lt; and friends) by default.  If one wants to parse html that contains other entities than these, one cannot use the simple html->sxml, but must use make-html-parser just to add entities.  I propose that for purposes of html->sxml, html-parser should not validate entities at all, but simply create sxml entity forms for whatever entities it encounters.	John Foerch
Milestone someday	960	Need API to box and unbox FILE* pointers as Scheme ports	hard	core libraries	4.8.x	defect		new	2012-12-18T12:47:48+01:00	2016-08-25T21:07:47+02:00	"The C API should be able to box a FILE* as a Scheme input port or output port.

There should also be a way to extract a FILE* from a Scheme port, or NULL if the port is not file-based.

Ideally this should be done by extending the list of foreign type specifiers."	johnwcowan
Milestone someday	980	make input-parse more neighbourly by signalling an exception in assert-curr-char instead of calling error	easy	unknown	4.8.x	defect		new	2013-02-08T12:53:38+01:00	2016-08-25T21:10:17+02:00	The attached patch signals an exception of type (input-parse parser-error exn) instead of calling error directly.	Christian Kellermann
Milestone someday	991	spiffy-request-vars' test fails sometimes	insane	unknown	4.8.x	defect		reopened	2013-03-01T23:11:52+01:00	2016-08-25T21:10:56+02:00	"A failure that sometimes happens on spiffy-request-vars' tests happened yesterday while I was testing a stability release tarball provided by Jim.

Here are the reports:

http://tests.call-cc.org/master/linux/x86/2012/06/19/salmonella-report/test/spiffy-request-vars.html
http://tests.call-cc.org/master/linux/x86/2012/09/06/salmonella-report/test/spiffy-request-vars.html
http://tests.call-cc.org/master/linux/x86/2012/09/10/salmonella-report/test/spiffy-request-vars.html

The report for the test I was running yesterday is here: http://parenteses.org/mario/salmonella/4.8.0.3/linux/x86-64/2013/02/28/salmonella-report/test/spiffy-request-vars.html"	Mario Domenech Goulart
Milestone someday	1005	mmap test doesn't correctly catch error situations	medium	extensions		defect		reopened	2013-04-11T15:12:17+02:00	2016-08-25T20:17:48+02:00	"I have just came across this issue when dealing with a failed mmap FFI call. In this case mmap (The C function) will return a MAP_FAILED which is defined as (void*)-1 on linux and OpenBSD.

The mmap code checks for this by doing a (eq? -1 addr2). This is fine for 32 bit systems but not for 64 bit systems.

{{{
;; on 32 bit
#;2> (address->pointer -1)
#<pointer 0xffffffff>

;; on 64 bit
#;2> (address->pointer -1)
#<pointer 0x0>
#;3> (pointer->address #2)
1.84467440737096e+19
}}}

Note how the pointer printing code also gets it wrong. **this has been fixed in CHICKEN 5: it will now correctly print the pointer's address, interpreted as an unsigned number.**

A workaround would be to explicitly check for the -1 pointer representation:

{{{
(pointer=? (address->pointer -1) addr2)
}}}

This works but looks icky. I am not sure how to handle this right."	Christian Kellermann
Milestone someday	1043	byte-blob-stream-find fails to find matches at the end of a stream		extensions	4.8.x	defect	Ivan Raikov	assigned	2013-08-08T03:20:33+02:00	2014-08-05T03:24:33+02:00	"Analogous to issue #1037, byte-blob-stream-find cannot find matches at the end of a stream:

(byte-blob-stream-find (list->byte-blob '(1 31)) 
 (list->byte-blob-stream '(0 1 31 3)))
"	Ivan Raikov
Milestone someday	1095	AD egg compilation fails due to unsupported gcc flag on OpenBSD-current	trivial	unknown	4.8.x	defect		new	2014-02-04T13:16:01+01:00	2016-08-25T21:24:10+02:00	"The AD egg fails to compile, due to a hard coded ""-Wno-unused-but-set-variable"" which is not available on OpenBSD-current's gcc (4.2.1).

It builds fine without that flag."	Christian Kellermann
Milestone someday	1128	stty termios struct, add feature test for speed attributes	hard	extensions	4.9.x	defect	Alex Shinn	new	2014-06-03T17:03:24+02:00	2016-08-25T21:34:19+02:00	"the stty egg fails to compile on android because of missing fields.

in android bionic termios is defined like this:
{{{
struct termio { 
  unsigned short c_iflag;	 /* input mode flags */ 
  unsigned short c_oflag;	 /* output mode flags */ 
  unsigned short c_cflag;	 /* control mode flags */ 
  unsigned short c_lflag;	 /* local mode flags */ 
  unsigned char c_line;	         /* line discipline */ 
  unsigned char c_cc[NCC];	 /* control characters */ 
};
}}}

while on linux (x86) it's:

{{{
struct termios 
{ 
  tcflag_t c_iflag;	 /* input mode flags */ 
  tcflag_t c_oflag;	 /* output mode flags */ 
  tcflag_t c_cflag;	 /* control mode flags */ 
  tcflag_t c_lflag;	 /* local mode flags */ 
  cc_t c_line;	         /* line discipline */ 
  cc_t c_cc[NCCS];	 /* control characters */ 
  speed_t c_ispeed;	 /* input speed */ 
  speed_t c_ospeed;	 /* output speed */ 
  #define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 
  #define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 
};
}}}

The attached patch adds feature tests for c_ispeed and c_ospeed. Have tested on my workstation (arch linux x86) and embedded android (arm).

My first time using feature-test so if you have any feedback please let me know. If it looks okay, please merge.

Regards,
Peder Refsnes"	hanDerPeder
Milestone someday	1131	Kill ##sys#alias-global-hook with fire	insane	unknown	4.9.x	defect		new	2014-06-09T20:57:36+02:00	2023-11-06T21:53:43+01:00	The whole concept is broken.  Just by studying the code it's easy to come up with bug after bug.	sjamaan
Milestone someday	1141	hyde: execute permissions on hyde executable	medium	extensions	4.9.x	defect	Moritz Heidkamp	assigned	2014-07-15T01:37:54+02:00	2017-08-25T14:14:06+02:00	"I installed hyde by doing:

  $ chicken-install -s hyde

Chicken-install reported that the hyde executable was installed like this:

  sudo cp -r 'hyde' '/usr/bin/hyde'
  sudo chmod a+r '/usr/bin/hyde'

This file then did not have execute permission for my user account:

  $ ls -la /usr/bin/hyde
  -rwxr-xr-- 1 root root 82326 Jul 14 19:24 /usr/bin/hyde

This may or may not be related to the fact that my account's umask is 027 instead of the more commonly seen 022.

  $ umask
  0027

I am using chicken 4.9.0 from Debian jessie (current testing)."	John Foerch
Milestone someday	1145	Issue with matchable and the module system	hard	extensions	4.9.x	defect	sjamaan	assigned	2014-08-05T16:15:36+02:00	2016-08-25T21:36:06+02:00	Here are some cases that illustrate the problem: http://paste.call-cc.org/paste?id=4d676dd966a3e3c5b5a3d216014d07a7fa746c6f	Mario Domenech Goulart
Milestone someday	1165	redis relies on GNU make, which is not the default make on BSDs	medium	extensions	4.9.x	defect	0xab	new	2014-10-28T14:20:22+01:00	2016-08-25T21:36:49+02:00	See http://salmonella-freebsd-x86-64.call-cc.org/master/clang/freebsd/x86-64/2014/10/28/salmonella-report/install/redis.html for an error example.	Mario Domenech Goulart
Milestone someday	1168	make install: umask problem with modules.db	medium	build system	4.9.x	defect		new	2014-11-09T03:40:26+01:00	2016-08-25T21:37:00+02:00	With a UMASK of 0027, 'sudo make PLATFORM=linux install' installed the file $PREFIX/lib/chicken/7/modules.db with permissions rw-r-----, instead of the expected rw-r--r--, preventing csc from working for my user account.	John Foerch
Milestone someday	1180	parley seems to insert the same sexpression to the reader again when getting input while sleeping		extensions	4.9.x	defect	Christian Kellermann	new	2015-02-17T12:56:53+01:00	2017-10-14T16:59:19+02:00	See http://paste.call-cc.org/paste?id=1f10cc1f4285e1b1a4de027bc05a3ae30652121b	Christian Kellermann
Milestone someday	1204	chicken-install permissions with executables	medium	unknown	4.9.x	defect		new	2015-07-26T18:02:02+02:00	2016-08-25T21:42:51+02:00	"I believe I am seeing another case of issue #773, incorrect permissions on chicken-install'd files when UMASK is 0027.  I installed the missbehave egg with chicken-install, which includes a binary called 'behave'.  I see the following in chicken-install's output:

    sudo cp -r 'behave' '/usr/local/bin/behave'
    sudo chmod a+r '/usr/local/bin/behave'

This file should have a+rx since it is an executable.

CHICKEN 4.9.0.1
setup-helper: 1.5.4
"	John Foerch
Milestone someday	1217	Unit Posix time/date behaviors differ across operating systems	insane	core libraries	4.9.x	defect		new	2015-08-28T15:17:10+02:00	2016-08-25T21:44:33+02:00	"Procedures seconds->local-time and string->time produce different results on (Arch) Linux vs OS X. Windows behavior is unknown. This likely reflects a difference in the behavior of strptime on the two systems---see:

[http://stackoverflow.com/questions/31984002/why-does-strptime-behave-differently-on-osx-and-on-linux]

Giving a fully specified and unambiguous time string in Chicken does not fix this problem. For example,


{{{
(string->time ""2015-08-25 12:00:00 EDT"" ""%Y-%m-%d %H:%M:%S %Z"")
}}}

returns different vectors on OS X vs Linux."	nemo
Milestone someday	1235	Issue with parameters	medium	core libraries	4.10.x	defect		new	2015-12-15T11:36:17+01:00	2018-04-27T20:59:51+02:00	"Reported by Joo ChurlSoo via e-mail:

{{{
CHICKEN
(c) 2008-2015, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.10.0 (rev b259631)
windows-mingw32-x86 [ manyargs dload ptables ]
compiled 2015-08-04 on yves.more-magic.net (Linux)
#;1> (define a (make-parameter 1))
#;2> (a 10 23)
10
#;3> (a)
10
#;4> (define b (make-parameter 2 number->string))
#;5> (b 20 23)
20
#;6> (b)
20
#;7> (b 20)
""20""
#;8> (b)
""20""
}}}"	Mario Domenech Goulart
Milestone someday	1238	mw (tests): openssl egg is needed for HTTPS	trivial	extensions	4.10.x	defect	Tony Sidaway	new	2015-12-31T12:21:32+01:00	2016-08-25T20:23:57+02:00	See http://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2015/12/30/salmonella-report/test/mw.html	Mario Domenech Goulart
Milestone someday	1241	pty: test failure		extensions	4.10.x	defect	Alex Shinn	new	2015-12-31T12:26:51+01:00	2015-12-31T12:26:51+01:00	See http://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2015/12/30/salmonella-report/test/pty.html	Mario Domenech Goulart
Milestone someday	1247	twilio's license is BSD, but it depends on a GPL-3 egg (s)		extensions	4.10.x	defect	Peter Danenberg	new	2015-12-31T12:53:30+01:00	2015-12-31T12:53:30+01:00	"See http://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2015/12/30/salmonella-report/dep-graphs/twilio.html

[https://wiki.call-cc.org/egg/s s]'s license is GPL-3."	Mario Domenech Goulart
Milestone someday	1265	AD: installation failure	easy	extensions	4.10.x	defect	0xab	new	2016-02-25T22:25:24+01:00	2016-08-25T20:30:35+02:00	"See http://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2016/02/25/salmonella-report/install/AD.html

Note that the installation failure for AD breaks four eggs: http://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2016/02/25/salmonella-report/rev-dep-graphs/AD.html"	Mario Domenech Goulart
Milestone someday	1291	lowdown: markdown->sxml produces unnormalised SXML	medium	extensions	4.10.x	defect	Moritz Heidkamp	assigned	2016-05-26T18:51:39+02:00	2016-08-25T20:32:44+02:00	"{{{
% csi

CHICKEN
(c) 2008-2015, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.10.0 (rev b259631)
macosx-unix-clang-x86-64 [ 64bit manyargs dload ptables ]
compiled 2015-08-04 on yves.more-magic.net (Linux)

#;1> (use lowdown sxpath)
; loading /Data/tools/chicken-4.10.0/lib/chicken/7/lowdown.import.so ...
[...]
#;2> (define testdoc ""Title\n=====\n\n  * [link](uri)\n"")
#;3> (define sx-test (with-input-from-string testdoc (lambda () (markdown->sxml (current-input-port)))))
#;4> sx-test
((h1 (""Title"")) (ul (li ((a (@ (href ""uri"")) ""link"")))))
#;5> ((sxpath '(// a)) sx-test)
()
#;6> (define (tidy-sxml sx)
      (cond ((not (list? sx)) sx)
            ((and (= (length sx) 1)
                  (list? (car sx)))
             ;; turn ((node ...)) into (node ...)
             (tidy-sxml (car sx)))
            (else (map tidy-sxml sx))))
#;7> ((sxpath '(// a)) (tidy-sxml sx-test))
((a (@ (href ""uri"")) ""link""))
#;8> 
}}}

I think the parsed `sx-test` is not invalid, but it does appear to be
sufficiently unnormalised that it confuses `sxpath`.
See http://okmij.org/ftp/Scheme/SXML.html#Normalized%20SXML

The function `tidy-sxml` works in this case, but is probably too simple-minded to work in general."	Norman Gray
Milestone someday	1305	chmod of modules.db on new installation	easy	build system	4.11.0	defect		new	2016-07-17T00:44:49+02:00	2016-08-25T20:45:34+02:00	"I use a umask of 0027 on my debian system, so files created with my user account have no 'other' permissions by default.  I built and installed CHICKEN 4.11.0 as follows:

    $ make PLATFORM=linux PREFIX=/usr/local
    $ sudo make PLATFORM=linux PREFIX=/usr/local install

The file /usr/local/lib/chicken/8/modules.db was installed with the following permissions:

    -rw-r----- 1 root staff 50046 Jul 16 16:18 /usr/local/lib/chicken/8/modules.db

This prevents chicken-install from working properly."	John Foerch
Milestone someday	1321	async-io tests hang		unknown	4.11.0	defect		new	2016-08-27T00:08:12+02:00	2017-11-25T19:11:24+01:00	"See http://lists.nongnu.org/archive/html/chicken-users/2016-07/msg00040.html for more context.

Basically, async-io tests hang sometimes.  To reproduce the issue, just run the tests repeatedly until they hang.

It was making salmonella hang on the linux machines.  I installed a hack to kill the hanging test process after some time.  Although the hack is in place and working, salmonella runs take longer when the test process hangs, as the hack polls to detect hanging processes."	Mario Domenech Goulart
Milestone someday	1323	Teach compiler that fold and map with clean procedure is itself clean	hard	compiler	4.11.0	defect		new	2016-08-29T12:30:29+02:00	2016-08-29T12:30:29+02:00	"It looks like CHICKEN currently doesn't understand that `fold` and `map` are `#:clean` if the argument procedure is `#:clean`.  This prevents it from recognising that something like `(fold + 0 (iota 10000))` is foldable.

We could hardcode these procedures, but I'd prefer not to, so this might require some kind of new annotation in `types.db`.

This idea was inspired by http://pramode.in/2016/08/25/rust-add-billion-numbers/ - if Rust can do it, so can we!"	sjamaan
Milestone someday	1325	qt-light egg: timers may put chicken into an inconsistent state		extensions	4.11.0	defect		new	2016-09-02T17:36:22+02:00	2017-08-25T14:22:59+02:00	"I have found that a Qt::Timer may be used to make callbacks into chicken faster than the callbacks themselves can finish.  This puts chicken into an inconsistent state and causes a crash.  Here is a test case - callback rate and count may need to be adjusted for faster machines.

{{{
(import chicken scheme)

(use qt-light)

(qt:init)

(let* ((thread-rate 0.025)
       (timer (qt:timer thread-rate)))
  (define (timer-callback)
    (let loop ((i 0))
      (if (< i 1e6)
          (loop (+ i 1))
          #t)))
  (qt:connect timer ""timeout()"" timer-callback)
  (qt:start timer)
  (qt:run))
}}}

{{{
$ ./minimal.scm 

Warning: excluded identifier doesn't exist in module foreign: foreign-declare

Warning: excluded identifier doesn't exist in module foreign: foreign-declare
csi: runtime.c:2797: C_save_and_reclaim: Assertion `av > C_temporary_stack_bottom || av < C_temporary_stack_limit' failed.
Aborted
}}}

Since Qt must be used for the main event loop in a Qt program, making timers safe to use would be fairly important for the qt-light egg.  Without knowing much about the internals, I think that maybe a semaphore could be used to block a callback if a previous callback has not finished.  When this occurs, it would be nice if the api also exposed a way for a chicken program to know that a callback was dropped, so that it could take an appropriate action."	John Foerch
Milestone someday	1335	Building on OS X: egg uses 1 deprecated function and 1 missing function	easy	unknown	4.11.0	defect	Thomas Chust	assigned	2016-10-31T11:49:09+01:00	2021-08-13T14:33:24+02:00	"Building the sqlite3 egg on OS X (10.11.6) produces a warning and an error -- see below for full trace.

Specifically:
{{{
'sqlite3_enable_shared_cache' has been explicitly marked deprecated here
}}}
The SQLite docs note https://www.sqlite.org/c3ref/enable_shared_cache.html that ‘This method is disabled on MacOS X 10.7 and iOS version 5.0 and will always return SQLITE_MISUSE’

Also, the function sqlite3_enable_load_extension appears not to be available on OS X.  The SQLite docs https://www.sqlite.org/c3ref/enable_load_extension.html seem to recommend a different route to disabling this, on security grounds, but I confess I don't understand the implications of that.  This function is still mentioned in the system sqlite3.h header, but it appears to be absent from (been deliberately removed from?) the system sqlite3 library.

There appear to be alternative documented routes to both of the intended functionalities, so I've tentatively marked this as 'easy' difficulty.

Building with:
{{{
chicken-install -n -D disable-shared-cache,disable-load-extension
}}}
appears to work OK, though I haven't tested fully.

Original build output...

{{{
% chicken-install -version
4.11.0
% chicken-install -n
retrieving ...
checking platform for `sqlite3' ...
checking dependencies for `sqlite3' ...
install order:
(""sqlite3"")
installing sqlite3: ...
changing current directory to .
  '/Data/tools/chicken-4.11.0/bin/csi' -bnq -setup-mode -e ""(require-library setup-api)"" -e ""(import setup-api)"" -e ""(setup-error-handling)"" -e ""(extension-name-and-version '(\""sqlite3\"" \""\""))"" -e ""(keep-intermediates #t)"" -e ""(setup-install-mode #f)"" 'sqlite3.setup'
  '/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension -setup-mode -k   -O2 -d1 -s sqlite3.scm -lsqlite3 -j sqlite3

Warning: imported identifier doesn't exist in module chicken: dynamic-wind
sqlite3.c:310:23: warning: 'sqlite3_enable_shared_cache' is deprecated: first deprecated
      in macOS 10.7 [-Wdeprecated-declarations]
C_r=C_int_to_num(&C_a,sqlite3_enable_shared_cache(t0));
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/sqlite3.h:5424:31: note: 
      'sqlite3_enable_shared_cache' has been explicitly marked deprecated here
SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int) __OSX_AVAILABLE_BUT...
                              ^
1 warning generated.
Undefined symbols for architecture x86_64:
  ""_sqlite3_enable_load_extension"", referenced from:
      _f_8972 in sqlite3.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Error: shell command terminated with non-zero exit status 256: '/Applications/Xcode.app/Contents/Developer/usr/bin/gcc' 'sqlite3.o' -o 'sqlite3.so' -m64 -bundle -headerpad_max_install_names -lsqlite3 -L/Data/tools/chicken-4.11.0/lib -lchicken -lm

Error: shell command failed with nonzero exit status 256:

  '/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension -setup-mode -k   -O2 -d1 -s sqlite3.scm -lsqlite3 -j sqlite3


Error: shell command terminated with nonzero exit code
17920
""'/Data/tools/chicken-4.11.0/bin/csi' -bnq -setup-mode -e \""(require-library set...
}}}"	Norman Gray
Milestone someday	1350	Static linking is broken on Solaris	medium	unknown	4.12.0	defect		new	2017-03-08T05:06:23+01:00	2017-03-12T22:14:04+01:00	"While testing Peter's fix for #1347, I found that static linking is totally broken on Solaris.

In particular, our linking tests fail on both Solaris 10 and 11 (gcc, i386 -- I haven't tried with any other compiler or architecture), albeit with slightly different error messages. The underlying issue might be the same, however, since they both fail in the same situations.

Note that this problem isn't caused by the fix for #1347; both c4c60ce5 and 4.12.0 fail in the same way, so this was a preexisting bug.

Try running the following command to see the problem:

{{{
$ echo '(print 1)' | csc -static -o /tmp/a.out -
}}}

Test output on Solaris 10:

{{{
==> solaris-solaris-10-i386: ======================================== linking tests ...
==> solaris-solaris-10-i386: [... snip ...]
==> solaris-solaris-10-i386: /export/home/vagrant/chicken-core/tests/../chicken 'linking-tests.scm' -output-file 'linking-tests.c' -feature chicken-compile-static -verbose -include-path /export/home/vagrant/chicken-core/tests/.. -uses reverser
==> solaris-solaris-10-i386: 'gcc' 'linking-tests.c' -o 'linking-tests.o' -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I/export/home/vagrant/chicken-core/tests/.. -I/export/home/vagrant/chicken-core/tests/../include/chicken/
==> solaris-solaris-10-i386: rm linking-tests.c
==> solaris-solaris-10-i386: 'gcc' 'linking-tests.o' 'reverser.o' -o 'linking-tests' -L/export/home/vagrant/chicken-core/tests/.. -L/export/home/vagrant/chicken-core/tests/../lib/  -Wl,-R'/export/home/vagrant/chicken-core/lib/' -static -lchicken -lsocket -lnsl -lm -ldl -lrt
==> solaris-solaris-10-i386: ld: fatal: library -lsocket: not found
==> solaris-solaris-10-i386: ld: fatal: library -lnsl: not found
==> solaris-solaris-10-i386: ld: fatal: library -lm: not found
==> solaris-solaris-10-i386: ld: fatal: library -ldl: not found
==> solaris-solaris-10-i386: ld: fatal: library -lrt: not found
==> solaris-solaris-10-i386: ld: fatal: library -lc: not found
==> solaris-solaris-10-i386: ld: fatal: file processing errors. No output written to linking-tests
==> solaris-solaris-10-i386: Error: shell command terminated with non-zero exit status 256: 'gcc' 'linking-tests.o' 'reverser.o' -o 'linking-tests' -L/export/home/vagrant/chicken-core/tests/.. -L/export/home/vagrant/chicken-core/tests/../lib/  -Wl,-R'/export/home/vagrant/chicken-core/lib/' -static -lchicken -lsocket -lnsl -lm -ldl -lrt
}}}

Test output on Solaris 11:

{{{
==> solaris-solaris-11-i386: ======================================== linking tests ...
==> solaris-solaris-11-i386: [... snip ...]
==> solaris-solaris-11-i386: /export/home/vagrant/chicken-core/tests/../chicken 'linking-tests.scm' -output-file 'linking-tests.c' -feature chicken-compile-static -verbose -include-path /export/home/vagrant/chicken-core/tests/.. -uses reverser
==> solaris-solaris-11-i386: 'gcc' 'linking-tests.c' -o 'linking-tests.o' -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I/export/home/vagrant/chicken-core/tests/.. -I/export/home/vagrant/chicken-core/tests/../include/chicken/
==> solaris-solaris-11-i386: rm linking-tests.c
==> solaris-solaris-11-i386: 'gcc' 'linking-tests.o' 'reverser.o' -o 'linking-tests' -L/export/home/vagrant/chicken-core/tests/.. -L/export/home/vagrant/chicken-core/tests/../lib/  -Wl,-R'/export/home/vagrant/chicken-core/lib/' -static -lchicken -lsocket -lnsl -lm -ldl -lrt
==> solaris-solaris-11-i386: ld: fatal: option '-R/export/home/vagrant/chicken-core/lib/' is incompatible with building a static executable
==> solaris-solaris-11-i386: 
==> solaris-solaris-11-i386: Error: shell command terminated with non-zero exit status 256: 'gcc' 'linking-tests.o' 'reverser.o' -o 'linking-tests' -L/export/home/vagrant/chicken-core/tests/.. -L/export/home/vagrant/chicken-core/tests/../lib/  -Wl,-R'/export/home/vagrant/chicken-core/lib/' -static -lchicken -lsocket -lnsl -lm -ldl -lrt
}}}"	evhan
Milestone someday	1353	posix-semaphore egg won't build on OS X: uses deprecated API	easy	extensions	4.12.0	defect	dleslie	assigned	2017-03-14T00:45:58+01:00	2017-08-25T14:59:37+02:00	"Building the posix-semaphore egg fails on OS X, as it uses a deprecated API; see the log below.

This is on OS X 10.11.6, with its associated version of clang (Apple LLVM version 8.0.0 (clang-800.0.42.1)).

It appears to be only the support for unnamed semaphores (which are apparently optional in POSIX) that's deprecated; the support for named ones seems to be present.

There's a StackOverflow discussion about the deprecation at (1) below, which points to some fairly authoritative discussion, including why the deprecation exists, at (2).

(1) http://stackoverflow.com/questions/27736618/why-are-sem-init-sem-getvalue-sem-destroy-deprecated-on-mac-os-x-and-w
(2) https://lists.apple.com/archives/darwin-kernel/2009/Apr/msg00010.html

{{{
% chicken-install posix-semaphore
retrieving ...
connecting to host ""chicken.kitten-technologies.co.uk"", port 80 ...
requesting ""/henrietta.cgi?name=posix-semaphore&mode=default"" ...
reading response ...
HTTP/1.1 200 OK
Date: Mon, 13 Mar 2017 23:30:47 GMT
Server: Apache/2.2.31 (Unix) DAV/2 PHP/5.5.36 mod_fastcgi/2.4.6
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
reading chunks .
reading files ...
  ./readme.md
  ./LICENSE
  ./posix-semaphore.release-info
  ./posix-semaphore.meta
  ./posix-semaphore.setup
  ./posix-semaphore.scm
  ./test.scm
 posix-semaphore located at /var/folders/7b/1fldmb290mzbgxppkpwwffx40000gn/T/temp3c46.40550/posix-semaphore
checking platform for `posix-semaphore' ...
checking dependencies for `posix-semaphore' ...
install order:
(""posix-semaphore"")
installing posix-semaphore:0.5.1 ...
changing current directory to /var/folders/7b/1fldmb290mzbgxppkpwwffx40000gn/T/temp3c46.40550/posix-semaphore
  '/Data/tools/chicken-4.12/bin/csi' -bnq -setup-mode -e ""(require-library setup-api)"" -e ""(import setup-api)"" -e ""(setup-error-handling)"" -e ""(extension-name-and-version '(\""posix-semaphore\"" \""0.5.1\""))"" 'posix-semaphore.setup'
  '/Data/tools/chicken-4.12/bin/csc' -feature compiling-extension -setup-mode    -O3 -C -O3 -lpthread -s -d1 -j posix-semaphore posix-semaphore.scm
posix-semaphore.c:63:11: warning: 'sem_getvalue' is deprecated [-Wdeprecated-declarations]
int err = sem_getvalue(sem, &val);
          ^
/usr/include/sys/semaphore.h:54:5: note: 'sem_getvalue' has been explicitly marked
      deprecated here
int sem_getvalue(sem_t * __restrict, int * __restrict) __deprecated;
    ^
posix-semaphore.c:92:1: warning: implicit declaration of function 'clock_gettime' is
      invalid in C99 [-Wimplicit-function-declaration]
clock_gettime(CLOCK_REALTIME, &tm);
^
posix-semaphore.c:92:15: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &tm);
              ^
posix-semaphore.c:95:7: warning: implicit declaration of function 'sem_timedwait' is
      invalid in C99 [-Wimplicit-function-declaration]
CHECK(sem_timedwait(sem, &tm))
      ^
posix-semaphore.c:180:7: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
CHECK(sem_destroy(sem))
      ^
/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly marked
      deprecated here
int sem_destroy(sem_t *) __deprecated;
    ^
posix-semaphore.c:192:7: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
CHECK(sem_init(sem, shared, value))
      ^
/usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly marked deprecated
      here
int sem_init(sem_t *, int, unsigned int) __deprecated;
    ^
5 warnings and 1 error generated.

Error: shell command terminated with non-zero exit status 256: '/Applications/Xcode.app/Contents/Developer/usr/bin/gcc' 'posix-semaphore.c' -o 'posix-semaphore.o' -c  -fno-strict-aliasing -fwrapv -fno-common -DHAVE_CHICKEN_CONFIG_H -m64 -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -O3 -I/Data/tools/chicken-4.12/include/chicken

Error: shell command failed with nonzero exit status 256:

  '/Data/tools/chicken-4.12/bin/csc' -feature compiling-extension -setup-mode    -O3 -C -O3 -lpthread -s -d1 -j posix-semaphore posix-semaphore.scm


Error: shell command terminated with nonzero exit code
17920
""'/Data/tools/chicken-4.12/bin/csi' -bnq -setup-mode -e \""(require-library setup...
}}}"	Norman Gray
Milestone someday	1372	mailbox timeouts and thread signaling		extensions	4.12.0	defect	Kon Lovett	assigned	2017-05-23T11:31:33+02:00	2017-08-25T16:56:34+02:00	"There appears to be a scheduler problem in the mailbox egg. If I signal a thread waiting on mailbox-receive! with a timeout, the program hangs and csi eats all my cpu.

{{{#!scheme
(use srfi-18 mailbox)

(define mbox (make-mailbox))
(define primordial (current-thread))

(define t (thread-start! (lambda ()
                           (thread-sleep! 1)
                           (thread-signal! primordial 'example))))

;; this hangs forever and eats all my cycles (with timeout)
(print (mailbox-receive! mbox 4))

;; this exits as expected with the 'example exception (no timeout)
(print (mailbox-receive! mbox))
}}}"	Caolan McMahon
Milestone someday	1399	Scrutinizer produces incorrect procedure types after merge	medium	scrutinizer	4.12.0	defect	evhan	reopened	2017-09-09T10:00:20+02:00	2023-11-06T22:05:01+01:00	"Suppose we get this expression after scrutinizing some code:

{{{
(or (procedure (|#!rest|) noreturn)
    (procedure (* |#!rest|) . *))
}}}

At the moment the result of the union is `(procedure (#!rest))` which is clearly wrong because it has arity N >= 0 while the second procedure in the `or` expression has arity N >= 1. Moreover the return type is lost, I'd expect the `noreturn` to be dropped and `*` to be used instead.

The result of the miscalculation of the resulting type may or may not be dangerous."	LemonBoy
Milestone someday	1404	aima: Error: (match) during expansion of (make-debug-environment ...) - no matching pattern		extensions	4.12.0	defect	Peter Danenberg	new	2017-09-12T18:52:08+02:00	2017-09-12T18:52:08+02:00	See https://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2017/09/12/salmonella-report/install/aima.html	Mario Domenech Goulart
Milestone someday	1411	ssql-record (tests): Error: unbound variable: test-table-rec-update (and other failures/errors)		extensions	4.12.0	defect	arthurmaciel	new	2017-09-12T19:39:20+02:00	2017-09-12T19:39:20+02:00	See https://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2017/09/12/salmonella-report/test/ssql-record.html	Mario Domenech Goulart
Milestone someday	1412	msgpack (tests): Error: segmentation violation		extensions	4.12.0	defect	hugoarregui	new	2017-09-12T19:42:07+02:00	2017-09-12T19:42:07+02:00	See https://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2017/09/12/salmonella-report/test/msgpack.html	Mario Domenech Goulart
Milestone someday	1416	chunk-vector: many unbound identifiers		extensions	4.12.0	defect	pluizer	new	2017-09-16T08:40:00+02:00	2017-09-16T08:40:00+02:00	See https://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2017/09/15/salmonella-report/install/chunk-vector.html	Mario Domenech Goulart
Milestone someday	1450	TCP connections can cause process to hang	hard	core libraries	4.13.0	defect		new	2018-03-19T08:42:09+01:00	2023-11-06T22:11:22+01:00	"As reported by Jim Ursetto, his Spiffy server (which is running on localhost behind a NGINX proxy) will stop responding at some point. It is currently not 100% clear when exactly this happens.

As Jim says:

> I believe I’ve tracked down the problem, although not the solution yet. It seems the file descriptor table is filled up with half open sockets. lsof shows:                                                                                                                    
>                                                            
> …
> chickadee 13361 jim 1019u sock 0,7 0t0 2365037 can't identify protocol
> chickadee 13361 jim 1020u sock 0,7 0t0 2366414 can't identify protocol
> chickadee 13361 jim 1021u sock 0,7 0t0 2368047 can't identify protocol
> chickadee 13361 jim 1022u sock 0,7 0t0 2368343 can't identify protocol
>
> And this message on Linux seems to occur when sockets are half-open (or half-closed, if you are a pessimist).

And later:

> my hunch is that this happens when the connecting side hangs up while we are still sending. Which is probably obvious from my previous description of the problem. I was going to start attacking it by inserting strategic sleeps at various locations to try and manually trigger it, although you probably have a better way. Obviously you do appear to catch all errors in spiffy, so I’m not sure if one of those error handlers is neglecting to close a socket, if the socket close fails and isn’t reported, or if this is a deeper bug inside the tcp unit.

I hear faint echoes of #340..."	sjamaan
Milestone someday	1453	Running MinGW-produced Chicken from a MSVC-produced executable causes a stack overflow during initialization		unknown	4.13.0	defect		new	2018-04-18T17:43:14+02:00	2018-04-23T15:32:31+02:00	"I am on Windows. I have a program, compiled via MSVC, that has a dependency on libchicken.dll, compiled via MinGW, both 64 bit. It successfully calls CHICKEN_run with the default toplevel, but during the loading of the modules, the program segfaults with a stack overflow error in various places, usually around the time it hits loading modules.scm.

It seems that Chicken underestimates the size of the stack when ran in this manner, causing it to run out of stack space much sooner than it anticipates, causing the segfault when it fails to resize the stack.

Attached is a set of files that can replicate the issue. Running make should produce call_from_cl.exe, which will segfault when run. The libchicken.dll it needs should be produced via the mingw-msys platform. You'll need MSVC's cl.exe and lib.exe installed to compile."	jrobbins
Milestone someday	1454	process-wait does not function corrently with nohang on Windows	trivial	core libraries	4.13.0	defect		new	2018-04-23T15:23:30+02:00	2018-04-23T15:23:30+02:00	On Windows, if you specify #t to nohang when calling process-wait, and the process is still running, you will get an error with a bogus error message. This is because process-wait uses WaitForSingleObject on Windows, and the result code WAIT_TIMEOUT is not handled, being treated as an error even though there was never an error in the first place. Attached is a patch to fix this bug.	jrobbins
Milestone someday	1465	get-keyword fails to operate correctly if keywords in first and second arguments come from different environments	trivial	core libraries	4.13.0	defect		new	2018-05-23T20:08:24+02:00	2018-05-23T20:08:24+02:00	"Run the following code in csi, and you'll get a failed assertion:

{{{
(define-syntax keyword-from-syntax (syntax-rules () ((_) #:k)))
(assert (get-keyword (keyword-from-syntax) '(h i j #:k l)))
}}}

This should return {{{l}}}, but instead it returns {{{#f}}}. The bug occurs when a keywords from different environments are compared; the {{{#:k}}} from the syntax-rules is not being treated as equal to the {{{#:k}}} from the normal code for some reason.

A working replacement (and the replacement I use in my code) could be as follows:

{{{
(define (get-keyword kw args . default)
  (let (
    (tail (memq kw args))
  )
    (if (and tail (not (null? (cdr tail))))
      (cadr tail)
      (if (null? default)
        #f
        ((car default))
      )
    )
  )
)
}}}"	jrobbins
Milestone someday	1475	(scrutinizer) Types for global variables are not refined by predicates	easy	scrutinizer	5.0.0	defect		new	2018-06-15T09:08:36+02:00	2023-11-06T22:12:45+01:00	"{{{
(: g1 (list-of fixnum))
(define g1 '())
;; Aliased global gets refined
(let ((a g1))
  (compiler-typecase a ((list-of fixnum) 1))
  (if (null? a)
      (compiler-typecase a (null 1))
      (compiler-typecase a ((not null) 1))))

(: g2 (list-of fixnum))
(define g2 '())
(if (null? g2)
    (compiler-typecase g2 (null 1)) ;; <- error
    (compiler-typecase g2 ((pair fixnum (list-of fixnum)) 1)))

;; $ csc -O3 globals.scm
;; 
;; Error: at toplevel:
;;   (globals.scm:13) no clause applies in `compiler-typecase' for expression of type `(list-of fixnum)':
;;     null
}}}

I don't think this is an issue of non-local mutation (e.g. from other threads). You should use mutexes or some other measures to prevent mutation while, you're working on a global."	megane
Milestone someday	1496	zlib: checksum mismatch in tests starting on 2018-08-05		extensions	4.13.0	defect	joseph.gay	new	2018-08-06T08:14:48+02:00	2021-04-01T19:44:17+02:00	"See http://salmonella-linux-x86.call-cc.org/chicken-4-debugbuild/gcc/linux/x86/2018/08/05/salmonella-report/test/zlib.html

That happened with CHICKEN at 5f2c3ae6.  The day before this error didn't occur and CHICKEN was at d32b83d5."	Mario Domenech Goulart
Milestone someday	1503	Fix dev-snapshot script		infrastructure	5.0.0	defect	Mario Domenech Goulart	new	2018-08-11T11:19:00+02:00	2018-08-11T11:19:00+02:00	Peter reported it is broken.	Mario Domenech Goulart
Milestone someday	1513	Type declarations in modules do not namespace structs	easy	core libraries	5.0.0	defect		assigned	2018-08-20T21:49:00+02:00	2023-11-06T22:05:49+01:00	"As reported by Jörg Wittenberger, the following program gives a compilation warning in CHICKEN 5 but not in CHICKEN 4:

{{{
(module
 foo
 *
 (import scheme)
 (cond-expand
  (chicken-5
   (import
   (chicken base)
   (chicken type)
   ))
  (else (import chicken)))
 (: make-foo (string --> (struct foo)))
 (define-record foo bar)
 )
}}}

Presumably this is because the low-level name of the struct is `foo#foo` here (because we're inside a module).  I think the correct fix for this would be to look at struct identifiers, and when unqualified, just prefix it."	sjamaan
Milestone someday	1519	salt: test failure: can't read MLB path map file		extensions	5.0.0	defect	Ivan Raikov	new	2018-08-21T21:31:55+02:00	2018-08-22T19:16:39+02:00	See http://salmonella-linux-arm64.call-cc.org/master-debugbuild/gcc/linux/arm64/2018/08/21/salmonella-report/test/salt.html	Mario Domenech Goulart
Milestone someday	1524	environments 1.6.2 breaks the installation of eggs which depend on it		extensions	4.13.0	defect		new	2018-08-25T10:09:34+02:00	2018-08-25T10:16:47+02:00	"Attempting to install environments with recent CHICKENs break with

{{{
Error: Sorry, but CHICKEN 4.7.4 and later is not supported anymore
}}}

This [https://salmonella-linux-x86-64.call-cc.org/chicken-4-debugbuild/gcc/linux/x86-64/2018/08/24/salmonella-report/rev-dep-graphs/environments.html breaks the installation of eggs which depend on environments]:

* http://salmonella-linux-x86.call-cc.org/chicken-4-debugbuild/gcc/linux/x86/2018/08/24/salmonella-report/install/uri-dispatch.html

* http://salmonella-linux-x86.call-cc.org/chicken-4-debugbuild/gcc/linux/x86/2018/08/24/salmonella-report/install/couchdb-view-server.html

I don't know if these eggs actually hard-depend on environments to work.  In case they do, I think they should be moved to the ""obsolete"" category as well."	Mario Domenech Goulart
Milestone someday	1527	Procedures grouping in the wiki is confusing	easy	wiki		defect		new	2018-08-31T23:31:45+02:00	2018-09-01T20:59:22+02:00	"Compared to the source file of the documentation, or to chickadee, the wiki is very confusing when showing grouping of multiple procedures.

It groups procedures even when they are separated by a new line in the source, which looks like these procedures are linked together even when they are not.

As an example, look at the ncurses egg documentation, more precisely at the halfdelay procedure.

https://wiki.call-cc.org/eggref/4/ncurses
https://api.call-cc.org/doc/ncurses

In the wiki, it’s grouped with has_colors, has_ic and has_il, and everything is documented to return a boolean value.

In chickadee, halfdelay is by itself, and only has_colors, has_ic and has_il are grouped together with their documentation entry.
"	Kooda
Milestone someday	1561	Rewrite .egg file before installation	medium	extensions	5.0.0	defect		new	2018-11-20T11:20:10+01:00	2018-11-20T11:20:10+01:00	"This was suggested by Kooda: install the expanded egg file in the extension repository, after all `cond-expand` forms have been processed. This reflects the configuration that was used during installation (respecting `-f` options to `chicken-install`) and does not require re-processing conditionals.
"	felix winkelmann
Milestone someday	1566	ports-tests are not testing file-lock procedures	trivial	core libraries	5.0.0	defect	Christian Kellermann	new	2018-11-30T22:46:38+01:00	2023-11-08T21:17:24+01:00	Our ports-tests script does call file-lock and friends but only to test whether they raise an exception on already closed ports. There is no test whether these procedures actually do anything. That's why #1565 has gone unnoticed.	Christian Kellermann
Milestone someday	1571	Sources for blowfish egg no longer available in bitbucket		extensions	4.13.0	defect	rivo	new	2018-12-22T18:09:36+01:00	2018-12-22T18:09:36+01:00	"We've been seeing the following error from henrietta-cache:

{{{
Could not fetch release-info file for egg blowfish (CHICKEN
release 4) from https://bitbucket.org/rivo/blowfish-egg/raw/tip/blowfish.release-info
-- list-terminator mismatch
}}}

The error happens because https://bitbucket.org/rivo/blowfish-egg/raw/tip/blowfish.release-info redirects to a login page.

Apparently, blowfish is not available in bitbucket anymore.  Where can we find it?"	Mario Domenech Goulart
Milestone someday	1574	Redefining reverse in csi makes lambda behave differently, and even segfault	hard	compiler	5.0.0	defect		new	2018-12-30T15:25:58+01:00	2018-12-30T15:25:58+01:00	"Running this in csi triggers a segfault in ##sys#decompose-lambda-list (eval.scm), even though reverse is bound in a let.

{{{
(define reverse 1)
(lambda (foo . bar) bar)
}}}"	Kooda
Milestone someday	1596	"envsubst: test failure: Error: (include) cannot open file: ""tests/call-with-environment-variables.scm"""	trivial	extensions	5.0.0	defect	Robert C Jensen	assigned	2019-03-22T18:37:31+01:00	2021-08-29T21:08:04+02:00	See http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2019/03/22/salmonella-report/test/envsubst.html	Mario Domenech Goulart
Milestone someday	1597	dbus 0.96: installation failure	trivial	extensions	4.13.0	defect	Shawn Rutledge	new	2019-03-22T20:17:54+01:00	2019-03-22T20:17:54+01:00	"See https://salmonella-linux-x86-64.call-cc.org/chicken-4-debugbuild/gcc/linux/x86-64/2019/02/23/salmonella-report/install/dbus.html

Note that this is for CHICKEN 4."	Mario Domenech Goulart
Milestone someday	1599	"spock: failure in tests: Error: library not found: ""syntax.scm"""		extensions	5.0.0	defect	Mario Domenech Goulart	assigned	2019-03-28T22:34:04+01:00	2019-03-29T19:07:28+01:00	See http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2019/03/28/salmonella-report/test/spock.html	Mario Domenech Goulart
Milestone someday	1607	zlib: failure in tests	hard	extensions	5.0.0	defect	Robert C Jensen	new	2019-04-13T16:18:10+02:00	2021-07-01T02:37:39+02:00	See http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2019/04/13/salmonella-report/test/zlib.html	Mario Domenech Goulart
Milestone someday	1615	hidden/gensymed variables are registered for export	easy	expander	5.0.0	defect	sjamaan	new	2019-05-07T20:54:17+02:00	2023-11-14T18:51:09+01:00	"This might cause problems if an interned symbol with the same name is defined. Find out if this really is a problem.

Also: alias global hook strikes again ;)

Example:

{{{
(module foo (x123)

(import scheme (chicken syntax))

(define-syntax define-x123
  (ir-macro-transformer
     (lambda (e i c)
       (let ((name (gensym 'x)))
         `(define ,name 'blah))))

(define x123 5)

(define-x123) ;; Should not overwrite the interned version of x123, which happens if both collide on foo#x123!
)

(import foo)
(print x123) ;; Should print 5, not blah
}}}

Of course this requires some fiddling to get the numbers right, which would differ per CHICKEN version (a proper test would require reading the gensym counter to force the collision, or something like that)."	sjamaan
Milestone someday	1632	atom: failure in tests		extensions	5.1.0	defect	Jim Ursetto	new	2019-07-13T09:15:14+02:00	2019-07-13T09:15:14+02:00	See https://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2019/07/13/salmonella-report/test/atom.html	Mario Domenech Goulart
Milestone someday	1685	shell-variable in egg-compile should quote environment variables		core libraries	5.2.0	defect	evhan	assigned	2020-03-09T20:43:47+01:00	2023-11-06T22:08:50+01:00	"Without quoting shell variables, install scripts end up with commands like

{{{
mkdir -p ${DESTDIR}'/home/mario/local/chicken-head/lib/chicken/11'
}}}

If {{{DESTDIR}}}} happens to contain a space, the command above will not do what it is expected to do.

Double-quoting shell variables on Unix systems is not harmful, as far as I can tell.  I have no clue about Windows.

At the moment, {{{shell-variable}}} seems to be only applied to {{{DESTDIR}}}.

The following patch would improve the situation on Unix:

{{{
diff --git a/egg-compile.scm b/egg-compile.scm
index 4a72d5d0..e6be5d1d 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -1227,7 +1227,7 @@ EOF

 (define (shell-variable var platform)
   (case platform
-    ((unix) (string-append ""${"" var ""}""))
+    ((unix) (string-append ""\""${"" var ""}\""""))
     ((windows) (string-append ""%"" var ""%""))))

 ;; NOTE `cmd' must already be quoted for shell
}}}"	Mario Domenech Goulart
Milestone someday	1696	mutex-lock! doesn't always lock mutex	insane	unknown	5.2.0	defect		new	2020-04-18T14:24:09+02:00	2020-04-18T14:30:06+02:00	"{{{
;; From C4 tests/mutex-test.scm
(import scheme)
(cond-expand
 (chicken-5 (import (chicken base)
		    (chicken type)
		    (chicken format)
		    srfi-18))
 (else (import chicken) (use srfi-18)))

(define-record-printer (mutex x out)
  (format out ""<mutex ~a ~a~a ~a (owner ~a) waiting ~a>""
	  (mutex-name x)
	  (if (##sys#slot x 5) ""LOCKED"" ""FREE"")
	  (if (##sys#slot x 4) ""/ABANDONED"" """")
	  (mutex-state x)
	  (if (##sys#slot x 2) (##sys#slot x 2) ""none"")
	  (##sys#slot x 3)
	  ))

(let ((m1 (make-mutex)))
  ;; (print m1)
  (mutex-lock! m1)
  (print m1)
  (print* ""l"")
  ;; (thread-sleep! 0.001)
  (let ((t1 (thread-start! (lambda ()
			     (print* ""t"")
			     (mutex-lock! m1 0.001)
			     (print ""\noh no, we got the mutex"")
			     (print m1)
			     (exit 1)))))
    (print* ""y"")
    (thread-yield!)
    (print* ""Y"")
    (when (eq? 'ready (##sys#slot t1 3)) ;; <- #3 thread state
      (print* ""X"")
      (thread-sleep! 1)
      (print* ""Z""))))

(print* ""."")

;; OK run:
;; lytY.<mutex mutex0 LOCKED #<thread: primordial> (owner #<thread: primordial>) waiting ()>

;; Failing run:
;; lytYX
;; oh no, we got the mutex
;; <mutex mutex0 LOCKED #<thread: primordial> (owner #<thread: primordial>) waiting ()>

}}}"	megane
Milestone someday	1714	types.db not found on mingw32		unknown	5.2.0	defect		new	2020-08-08T15:35:38+02:00	2020-12-13T15:46:43+01:00	"Hi,

On my build (Windows, with an old mingw32) `types.db` is not found anymore.


{{{
D:\tmp\chicken\'types.db' not found>type str.scm
(display ""Sunday"")
(newline)
D:\tmp\chicken\'types.db' not found>chicken str.scm -output-file ""str.c""

Error: default type-database `types.db' not found
}}}


Chicken is installed in ""C:\Program Files (x86)\Chicken Scheme"", and types.db is in ""c:\Program Files (x86)\Chicken Scheme\lib\chicken\11\""
. Where does csc look for `types.db`?"	Răzvan Rotaru
Milestone someday	1716	coops + s11n malfunction		extensions	5.1.0	defect		new	2020-08-19T21:38:08+02:00	2020-08-24T16:20:38+02:00	"{{{
#!scheme
(define-class frotz () ((name accessor: name)))
(define xyzzy (make frotz 'name ""blue jeans""))
(name xyzzy)
(with-output-to-file ""/tmp/frotz"" (lambda () (serialize xyzzy)))
(define nitfol (with-input-from-file ""/tmp/frotz"" deserialize))
nitfol ; <= evals to  #<coops instance of `frotz'>
(name nitfol); <= fails with Error: (name) no method defined for given argument classes: (#<coops instance of `<standard-class>'>)
}}}

This used to work and print ""blue jeans"" but I'm not sure when it stopped working. I especially hope I can rescue all my other saved objects because I have a lot of precious in there♥"	Idiomdrottning
Milestone someday	1728	chicken-install postgresql fails on Windows		unknown	5.2.0	defect		new	2021-01-29T05:07:50+01:00	2021-05-18T17:24:21+02:00	"{{{
c:\>chicken-install postgresql
building postgresql
   C:\Users\j\AppData\Local\chicken-install\postgresql\build-postgresql.bat -host -D compiling-extension -J -s -regenerate-import-libraries -setup-mode -I C:\Users\j\AppData\Local\chicken-install\postgresql -C -IC:\Users\j\AppData\Local\chicken-install\postgresql -O2 -d1 postgresql.scm -o C:\Users\j\AppData\Local\chicken-install\postgresql\postgresql.so
creating subprocess failed

Error: shell command terminated with nonzero exit code
1
""C:\\Users\\j\\AppData\\Local\\chicken-install\\postgresql\\postgresql.build.bat""

c:\>
}}}
"	Josh Helzer
Milestone someday	1729	[fmt egg]: Num fails with numbers near 0		extensions	5.2.0	defect	foof	assigned	2021-03-01T15:59:51+01:00	2021-03-01T15:59:51+01:00	"{{{
$ csi5 -P '(import fmt) (fmt #f (num (/ 1.0 1e300) 10 2))'

;; Error: (quotient) bad argument type - not an integer: +inf.0
}}}"	megane
Milestone someday	1745	apropos doesn't report macros	medium	extensions	5.2.0	defect	Kon Lovett	assigned	2021-04-12T05:25:27+02:00	2021-04-21T00:06:26+02:00		Kon Lovett
Milestone someday	1759	Module system weirdness		unknown	5.2.0	defect		new	2021-06-01T18:18:40+02:00	2021-06-01T18:18:40+02:00	"So the trippy thing is that if I start a fresh REPL and

 (import brev-separate)

without importing matchable nor import-for-syntax anything,
{{define-ir-syntax*}} works.

When I try to do that inside a module, it doesn't work.

{{define-ir-syntax*}} is a macro that makes macros, using matchable to do so.

OK, so let me try something else:

When I make a file not in a module but just something.scm and in that file only put:

 (import brev-separate)
 (define-ir-syntax* (jolly) '(print ""This is jolly good""))
 (jolly)

and then csc it and run it, it works.

But inside of a module it does not work. I need {{(import-for-syntax matchable)}}.

This behavior, I don't know if it's a bug or not but it was
unintuitive enough to send me on an 8 hour rabbit hole trek.

Which is fine. I was embarrassed in the IRC channel but I'm glad everyone was cool.

I wish I understood the module system better. I feel like I'm just
klutzing around, testing out what works and doesn't work.

"	Idiomdrottning
Milestone someday	1784	Modify chickadee to say what module an identifier is in	easy	documentation	5.2.0	defect		new	2021-09-10T20:59:48+02:00	2021-09-10T23:00:05+02:00	Right now, if you want to call `features`, you have to know or guess which module to load.  Changing chickadee to provide that information will help a great deal.  (Looking through all the individual module pages works, but ugh.)	johnwcowan
Milestone someday	1792	Some eggs install into system /share and /bin (even when CHICKEN_INSTALL_REPOSITORY is set); this fails when the directory is RO		unknown	5.2.0	defect		new	2021-10-14T17:58:15+02:00	2021-10-14T23:20:15+02:00	"I'm using Nixpkgs (hence the paths below), but the same would be true in another case when the system /share is for whatever reason not expected to be writable by chicken-install.

Since .../share is expected to be read-only in this context, I've defined a separate repository for eggs to be installed in:

    CHICKEN_REPOSITORY_PATH=$HOME/.chicken-install:/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/lib/chicken/11
    CHICKEN_INSTALL_REPOSITORY=$HOME/.chicken-install
    CHICKEN_INCLUDE_PATH=/nix/store/na72pj8gy1gyqd0llz6myvk8dzd4q5i0-compiler-rt-libc-7.1.0/share:/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share

That works OK for several eggs, but srfi-29 fails:
{{{
      installing srfi-29
    mkdir: cannot create directory ‘/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken/srfi-29-bundles’: Permission denied
}}}
and sure enough, $HOME/.cache/chicken-install/srfi-29/srfi-29.install.sh includes
{{{
    mkdir -p ${DESTDIR}'/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken'
    mkdir -p ${DESTDIR}'/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken/srfi-29-bundles'
    install -m 644 '/Users/norman/.cache/chicken-install/srfi-29/srfi-29-bundles/srfi-29' ${DESTDIR}'/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken/srfi-29-bundles'
}}}
That is, it seems to unconditionally want to install in the system share directory.

The same is true of some other eggs (I'm not sure this is an exhaustive list: Kon Lovett on-list suggested that these, like srfi-29, specify a 'data files’ component to the extension, which chicken-install places in '(chicken-home)’):

sqlite3: tried to install stuff into system /share

spock and manual-labor: tried to install stuff into system /bin and /share

In case anyone isn't aware NixOS, and Nixpkgs as a package system for other OSs, is predicated on the idea that the system directories are owned entirely by the Nix system, so that .../share/FOO is out of bounds.  I'm using Nixpkgs 2.3.16 on macOS 11.6, though I don't think either of those versions is relevant to the issue).
"	Norman Gray
Milestone someday	1808	Srfi-42 index keyword hygiene		extensions	5.2.0	defect		new	2022-07-29T21:04:10+02:00	2022-07-30T00:48:29+02:00	"Found by Chris (so ignore this duplicate if he already got to posting it):

{{{
(import sequences srfi-42)
(do-ec (:vector elt (index i) '#(a b c))
 (print i elt))
}}}

(Because of the collision with `index`.)"	Idiomdrottning
Milestone someday	1810	ezd man page not installed		unknown	5.3.0	defect		new	2022-08-23T13:57:26+02:00	2022-08-23T13:57:26+02:00	The ezd.1 man page is in the doc directory of the ezd egg, but it is discarded along with the rest of the cached files when the build is complete.  It should be copied into /usr/local/share/man/man1 (or the local equivalent), as it is the only good documentation of the whole ezd command set.	johnwcowan
Milestone someday	1815	(chicken irregex): Use condition kinds		core libraries	5.3.0	defect		new	2023-02-10T19:59:18+01:00	2023-02-10T19:59:18+01:00	The (chicken irregex) module should raise conditions with kinds. It's hard to handle exceptions automatically without them. For example, 'irregex' raises an exception when called with a syntactically-invalid regular expression or with an object of the wrong type (say, a vector). The only way to tell which of these problems occurred is through a nasty kluge: examining the condition's message. It should instead raise a condition with kind '(exn type)' for the type error (like the rest of CHICKEN's core forms) and with kind '(exn irregex)' (e.g.) for the regular expression syntax error.	Zipheir
Milestone someday	1818	Exporting a macro inhibits compiled program from locating libraries		compiler	5.3.0	defect		new	2023-03-30T16:22:01+02:00	2023-11-08T23:04:37+01:00	"The bug I found makes the compiled program unable to locate libraries
based on the environment variables `CHICKEN_INCLUDE_PATH` and
`CHICKEN_REPOSITORY_PATH`.

The bug is quite fiddly to reproduce so I've added a 7z archive that
contains the neccessary file structure and sets the environment
variables appropriately. To compile and run it execute the make.sh
script.

The program runs as expected as long as the 5. line (exporting the
macro) in the test.scm file is commented out, but fails to load the
testlib library if it's included.

What makes the bug so fiddly and likely the reason why it hasn't been
noticed so far is that everything works as expected as long as the
include *.import.scm files and the library *.so files are in the same
directory, as pointed by CHICKEN_REPOSITORY_PATH. This can be observed
by commenting out the 8. line in the make.sh script.

Therefore I hope it's a simple error in using a wrong variable to get
the search directory for the *.import.scm files.

Lastly, I've run it on Arch Linux updated as of 2023.03.30:

{{{#!sh
$ chicken-csc -version
CHICKEN
(c) 2008-2021, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.3.0 (rev e31bbee5)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
}}}
"	Filip Jagiełłowicz
Milestone someday	1829	CHICKEN nixos package is incorrectly configured	easy	build system	5.3.0	defect		new	2023-12-21T22:36:57+01:00	2023-12-21T22:36:57+01:00	"See https://github.com/NixOS/nixpkgs/issues/275901
"	felix winkelmann
Milestone someday	1832	Exported syntaxes are not fully hygienic	hard	compiler	5.3.0	defect		new	2024-02-22T21:44:24+01:00	2025-11-03T06:45:56+01:00	"Modules exporting syntaxes generated by syntaxes are not fully hygienic as the serialization into module-name.import.scm uses strip-syntax on module's sexports.

== Minimal (Working) Example

Attached as follows:

mwe-ok.scm - single file where the macros show expected behavior

mwe-ko-common.scm - module with the macro generating macros
mwe-ko-one.scm - first macro generated by the macro from common module
mwe-ko-two.scm - second macro generated by the macro from module ""one""
mw-ko-run.scm - should behave like mwe-ok.scm, shows binding collisions

== How to run

Reference (working) module:

{{{#!sh
csi -q -b mwe.ok.scm
}}}

Multiple modules with problems:

{{{#!sh
csc -P -J mwe-ko-common.scm
csc -P -J mwe-ko-one.scm
csc -P -J mwe-ko-two.scm
csi -q -b mwe-ko-run.scm
}}}
"	Dominik Joe Pantůček
Milestone someday	1835	Error in the utf8 egg's substring=?		extensions	5.4.0	defect	siiky	reopened	2024-04-12T00:10:31+02:00	2024-04-23T18:23:06+02:00	"First found it using tab-completion in {{{csi}}}:

{{{
Error: (substring=?) out of range
3
0
3

	Call history:

	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc
	utf8-srfi-13.scm:374: proc	  	<--
}}}

This is seen in the egg's tests as well: http://salmonella-linux-x86.call-cc.org/master/clang/linux/x86/2024/04/11/salmonella-report/test/utf8.html ({{{chicken-install}}}'s exit code is 0, I'm not seeing why -- there's a {{{test-begin}}} at the top and a {{{test-end}}} at the bottom -- though this is another problem):

{{{
(string-prefix? ""元麻布"" ""麻布十番"" 1) ........................ [ERROR]

Error: (substring=?) out of range
6
0
6
(string-prefix? ""元麻布"" ""麻"" 1 2) ............................... [ERROR]

Error: (substring=?) out of range
3
0
3
}}}

It's almost certain these errors are related to the recent changes made to {{{substring=?}}} and friends: https://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commit;h=0e97b648407d750f1e476e3c193e136126558346"	siiky
Milestone someday	1836	Chicken doesn't build out of the box on recent macosx	trivial	build system	5.3.0	defect		new	2024-06-07T12:29:40+02:00	2024-06-07T12:29:40+02:00	"A friend wanted to build Chicken 5.3.0 on his ""Mac OS 14"" mac, and complained that it looked in the wrong place for tools.

He had to override stuff to make it build:

{{{
make PLATFORM=macosx PREFIX=...redacted... C_COMPILER=/usr/bin/gcc  \
   LIBRARIAN=/usr/bin/ar POSTINSTALL_PROGRAM=/usr/bin/install_name_tool \
   install
}}}

He has the XCode cli tools installed but not the UI. The makefile was trying to find stuff under /Developer/... but it ain't there no more."	Alaric Snell-Pym
Milestone someday	1840	Chicken Scheme fails to build for xtensa		unknown	5.3.0	defect		new	2024-07-22T15:03:16+02:00	2024-07-22T15:03:16+02:00	"I'm trying to fix a problem detected by Buildroot's autobuilder, in which Chicken does not build for the xtensa architecture. Xtensa is not a supported architecture, but the patch to build there is very small and non-invasive. Please consider merging.

This bug was originally discovered under version 5.3.0, but I have tested this patch against 5.4.0 and it works.

a reference to the buildroot autobuild failure is here, for reference:
http://autobuild.buildroot.net/results/0428595153756ab37a7b8eb421b0d58c3b357b9b/
"	Woodrow E Douglass
Milestone someday	1842	Possibly inconsistent install/lookup behavior in the presence of CHICKEN_INSTALL_PREFIX		core libraries	5.4.0	defect		new	2024-08-26T18:30:43+02:00	2024-08-26T18:33:22+02:00	"The title is very poor and the description is going to be a paste of the discussion in #chicken.

Basically, the issue is highlighted by one of the tests of srfi-29

{{{
        -- testing Installed Test Bundle -------------------------------------
        (localized-template/default 'srfi-29 'srfi-29) ............... [ FAIL]
            expected ""SRFI 29"" but got srfi-29
}}}

Discussion in #chicken:

{{{
<mario-goulart> klovett: apparently srfi-29 is installing the srfi-29
                bundle via the `data' section in the .egg file.  That
                makes the bundle be installed under
                PREFIX/share/chicken when CHICKEN_INSTALL_PREFIX is
                *unset*.  When CHICKEN_INSTALL_PREFIX *is set* (that's
                what salmonella does), the srfi-29 bundle is installed
                under PREFIX/share (no chicken directory).
<mario-goulart> Then srfi-29 looks for bundles under include-path,
                which resolves to C_INSTALL_SHARE_HOME when
                CHICKEN_INCLUDE_PATH is *unset*.  In that case,
                PREFIX/share/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX). However
                when CHICKEN_INCLUDE_PATH *is set*, chicken-install
                installs the bundle under PREFIX/share, but in runtime
                it looks for bundles under include-path, which is the
                value of CHICKEN_INCLUDE_PATH, which is set by
                salmonella as PREFIX/share/chicken.
<Bunny351> hm...
<mario-goulart> Now I don't know if salmonella is setting
                CHICKEN_INCLUDE_PATH wrongly of if the default values
                given to override-prefix in egg-compile.scm is wrong.
<Bunny351> possible
<mario-goulart> The default values given to override-prefix definitely
                don't match the values of C_INSTALL_INCLUDE_HOME and
                C_INSTALL_SHARE_HOME.
<klovett> originally it only looked in (chicken-home)
<mario-goulart> I think that was the same as what now (include-path)
                is, if I'm not mistaken.
<klovett> well, one is a set
<mario-goulart> I _think_ (don't quote me on that) the root cause of
                the issue is the inconsistency between the values of
                C_INSTALL_INCLUDE_HOME/C_INSTALL_SHARE_HOME and the
                way that override-prefix assembles paths when when
                CHICKEN_INSTALL_PREFIX is set.
<klovett> is something is chicken.platform returning PREFIX/share? i
          can code the envvar test & subsequent path assumption but
          rather not.
<mario-goulart> That's part of the problem I'm implying.  You can get
                PREFIX/share *if* CHICKEN_INCLUDE_PATH is set to
                PREFIX/share.  If CHICKEN_INCLUDE_PATH is *not set*
                you'll get PREFIX/share/chicken (or, more accurately,
                PREFIX/share/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)).
<mario-goulart> This whole thing is very confusing.
<klovett> there is not a '(data-path)' so i will assume if
          CHICKEN_INSTALL_PREFIX is set then push ""...PREFIX/share""
          onto the search list
<mario-goulart> I think it would be better to wait a bit.  I _think_
                srfi-29 is probably doing the right thing.  The issue
                _might_ be in salmonella or in CHICKEN.
<klovett> ok
<klovett> looks like a job for chicken.platform#data-repository or similar
}}}
"	Mario Domenech Goulart
Milestone someday	1849	http-client: with-input-from-request fails when uri-or-request is an intarweb request	easy	extensions	5.3.0	defect		new	2025-01-20T10:56:22+01:00	2025-01-20T13:32:37+01:00	"{{{
(import (chicken io) (intarweb) (http-client))
(let ((req (make-request uri: ""https://google.com"")))
  (with-input-from-request req #f read-string))
}}}

{{{
Error: (call-with-input-request) The first argument must be either an uri-common object, an intarweb request object, or an URI string
#<intarweb#request>
#f
#<procedure (f6040 p10826038 r10836039)>

        Call history:

        <syntax>          (##core#begin (with-input-from-request req #f read-string))
        simple-req.scm:3          (with-input-from-request req #f read-string)
        simple-req.scm:2          (make-request #:uri ""https://google.com"")
        simple-req.scm:2          (make-request #:uri ""https://google.com"")
        simple-req.scm:3          (with-input-from-request req #f read-string)
        http-client.scm:903: call-with-input-request*     
        http-client.scm:803: uri-common#uri-reference?    
        http-client.scm:805: intarweb#request?    
        http-client.scm:805: intarweb#request-uri         
        http-client.scm:807: uri-common#uri?      
        http-client.scm:810: uri-common#uri-reference?    
        http-client.scm:808: http-client-error    
        http-client.scm:344: chicken.condition#make-property-condition    
        http-client.scm:345: chicken.condition#make-property-condition    
        http-client.scm:343: chicken.condition#make-composite-condition   
        http-client.scm:343: srfi-18#raise              <--
}}}


Here, we take the request-uri out of the intarweb request. That results in a string. Two lines below, we expect it to be an uri and we fail.

https://code.call-cc.org/cgi-bin/gitweb.cgi?p=eggs-5-latest.git;a=blob;f=http-client/1.2.2/http-client.scm;h=58d045d661cdae7924afe4983f24dfb822d49dc3;hb=HEAD#l805

"	Pietro Cerutti
Milestone someday	1855	Egg spec's version format is stricter than release-info's		unknown	5.4.0	defect		new	2025-08-14T14:52:45+02:00	2025-08-14T14:52:45+02:00	"= Problem =

`chicken-install` strictly validates the `version` property of egg specs (i.e. what goes into `.egg` files) [https://wiki.call-cc.org/man/5/Egg%20specification%20format#version according to the documented format]:


  Specifies version string for this egg. `STRING` should have the format `<MAJOR>.<MINOR>.<PATCHLEVEL>`, where only the `<MAJOR>` part is mandatory.

However, the same validation does not apply to eggs released through the central egg repository. Here, the version specified in the `.release-info` file is taken verbatim. This means it's not possible to install an egg from a local source directory when its version doesn't match the stricter egg spec format.

= Proposed solution =

Since there are already a lot of egg releases in existence which don't match the egg spec (e.g. `fmt` version `0.8.11.3`), enforcing the same strict format for `.release-info` appears too disruptive a change. Instead, we should make the egg spec's format less strict, effectively allowing any string as version.

= CHICKEN 6 = 

For C6, we could still consider enforcing the strict format everywhere.

= Reproduction = 


{{{
svn checkout https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/fmt/tags/0.8.11.3
cd 0.8.11.3
csi -e ""(write (cons '(version ""0.8.11.3"") (read)))"" < fmt.egg > fmt.egg.new
mv fmt.egg.new fmt.egg
chicken-install
}}}

Output:

{{{
Error: egg information item has invalid structure: (version 0.8.11.3)
}}}"	Moritz Heidkamp
Milestone someday	1859	Type information doesn't survive calls to define-inline procedures	medium	scrutinizer	6.0.0	defect		new	2025-08-20T08:48:57+02:00	2025-08-20T09:03:21+02:00	"Compile the following to C:

{{{#!scheme
(module foo ()
  (import scheme (chicken base) (chicken plist))

  (let ((x (gensym)))
    (put! 'foo x 1))

  (define-inline (put-one! sym prop)
    (put! sym prop 1))

  (let ((y (gensym)))
    (put-one! 'foo y)))
}}}

Note that the first call to put! gets rewritten to {{{C_a_i_putprop(&a,3,lf[1],t1,C_fix(1))}}}, but the second call remains a CPS call to {{{chicken.plist#put!}}} via procedure lookup.

This is unexpected, as inlining by hand should give the same results as calling a {{{define-inline}}} procedure.

If you restore the typing info by hand, it also works as expected:

{{{#!scheme
(define-inline (put-one! sym prop)
  (put! (the symbol sym) (the symbol prop) 1))
}}}"	sjamaan
Milestone someday	1861	[R7RS] Initial environment of a CHICKEN program should be empty	easy	unknown	5.4.0	defect		new	2025-11-29T00:14:41+01:00	2025-11-29T00:14:41+01:00	"R7RS (§5.1) requires that no identifiers be bound in the initial environment of a program.  Yet there seems to be no way to prevent CHICKEN from importing all of (chicken base) into a CHICKEN program.  According to the Report, `print` should be unbound in the following program:


{{{
(import (scheme base))

(print ""hello, world"")
}}}

csc 5.4.0 compiles this (and the resulting binary runs) without an error, since `print` is in `(chicken base)`, which is automatically imported.

Another result of this asymmetry is that the import qualifiers `only`, `prefix`, `rename`, etc. are effectively useless for `(chicken base)` and `(scheme)`.

R7RS is right, at least for CHICKEN in r7rs mode: any identifiers used but not defined by a program should be explicitly imported.

Addendum: The wiki.call-cc.org page for `(chicken base)` suggests that the `-explicit-use` compiler option can be used to avoid ""using"" the module, but Bunny351 says this option is unrelated to this issue."	zaifir
Milestone someday	1862	Chicken 5.4.0 doesn't build on Windows		unknown	5.4.0	defect		new	2025-12-22T20:29:12+01:00	2025-12-23T03:53:26+01:00	"I've been following this guide to get up and running with Chicken on Windows:

https://wiki.call-cc.org/msys2#installing-chicken-50-on-msys2

When trying to compile Chicken I get compiler errors:

{{{
gcc -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -c -Os  -DC_BUILDING_LIBCHICKEN posixwin.c -o posixwin-static.o -I. -I./
In file included from posixwin.c:9:
posixwin.c: In function 'f_4799':
posixwin.c:185:57: error: passing argument 2 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
  185 | #define C_u_i_execve(f,a,e) C_fix(execve(C_c_string(f), (const char *const *)C_c_pointer_ve, (const char *const *)C_c_pointer_vector_or_null(e)))
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         const char * const*
chicken.h:1046:56: note: in definition of macro 'C_fix'
 1046 | #define C_fix(n)                   ((C_word)((C_uword)(n) << C_FIXNUM_SHIFT) | C_FIXNUM_BIT)
      |                                                        ^
posixwin.c:9646:17: note: in expansion of macro 'C_u_i_execve'
 9646 | t6=(C_truep(t4)?C_u_i_execve(t2,t3,t4):C_u_i_execvp(t2,t3));
      |                 ^~~~~~~~~~~~
In file included from C:/msys64/ucrt64/include/unistd.h:11,
                 from chicken.h:134:
C:/msys64/ucrt64/include/process.h:187:64: note: expected 'char * const*' but argument is of type 'const char * const*'
  187 |   _CRTIMP int __cdecl execve(const char *_Filename,char *const _ArgList[],char *const _Env[]) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |                                                    ~~~~~~~~~~~~^~~~~~~~~~
posixwin.c:185:109: error: passing argument 3 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
  185 | #define C_u_i_execve(f,a,e) C_fix(execve(C_c_string(f), (const char *const *)C_c_pointer_vector_or_null(a), (const char *const *)C_c_pointer_vector_or_null(e)))
      |
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |
                |
      |
                const char * const*
chicken.h:1046:56: note: in definition of macro 'C_fix'
 1046 | #define C_fix(n)                   ((C_word)((C_uword)(n) << C_FIXNUM_SHIFT) | C_FIXNUM_BIT)
      |                                                        ^
posixwin.c:9646:17: note: in expansion of macro 'C_u_i_execve'
 9646 | t6=(C_truep(t4)?C_u_i_execve(t2,t3,t4):C_u_i_execvp(t2,t3));
      |                 ^~~~~~~~~~~~
C:/msys64/ucrt64/include/process.h:187:87: note: expected 'char * const*' but argument is of type 'const char * const*'
  187 |   _CRTIMP int __cdecl execve(const char *_Filename,char *const _ArgList[],char *const _Env[) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |                                                                           ~~~~~~~~~~~~^~~~~
posixwin.c:184:57: error: passing argument 2 of 'execvp' from incompatible pointer type [-Wincompatible-pointer-types]
  184 | #define C_u_i_execvp(f,a)   C_fix(execvp(C_c_string(f), (const char *const *)C_c_pointer_ve))
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         const char * const*
chicken.h:1046:56: note: in definition of macro 'C_fix'
 1046 | #define C_fix(n)                   ((C_word)((C_uword)(n) << C_FIXNUM_SHIFT) | C_FIXNUM_BIT)
      |                                                        ^
posixwin.c:9646:40: note: in expansion of macro 'C_u_i_execvp'
 9646 | t6=(C_truep(t4)?C_u_i_execve(t2,t3,t4):C_u_i_execvp(t2,t3));
      |                                        ^~~~~~~~~~~~
C:/msys64/ucrt64/include/process.h:188:64: note: expected 'char * const*' but argument is of type 'const char * const*'
  188 |   _CRTIMP int __cdecl execvp(const char *_Filename,char *const _ArgList[]) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |                                                    ~~~~~~~~~~~~^~~~~~~~~~
posixwin.c: In function 'f_4882':
posixwin.c:189:75: error: passing argument 3 of 'spawnvpe' from incompatible pointer type [-Wincompatible-pointer-types]
  189 | #define C_u_i_spawnvpe(m,f,a,e) C_fix(spawnvpe(C_unfix(m), C_c_string(f), (const char *cons, (const char *const *)C_c_pointer_vector_or_null(e)))
      |                                                                           ^~~~~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           const char * const*
chicken.h:1046:56: note: in definition of macro 'C_fix'
 1046 | #define C_fix(n)                   ((C_word)((C_uword)(n) << C_FIXNUM_SHIFT) | C_FIXNUM_BIT)
      |                                                        ^
posixwin.c:9768:17: note: in expansion of macro 'C_u_i_spawnvpe'
 9768 | t6=(C_truep(t4)?C_u_i_spawnvpe(((C_word*)t0)[2],t2,t3,t4):C_u_i_spawnvp(((C_word*)t0)[2],t2,t3));
      |                 ^~~~~~~~~~~~~~
C:/msys64/ucrt64/include/process.h:199:75: note: expected 'char * const*' but argument is of type 'const char * const*'
  199 |   _CRTIMP intptr_t __cdecl spawnvpe(int,const char *_Filename,char *const _ArgList[],char *const _Env[]) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |                                                               ~~~~~~~~~~~~^~~~~~~~~~
posixwin.c:189:127: error: passing argument 4 of 'spawnvpe' from incompatible pointer type [-Wincompatible-pointer-types]
  189 | #define C_u_i_spawnvpe(m,f,a,e) C_fix(spawnvpe(C_unfix(m), C_c_string(f), (const char *const *)C_c_pointer_vector_or_null(a), (const char *const *)C_c_pointer_vector_or_null(e)))
      |
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |
                                  |
      |
                                  const char * const*
chicken.h:1046:56: note: in definition of macro 'C_fix'
 1046 | #define C_fix(n)                   ((C_word)((C_uword)(n) << C_FIXNUM_SHIFT) | C_FIXNUM_BIT)
      |                                                        ^
posixwin.c:9768:17: note: in expansion of macro 'C_u_i_spawnvpe'
 9768 | t6=(C_truep(t4)?C_u_i_spawnvpe(((C_word*)t0)[2],t2,t3,t4):C_u_i_spawnvp(((C_word*)t0)[2],t2,t3));
      |                 ^~~~~~~~~~~~~~
C:/msys64/ucrt64/include/process.h:199:98: note: expected 'char * const*' but argument is of type 'const char * const*'
  199 |   _CRTIMP intptr_t __cdecl spawnvpe(int,const char *_Filename,char *const _ArgList[],char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |                                                                                      ~~~~~~
posixwin.c:188:74: error: passing argument 3 of 'spawnvp' from incompatible pointer type [-Wincompatible-pointer-types]
  188 | #define C_u_i_spawnvp(m,f,a)    C_fix(spawnvp(C_unfix(m), C_c_string(f), (const char *const))
      |                                                                          ^~~~~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          const char * const
chicken.h:1046:56: note: in definition of macro 'C_fix'
 1046 | #define C_fix(n)                   ((C_word)((C_uword)(n) << C_FIXNUM_SHIFT) | C_FIXNUM_BIT)
      |                                                        ^
posixwin.c:9768:59: note: in expansion of macro 'C_u_i_spawnvp'
 9768 | t6=(C_truep(t4)?C_u_i_spawnvpe(((C_word*)t0)[2],t2,t3,t4):C_u_i_spawnvp(((C_word*)t0)[2],t2,t3));
      |                                                           ^~~~~~~~~~~~~
C:/msys64/ucrt64/include/process.h:198:74: note: expected 'char * const*' but argument is of type 'const char * const*'
  198 |   _CRTIMP intptr_t __cdecl spawnvp(int,const char *_Filename,char *const _ArgList[]) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |                                                              ~~~~~~~~~~~~^~~~~~~~~~
make: *** [rules.make:121: posixwin-static.o] Error 1
}}}"	MickeyKnox
Milestone someday	1867	Cannot display literal values over 2^30 but within fixnum 64-bit range when declaring fixnum-arithmetic		unknown	5.4.0	defect		new	2026-03-15T17:57:25+01:00	2026-03-19T17:49:11+01:00	"Hi!

I encountered a problem using the Chicken Scheme Compiler that I have trouble understanding. When I use `(declare (fixnum-arithmetic))`, literal values that are `(expt 2 30)` or over but within the fixnum 64-bit range cause the following error:

{{{
Error: cannot coerce inexact literal `2166136261' to fixnum
}}}

What is stranger is that printing the `most-positive-fixnum` value from `(import (chicken fixnum))` works fine and is a value way larger than 2^30.

I included the various tests I performed. Uncomment the relevant parts for one particular test, the results I got are included after each test:

{{{
;File: test-chicken.scm

(declare (fixnum-arithmetic)) ;; always there for all tests

;(import (chicken fixnum))
;(display most-positive-fixnum)
;;; works fine, prints 4611686018427387903

;(display (exact? 1073741824))
;;; works fine, prints #t

;(display 1073741824)
;;; craches with Error: cannot coerce inexact literal `1073741824' to fixnum

;(display 1073741824)
;;; works fine, prints 1073741824
}}}

I compiled and ran the tests using the following command: `csc test-chicken.scm -o test-chick && ./test-chick`


For context, I found this bug working on Ribbit, another scheme implementation because of the inclusion of the literal for a hash function: https://github.com/udem-dlteam/ribbit/blob/7666b6c017a73a0a82e8df7f9de119d2408da404/src/rsc.scm#L1035

Here are infos about my `csc` version:
{{{
> csc -version
CHICKEN
(c) 2008-2022, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.4.0 (rev 1a1d1495)
macosx-unix-clang-arm64 [ 64bit dload ptables ]
}}}"	leo-ard
Milestone someday	1868	vector->string adds \x00 to the output	easy	core libraries	6.0.0	defect		new	2026-03-21T02:01:04+01:00	2026-03-21T02:01:04+01:00	"vector->string adds NULL bytes to the output in increasing frequency:

{{{#!scheme
(vector->string '#(#\a #\b #\c #\d #\e)) ;;=> ""ab\x00;c\x00;\x00;\x00;d\x00;\x00;\x00;\x00;\x00;\x00;\x00;e\x00;\x00;\x00;\x00;\x00;\x00;\x13;\x00;""
}}}

Even worse, this:

{{{#!scheme
(vector->string (string->vector (vector->string '#(#\a #\b #\c #\d #\e))))
}}}

results in a segmentation violation error."	zilti
Milestone someday	1869	vector->string adds \x00 to the output	easy	core libraries	6.0.0	defect		new	2026-03-21T02:01:53+01:00	2026-03-21T02:01:53+01:00	"vector->string adds NULL bytes to the output in increasing frequency:

{{{#!scheme
(vector->string '#(#\a #\b #\c #\d #\e)) ;;=> ""ab\x00;c\x00;\x00;\x00;d\x00;\x00;\x00;\x00;\x00;\x00;\x00;e\x00;\x00;\x00;\x00;\x00;\x00;\x13;\x00;""
}}}

Even worse, this:

{{{#!scheme
(vector->string (string->vector (vector->string '#(#\a #\b #\c #\d #\e))))
}}}

results in a segmentation violation error."	zilti
Milestone someday	1870	vector->string adds \x00 to the output	easy	core libraries	6.0.0	defect		new	2026-03-21T02:05:53+01:00	2026-03-21T02:05:53+01:00	"vector->string adds NULL bytes to the output in increasing frequency:

{{{#!scheme
(vector->string '#(#\a #\b #\c #\d #\e)) ;;=> ""ab\x00;c\x00;\x00;\x00;d\x00;\x00;\x00;\x00;\x00;\x00;\x00;e\x00;\x00;\x00;\x00;\x00;\x00;\x13;\x00;""
}}}

Even worse, this:

{{{#!scheme
(vector->string (string->vector (vector->string '#(#\a #\b #\c #\d #\e))))
}}}

results in a segmentation violation error."	zilti
Milestone someday	1222	Rework error handling to make it work better with non-POSIX functions	medium	core libraries		enhancement		new	2015-10-31T15:50:36+01:00	2023-11-08T21:21:28+01:00	"The core system is extremely ANSI/POSIX-centered. This means for example, that {{{##sys#update-errno}}} and strerror are used all over the place.

Unfortunately, this makes handling errors unnecessarily hard when dealing with native Windows functions (and potentially similar on other platforms).  Michele La Monaca [gave an example of how to deal with this http://lists.gnu.org/archive/html/chicken-hackers/2014-10/msg00072.html] in a thread where he pointed out that {{{rename-file}}} is inconsistent across platforms when the target file already exists."	sjamaan
Milestone someday	1259	slow polling	insane	core libraries	4.10.x	enhancement		new	2016-02-19T18:09:42+01:00	2016-08-25T20:32:57+02:00	Try integrating the modified scheduler from http://ball.askemos.org	joergw
Milestone someday	1553	sqlite3: The PREPARE procedure does not make it clear when it has and has not parsed a statement from a string.	easy	extensions	4.13.0	enhancement		new	2018-10-21T13:10:01+02:00	2018-10-21T13:16:01+02:00	"The PREPARE procedure does not make it clear when it has and has not parsed a statement from a string.

The calls `(prepare db """")` and `(prepare db ""select 1;""))` (note no trailing whitespace) both produce a `sqlite3:statement` and `""""`, and there is no way of distinguishing between these.  In the former case, the statement displays as `#<sqlite3:statement zombie>`, but there is no way of detecting this in code.

The documentation for PREPARE seems to suggest that a way of parsing a sequence of SQL statements from a string is to call PREPARE recursively on PREPARE's `rest` return, until `rest` returns `""""`. Thus:
{{{
(define (execute-statements* sql-string)
  (let-values (((stmt rest) (prepare db sql-string)))
    (if (string-null? rest)
        (finalize! stmt)
        (begin
          (dynamic-wind
              values
              (lambda ()
                (update stmt))
              (lambda ()
                (finalize! stmt)))
          (execute-statements* rest)))))
}}}
This will work //if and only if// the SQL string ends in whitespace, but will not work if the input string has no trailing whitespace or if it ends in a comment.  Spotting when `sql-string` is all whitespace, and special-casing this, helps in many cases, but doesn't help in the case where `sql-string` contains, or has through this process ended up containing, only a comment.

There //might// be a way of wrapping this up which solves the problem, and there might be a way of deducing that a statement is a 'zombie' by (mis)using other procedures, but more straightforward would be one of the following:

* Create a STATEMENT-ZOMBIE? predicate for the case where (in the implementation) `statement-ptr` is `#f`, and a statement would display as `zombie`.  Advantages: straightforward to implement; quite specific.  Disadvantages: introduces an extra concept which isn't really present in the underlying SQLite library, and which appears to be meaningful only for this case.
* Have STATEMENT? return `#f` for 'zombie' statements.  Advantages: matches the real semantics of the situation; so is probably the least surprising thing.  Disadvantages: might in principle confuse some future type reasoning, which might assume that if something is a statement, then it can be passed to UPDATE without error.
* Have PREPARE return `#f` for the statement when no statement is parsed.  Advantages: also unsurprising, and easy to check for without changing the definition of STATEMENT?.  Disadvantates: some complication to the type signature of PREPARE.

Of the three, I think the first is unattractive, and the second slightly more attractive than the third. 

I've marked this as an enhancement request, though I think it's on the border of being a bug.  I don't know what the criteria are for major vs minor priority.
"	Norman Gray
Milestone someday	1667	Overhaul c-backend.scm	hard	compiler	5.1.0	enhancement	felix winkelmann	assigned	2020-01-24T21:42:43+01:00	2023-11-06T22:09:50+01:00	"The C code generation stuff is a terrible, rotten mess. It's incomprehensible and making changes in the code has become rather difficult. I have a ""backend"" branch that uses an intermediate representation (S-expressions, roughly C-like), originally intended for an alternative backend (""qbe"") that seems to work, at least for the core system + tests.

I can try to bring it up to date and present it once it is ready.
"	felix winkelmann
Milestone someday	1796	Allow type definitions to be exported.		core libraries	5.3.0	enhancement		new	2022-01-04T20:07:21+01:00	2022-01-04T20:07:21+01:00	"Currently, there is no way for a module to export type definitions for public use.  (i.e. if a module M defines a type T, there is no way for programs that import M to make use of T; they must use * instead).  This severely limits the usefulness of the (chicken type) system, since type checking cannot be used on types outside of the CHICKEN core.

I'd propose an `export`-like form, e.g. `(export-type TYPE ...)` which makes type definitions created with `define-type` available beyond the scope of the containing module."	zaifir
Milestone someday	1807	with-input-from-string scsh-process		extensions	5.3.0	enhancement		new	2022-07-11T17:09:39+02:00	2022-07-11T19:48:56+02:00	"With-input-from-string doesn't work with stdports:

Error: (port->fileno) port has no attached file - Success: #<input port ""(string)"">

With-input-from-string works fine with other stuff like read-lines and stdports work fine with with-input-from-file."	Idiomdrottning
Milestone someday	1813	Test w64devkit	easy	build system	5.3.0	task		new	2022-10-31T12:27:53+01:00	2022-10-31T12:27:53+01:00	"This may be the canonical windows toolchain that we are looking for:

   https://github.com/skeeto/w64devkit
"	felix winkelmann
Milestone someday	1763	chicken-install should pass features defined on the command line on to the build script	easy	core tools	5.2.0	change request		new	2021-06-08T11:42:58+02:00	2021-06-08T11:42:58+02:00	"Currently, features defined using the `-feature` option of `chicken-install` are only visible in `cond-expand` forms in the egg, not in code compiled via `csc` in the subsequent build steps. It would probably be more intuitive and convenient to add `-feature FEATURE` options to the build scripts.
"	felix winkelmann
Milestone someday	749	honu: handle octal format escapes in string literals		extensions	4.7.x	defect		new	2011-12-13T13:35:40+01:00	2023-11-06T22:00:46+01:00	Currently not done but would be needed to handle all kinds of C strings.	felix winkelmann
Milestone someday	784	ssax's `ssax:warn' ignores its first argument (port)		extensions	4.7.x	defect		new	2012-02-09T12:11:30+01:00	2023-11-06T22:01:02+01:00	"From ssax-chicken.scm:

{{{
(define (ssax:warn port msg . other-msg)
  (apply cerr (cons* nl ""Warning: "" msg other-msg)))
}}}

{{{port}}} doesn't seem to be used anywhere."	Mario Domenech Goulart
Milestone someday	934	improve documentation for functors and named interfaces	easy	documentation	4.8.x	defect		new	2012-10-18T16:03:26+02:00	2016-08-25T21:21:22+02:00	"The documentation for functors and interfaces (as defined by `define-interface`) needs to be expanded and improved, and examples added.

(Suggested by Matt Gushee)
"	felix winkelmann
Milestone someday	985	read-line blocks intermittantly on Atom based netbook	hard	unknown	4.8.x	defect	Matt Welland	assigned	2013-02-18T01:03:10+01:00	2016-08-25T21:25:43+02:00	"This problem first shows up in:

9eef92115fba6034a98cc21ef740fd82ea52387b is the first bad commit
commit 9eef92115fba6034a98cc21ef740fd82ea52387b
Author: Peter Bex <peter.bex@xs4all.nl>
Date:   Sun Nov 18 21:03:51 2012 +0100

    Fix select() buffer overrun vulnerability by using POSIX poll() on systems that support it, leaving only those few systems vulnerable that don't (ie, only Windows).
    
I used the following code snippet to test. It took as much as 10 runs to trigger the bug sometimes:

=============CODE=============
(use posix)

(define (conservative-read port)
  (let loop ((res '()))
    (if (not (eof-object? (peek-char port)))
        (loop (cons (read-char port) res))
        (apply conc (reverse res)))))

(define (cmd-run-with-stderr->list cmd . params)
   (let-values (((fh fho pid fhe) (if (null? params)
                                      (process* cmd)
                                      (process* cmd params))))
       (let loop ((curr (read-line fh))
                  (result  '()))
         (print ""GOT HERE 1, curr="" curr)
         (let ((errstr (conservative-read fhe)))
           (print ""GOT HERE 3, errstr="" errstr)
           (if (not (string=? errstr """"))
               (set! result (cons errstr result))))
         (print ""GOT HERE 2, result="" result)
         (if (not (eof-object? curr))
             (begin
               (print ""GOT HERE 4"")
               (loop (read-line fh)
                     (cons curr result)))
             (begin
               (print ""GOT HERE 5"")
               (close-input-port fh)
               (close-input-port fhe)
               (close-output-port fho)
               (reverse result))))))

(print ""Got: "" (cmd-run-with-stderr->list ""ls""))

"	Matt Welland
Milestone someday	1007	socket egg: socket-close should track closed status		unknown		defect	Jim Ursetto	new	2013-04-12T08:59:39+02:00	2013-04-12T08:59:39+02:00	"We should probably track socket closed status, possibly by setting the fileno to #f when socket-close is called.  This should prevent accidental reuse of the socket FD when it is reopened by someone else.

It's not clear whether socket-close should stop throwing an error on double-close, or if this should be done instead in socket-close*.  This would be appropriate behavior to use in a finalizer.  But socket-close* is targeted for (immediate) use after network error.

Also note there are a bunch of direct calls to _close_socket which might have to be corrected to track the closed state."	Jim Ursetto
Milestone someday	1148	Fix setup-helper usage in eggs	trivial	extensions	4.9.x	defect		new	2014-08-14T17:25:35+02:00	2016-08-25T21:45:26+02:00	"Since version 1.5.3, the setup-helper egg uses the module system as the deployment method, before that it was to be (include)d by the users into their .setup files.

A lot of eggs still use the include statement to use setup-helper and that breaks it when a custom CHICKEN_REPOSITORY is set. To fix this, all eggs should use the new import method.

The fix is very simple, just replace `(include ""setup-helper"")` by (use setup-helper-mod) wherever necessary.

Here is a (automaticaly generated) list of possibly affected eggs:

9ML-toolkit
AD
F-operator
R
aima
alist-lib
amb
animation
apropos
blob-utils
bloom-filter
box
call-with-environment-variables
call-with-query
call-with-sqlite3-connection
check-errors
cock
cock-utils
coerce
combinatorics
combinators
condition-utils
coops-utils
crc
csp
csv-xml
debug
define-record-and-printer
define-structure
directory-utils
dollar
dsssl-utils
error-utils
expand-full
ffmpeg-video
freetds
graphviz
hashes
heap
image-processing
kvlists
levenshtein
linear-algebra
list-utils
locale
lookup-table
macosx
mailbox
mathh
message-digest
moremacros
mw
mw-core
neo4j
nondeterminism
number-limits
posix-utils
procedure-decoration
qobischeme-ui
redis
remote-mailbox
ripemd
scheme2c-compatibility
setup-helper
sha1
sha2
sicp
simple-units
srfi-102
srfi-19
srfi-27
srfi-29
srfi-40
srfi-41
srfi-45
srfi-60
srfi-9-ext
srfi-95
stack
string-utils
sxml-templates
symbol-utils
synch
thread-utils
tiger-hash
timed-resource
token-substitution
traversal
twilio
uuid-lib
uuid-ossp
variable-item
yasos
"	Kooda
Milestone someday	1233	hexgrid: test failure	easy	extensions	4.9.x	defect	estevo	new	2015-12-13T17:43:01+01:00	2016-08-25T21:46:38+02:00	See http://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2015/12/13/salmonella-report/test/hexgrid.html	Mario Domenech Goulart
Milestone someday	1236	equal? can break at random moments	hard	core libraries	4.10.x	defect		new	2015-12-22T15:37:34+01:00	2021-04-09T11:56:03+02:00	"This is really bad.  C_equal is defined to run inline, so it can't clear up stack space, but it consumes stack space! It will just bail out with an exception when it runs out of stack.  This is really really bad, because it basically means that you're playing russian roulette every time you call {{{equal?}}}; it can break or not, which depends on the state of the stack, over which you have very little control. It is also very hard to predict when exactly it will fail.

I found this out [[http://salmonella-linux-x86-64.call-cc.org/master-debugbuild/gcc/linux/x86-64/2015/12/22/salmonella-report/test/numbers.html|the hard way]].

Here's a standalone version that boils down to the code in the numbers tests:

{{{
#!scm

;; Creates lists like (((1))) and ((((1)))) for 3 and 4, respectively.
(define-syntax recompose
  (er-macro-transformer
   (lambda (e r c)
     (let ((n (cadr e))
           (op (caddr e))
           (arg (cadddr e)))
       (define (recompose-1 n)
         (if (= n 1)
             `(,op ,arg)
             `(,op ,(recompose-1 (- n 1)))))
       (recompose-1 n)))))

(let lp ((i 0))
  (print i "" "" (equal? (recompose 1000 list '(1))
                       (recompose 1000 list (list 1))))
  (lp (add1 i)))
}}}

You'll see this blows up after only 16 or so iterations.  I had to up the list nesting to 1000 because 100 only seems to crash once every blue moon.

A fix could involve dynamically allocating (with {{{malloc}}} or so) a ""working list"" stack and use that to convert the recursion to a loop.  Alternatively, we could ""de-inline"" it so it can reclaim memory.  On the plus side, this allows us to convert it to Scheme.  On the downside, we'd be taking a CPS hit.

Originally I thought it might be possible to use the scratch space in CHICKEN 5, but I'm not sure that's suitable in this case because there's nothing in the heap or nursery that points directly to it.  We could create one and make an actual Scheme list of ""todo"" objects, but it would be such a long chain that it would become pretty slow I think."	sjamaan
Milestone someday	1276	alist-lib alist-update!/default not useful for adding keys		extensions	4.10.x	defect	Peter Danenberg	assigned	2016-04-08T00:07:39+02:00	2017-08-25T15:20:03+02:00	I noticed that alist-update! and alist-update!/default in alist-lib have call signatures suggestive of being able to add keys to an alist (not just updating existing keys) because they accept a default OLD value if the given key is not found.  However, both procedures have an unspecified return value, so it's not clear what the intent was for the case of adding new entries to the alist.  If they don't return an updated reference to the head of the list, there is no way to add new entries, and it doesn't make sense to have a DEFAULT in the call signature.	John Foerch
Milestone someday	1339	char-ready? returns #f even when input is available	insane	core libraries	4.11.0	defect		new	2017-01-11T09:41:53+01:00	2019-08-25T17:47:08+02:00	"The current implementation of char-ready? on stdio files returns #f if you have buffering enabled, didn’t consume the whole buffer and no more input is available from the system’s point of view, as it only asks the system via select or poll (see C_char_ready_p and C_check_fd_ready).

I’m afraid there’s no way to do better than this with stdio files, as there is no way of checking the state of the buffer.

The workaround I found was to simply disable buffering altogether, like so:

{{{
(set-buffering-mode! (current-input-port) #:none)
}}}

This bug probably requires a pretty big rework of ports.

Here is a little program that '''might''' show the erroneous behaviour:

{{{
(use posix)

(call-with-input-pipe ""echo coucou""
  (lambda (p)
    (let loop ((c (read-char p)))
      (unless (eof-object? c)
        (print c)
        (when (char-ready? p) (loop (read-char p)))))))
}}}"	Kooda
Milestone someday	1340	Unable to compile a mathh gama instruction at or above optimize-level 3	medium	unknown	4.11.0	defect		new	2017-01-16T02:02:34+01:00	2021-04-12T13:40:17+02:00	"Compiling the following code at or above optimize-level 3 results in an error.

{{{(use mathh)

(define (factorial x)
	(gamma (+ 1 x)) )

(factorial 9)}}}

csc -optimize-level 3 test.scm
test.c:213:4: warning: implicit declaration of function
      'stub177' is invalid in C99
      [-Wimplicit-function-declaration]
t6=stub177(t4,t5);
   ^
1 warning generated."	rca
Milestone someday	1371	locative table is only grown, never shrunk	medium	core libraries	4.12.0	defect		new	2017-05-12T09:39:49+02:00	2023-11-06T22:16:11+01:00	"From a quick look at the code, it looks like we only realloc the `locative_table` when making a locative and the table is full. In extreme cases, this means the locative table will grow and never shrink back to a manageable size.

After some consideration, I think this is not a huge issue, as on every GC, collected locatives are thrown out of the table, so the maximum size of the locative table is bounded by the heap size. Still, this is not desirable.

I think the best place to do this is at the end of `update_locative_table` since we're already keeping track of the table size. We may also change this function to compact the table while walking it, so we can get by with a simple `realloc()`."	sjamaan
Milestone someday	1382	sql-de-lite ignores new versions of sqlite3 on Cygwin	trivial	extensions	4.12.0	defect	Jim Ursetto	new	2017-06-27T17:15:31+02:00	2017-06-28T13:00:37+02:00	"The `version-check` program does not run under Cygwin, so `sql-de-lite` installation conservatively assumes it should use the bundled 3.0.17 version of sqlite3 instead of Cygwin's current 3.0.18.

The root cause of this is that Cygwin ''really isn't Windows'' and shouldn't set the `windows:` feature (see #1381).  As a workaround, change line 49 of the setup file with `s/windows/(and windows (not cygwin))/`.  A more portable resolution is to get rid of `version-check` altogether and run `sqlite3 --version` instead: the first few characters of the output (up to a space) are the formatted sqlite3 version number."	johnwcowan
Milestone someday	1427	gochan's test failure		extensions	4.12.0	defect	kristianlm	new	2017-11-27T08:30:29+01:00	2017-11-27T08:30:29+01:00	"I noticed a failure in gochan's tests today: http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2017/11/26/salmonella-report/test/gochan.html

{{{
-- testing timers: each gochan-tick gets consumed by only one recv -----------
10ms messages for 105ms means 10 messages ............................ [ FAIL]
    expected 10 but got 12
    (length results)
hopefully different senders: (1 1 1 1 1 2 3 3 4 4 4 4)
1 test completed in 0.124 seconds.
1 failure (100%).
0 out of 1 (0%) tests passed.
-- done testing timers: each gochan-tick gets consumed by only one recv ------
}}}

I've never seen this one before. I'm reporting in case it can help to spot a difficult to reproduce issue."	Mario Domenech Goulart
Milestone someday	1452	[test egg]: test-group eats the call-chain on error		extensions		defect		new	2018-03-23T19:28:26+01:00	2018-03-23T19:28:26+01:00	"Below is code that calls an ill behaving function `foo` three times. Only the third version prints the call-chain. 

It should be printed in the two calls inside `test-group`s as well.
{{{
(use test)
 
 (define (f)
   (+ 1 'a))
 
 (test-group ""foo""
   (f))
 
 (test-group ""bar""
   (test 2 (f)))
 
 (test-begin ""baz"")
 (f)
 (test-end ""baz"")
 
 ;; $ csi -qbn test-group-call-chains.scm
 ;;
 ;; Warning: error in group outside of tests
 ;;
 ;; Error: (+) bad argument type: a
 ;; 1 test completed in 0.0 seconds.
 ;; 1 error (100%).
 ;; 0 out of 1 (0%) tests passed.
 ;; -- done testing foo ----------------------------------------------------------
 ;;
 ;;
 ;; -- testing bar ---------------------------------------------------------------
 ;; (f) .................................................................. [ERROR]
 ;;
 ;; Error: (+) bad argument type: a
 ;; 1 test completed in 0.0 seconds.
 ;; 1 error (100%).
 ;; 0 out of 1 (0%) tests passed.
 ;; -- done testing bar ----------------------------------------------------------
 ;;
 ;;
 ;; Error: (+) bad argument type: a
 ;;
 ;;  Call history:
 ;;
 ;;  <eval>    (with-exception-handler89 (##core#lambda (exvar79) (k86 (##core#lambda () (##core#let ((kvar80 (and8...
 ;;  <eval>    (##sys#call-with-values (##core#lambda () (begin67 (test 2 (f)))) (##core#lambda args87 (k86 (##core...
 ;;  <eval>    (test-run102 (lambda103 () 2) (lambda103 () (f)) (cons104 (cons104 (quote105 name106) #f) (quote105 ...
 ;;  <eval>    (cons104 (cons104 (quote105 name106) #f) (quote105 ((source107 f) (source101 f))))
 ;;  <eval>    (cons104 (quote105 name106) #f)
 ;;  <eval>    (f)
 ;;  <eval>    [f] (+ 1 (quote a))
 ;;  <eval>    (k86 (##core#lambda () (##sys#apply ##sys#values args87)))
 ;;  <eval>    (##sys#apply ##sys#values args87)
 ;;  <eval>    (test-end76 name56)
 ;;  <eval>    (current-test-group58 old-group57)
 ;;  <syntax>      (test-begin ""baz"")
 ;;  <eval>    (test-begin ""baz"")
 ;;  <syntax>      (f)
 ;;  <eval>    (f)
 ;;  <eval>    [f] (+ 1 (quote a))   <--

}}}"	megane
Milestone someday	1491	##sys#expand-multiple-values-assignment works for some reason	medium	expander	5.0.0	defect		new	2018-07-23T09:39:26+02:00	2018-07-23T14:06:15+02:00	"Replace the original with this. I have only added the `print` and the `import`.
  {{{
  (import chicken.type)
  (define (##sys#expand-multiple-values-assignment formals expr)
    (##sys#decompose-lambda-list
     formals
     (lambda (vars argc rest)
       (let ((aliases    (if (symbol? formals) '() (map gensym formals)))
             (rest-alias (if (not rest) '() (gensym rest))))
         (print ""formals: "" formals
                "" list?: ""(list? (the * formals))
                "" aliases: "" aliases
                "" rest "" rest-alias)
         `(##sys#call-with-values
           (##core#lambda () ,expr)
           (##core#lambda
            ,(append aliases rest-alias)
            ,@(map (lambda (v a) `(##core#set! ,v ,a)) vars aliases)
            ,@(cond
                ((null? formals) '((##core#undefined)))
                ((null? rest-alias) '())
                (else `((##core#set! ,rest ,rest-alias))))))))))
  }}}

Now check the output of this. Pay attention to the `(d . e)` case. It's not a list, but somehow the `(map gensym formals)` expression runs without errors.
  {{{
  (let ([e '(0 1 2 3 (4) (5 6))]
        [r (letrec-values ((() (values))
                           ((a) (values 0))
                           ((b c) (values 1 2))
                           ((d . e) (values 3 4))
                           (f (values 5 6)))
                          (list a b c d e f))])
    (print e)
    (print r)
    (assert (equal? e r)))

  -->
  $ csc ../letrecvalues.scm && ../letrecvalues
  formals: () list?: #t aliases: () rest ()
  formals: (a) list?: #t aliases: (a11) rest ()
  formals: (b c) list?: #t aliases: (b12 c13) rest ()
  formals: (d . e) list?: #f aliases: (d14) rest e15
  formals: f list?: #f aliases: () rest f16
  (0 1 2 3 (4) (5 6))
  (0 1 2 3 (4) (5 6))
  }}}

I think the correct implementation is something more like this:
{{{
(define (##sys#expand-multiple-values-assignment formals expr)
  (##sys#decompose-lambda-list
   formals
   (lambda (vars argc rest)
     (let* ((aliases    (if (symbol? formals) '() (map gensym vars)))
	    (rest-alias (and rest (gensym rest))))
       `(##sys#call-with-values
	 (##core#lambda () ,expr)
	 (##core#lambda
	  ,(cond
	    [(symbol? formals) rest-alias]
	    [(and rest (null? (cdr vars))) rest-alias]
	    [(null? aliases) aliases]
	    [rest (let lp ([vs aliases])
		    (if (null? (cdr vs))
			(car vs)
			(cons (car vs) (lp (cdr vs)))))]
	    [else aliases])
	  ,@(map (lambda (v a) `(##core#set! ,v ,a)) vars aliases)
	  ,@(cond
	     [(symbol? formals) `((##core#set! ,rest ,rest-alias))]
	     [else '((begin))])))))))
}}}"	megane
Milestone someday	1526	gochan: test failure: 10ms messages for 105ms means 10 messages: expected 10 but got 11		extensions		defect	kristianlm	new	2018-08-30T07:42:06+02:00	2018-11-09T15:19:50+01:00	"See http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2018/08/30/salmonella-report/test/gochan.html

Doesn't seem to happen in all runs.  Tests in the previous days passed."	Mario Domenech Goulart
Milestone someday	1541	Use reentrant library functions, if available	medium	core libraries	5.0.0	defect		new	2018-10-01T10:54:12+02:00	2018-10-01T10:54:12+02:00	Use reentrant C library functions, if possible (like `strerror_r`), where available. Figuring out what is available where is the hard part.	felix winkelmann
Milestone someday	1582	List of available eggs in RSS format contain incomplete URLs	easy	wiki	5.0.0	defect		new	2019-02-02T15:34:33+01:00	2019-02-02T15:34:33+01:00	The link elements in http://eggs.call-cc.org/rss-4.xml and http://eggs.call-cc.org/rss-5.xml are broken. A https: prefix is missing.	sven
Milestone someday	1621	apropos support disjoint keyword	easy	extensions	5.0.0	defect	Kon Lovett	new	2019-06-09T20:10:43+02:00	2021-09-09T01:46:12+02:00	need to filter keyword table for apropos	Kon Lovett
Milestone someday	1628	hopefully: deadlock in tests		extensions	5.1.0	defect	joergw	new	2019-07-02T07:35:56+02:00	2019-07-22T17:34:18+02:00	"See http://salmonella-linux-arm64.call-cc.org/master/clang/linux/arm64/2019/07/01/salmonella-report/test/hopefully.html

Note that tests usually work.  That's the first time I see this failure."	Mario Domenech Goulart
Milestone someday	1634	copy-file and move-file do not preserve permissions	easy	core libraries	5.1.0	defect		new	2019-07-15T08:01:56+02:00	2019-07-28T23:17:49+02:00	both procedures create a new output file using open, so permissions are always (assuming normal umask) 644. this patch sets the permissions to those of the input file after writing all bytes and before closing the ports. tested on PLATFORM=linux. I do not know the implications of this on windows; the fact that C_chmod and C_fchmod have definitions in posixwin.scm makes me assume this is safe, but I cannot be sure without a machine to test on	alicemaz
Milestone someday	1635	Include multiple times in a row 'interrupts' definitions	hard	expander	5.1.0	defect		new	2019-07-24T06:28:34+02:00	2019-07-24T13:20:40+02:00	"Given file `include.scm`:
{{{#!scheme
(define (foo)
  (print that))
}}}
and a file ""include2.scm""  with arbitrary contents (including an empty file), the following code works (interpreted and compiled):
{{{#!scheme
#!/usr/bin/csi -s
(define (main #!optional args)
  (include ""include.scm"")
  (define that ""hey"")
  (foo))

(main)
}}}
whereas this does not (interpreted or compiled):
{{{#!scheme
#!/usr/bin/csi -s
(define (main #!optional args)
  (include ""include.scm"")
  (include ""include2.scm"")
  (define that ""hey"")
  (foo))

(main)
}}} 

The latter throws an error about `that` being unbound."	Diego
Milestone someday	1669	9p: wrong test directory	trivial	extensions	5.4.0	defect	Shawn Rutledge	assigned	2020-02-02T20:35:58+01:00	2024-12-23T14:37:17+01:00	9p uses a {{{test}}} directory for tests, which is not used by chicken-install (thus not used by salmonella either).  The correct directory should be {{{tests}}}.	Mario Domenech Goulart
Milestone someday	1670	address-info: wrong test directory	trivial	extensions	4.13.0	defect	Thomas Chust	assigned	2020-02-02T20:36:58+01:00	2020-02-02T20:58:08+01:00	address-info uses a {{{test}}} directory for tests, which is not used by chicken-install (thus not used by salmonella either).  The correct directory should be {{{tests}}}.	Mario Domenech Goulart
Milestone someday	1671	aes: wrong test directory	trivial	extensions	4.13.0	defect	Alaric Snell-Pym	assigned	2020-02-02T20:37:50+01:00	2020-02-07T20:13:25+01:00	aes uses a {{{test}}} directory for tests, which is not used by chicken-install (thus not used by salmonella either).  The correct directory should be {{{tests}}}.	Mario Domenech Goulart
Milestone someday	1672	crypto-tools: wrong test directory	trivial	extensions	4.13.0	defect	Alaric Snell-Pym	assigned	2020-02-02T20:38:48+01:00	2020-02-02T20:58:38+01:00	crypto-tools uses a {{{test}}} directory for tests, which is not used by chicken-install (thus not used by salmonella either).  The correct directory should be {{{tests}}}.	Mario Domenech Goulart
Milestone someday	1673	srfi-99: wrong test directory	trivial	extensions	4.13.0	defect	Thomas Chust	assigned	2020-02-02T20:39:46+01:00	2020-02-02T20:58:51+01:00	srfi-99 uses a {{{test}}} directory for tests, which is not used by chicken-install (thus not used by salmonella either).  The correct directory should be {{{tests}}}.	Mario Domenech Goulart
Milestone someday	1674	tweetnacl: wrong test directory	trivial	extensions	4.13.0	defect	Thomas Chust	assigned	2020-02-02T20:40:57+01:00	2020-02-02T20:59:07+01:00	tweetnacl uses a {{{test}}} directory for tests, which is not used by chicken-install (thus not used by salmonella either).  The correct directory should be {{{tests}}}.	Mario Domenech Goulart
Milestone someday	1701	Egg SRFI-37 - wrong result		extensions	5.2.0	defect		new	2020-07-06T23:14:26+02:00	2020-07-06T23:14:26+02:00	"Egg srfi-37 seems to have a problem:


{{{
Type ,? for help.
#;1> (import (srfi 37))
; loading /home/jeronimo/pkg/scheme/chicken/ROOT-git/lib/chicken-git/11/srfi-37.import.so ...
; loading /home/jeronimo/pkg/scheme/chicken/ROOT-git/lib/chicken-git/11/srfi-37.so ...
#;2> (args-fold '(""-I"" ""the-argument"")
           (list (option '(#\I) #f #t
                         (lambda (opt name arg result)
                           (and (eqv? name #\I) arg))))
           (lambda args (error ""unrecognized""))
           (lambda args #f)
           #f)
#f
#;4>
}}}


But it should have returned the argument value (""the-argument"").

If, instead of '(""-I"" ""the-argument""), you pass it '(""-Ithe-argument""),
then it will correctly recognize -I's argument, ""the-argument"".

Several implementations seem to do the same, so perhaps this is a bug in 
the reference implementation?
"	Jeronimo Pellegrini
Milestone someday	1719	unbounded growth from parameterize		core libraries	5.2.0	defect		new	2020-08-28T19:38:59+02:00	2023-11-08T21:18:08+01:00	"I know of no practical use case for an unbounded number of created and forgotten parameter objects, so assign the appropriate level of priority to this -- I just thought it was an interesting case.  I recently realized this was possible on my own toy scheme and fixed it by switching to ephemerons in my continuation-marks cell representation.   chibi, mit-scheme, chez, guile, gauche -- all have unbounded growth on this test as well.

#;1> (let loop () (parameterize (((make-parameter #f) (make-vector 10000))) (loop)))
[panic] out of memory - heap has reached its maximum size - execution terminated
"	Jim Rees
Milestone someday	1726	chicken.base#implicit-exit-handler reporting segmentation violation with non-default heap size		core libraries	5.1.0	defect		new	2021-01-15T04:19:31+01:00	2023-11-14T18:48:38+01:00	"I was experimenting with the ""Man-or-boy"" test
(http://rosettacode.org/wiki/Man_or_boy_test) using Chicken Scheme;
my variant looks like this:

{{{
vjo@glaucus/pts/11:chicken/man_or_boy % cat test.scm
(import (chicken process-context)
        (chicken fixnum))

(define (A k x1 x2 x3 x4 x5)
  (let
      ([+ fx+]
       [- fx-]
       [<= fx<=])
    (define (B)
      (set! k (- k 1))
      (A k B x1 x2 x3 x4))
    (if (<= k 0)
        (+ (x4) (x5))
        (B))))

(define k (let ([args (command-line-arguments)])
            (if (> (length args) 0)
                (string->number (car args))
                10)))
(print (A k
          (lambda () 1)
          (lambda () -1)
          (lambda () -1)
          (lambda () 1)
          (lambda () 0)))
}}}

This compiles fine, and runs great with the default heap size up to
a value of k=27:

{{{
vjo@glaucus/pts/11:chicken/man_or_boy % csc -O4 test.scm
vjo@glaucus/pts/11:chicken/man_or_boy % time ./test 26
-21051458
./test 26  25.20s user 1.31s system 99% cpu 26.577 total
vjo@glaucus/pts/11:chicken/man_or_boy % time ./test 27
-46750171
./test 27  101.91s user 4.42s system 99% cpu 1:46.66 total
}}}

At k=28, however, we run out of heap, with the default settings:

{{{
vjo@glaucus/pts/11:chicken/man_or_boy % time ./test 28
[panic] out of memory - heap has reached its maximum size - execution terminated

...more...
test.scm:14: B
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:13: x4
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:13: x4
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:14: B
test.scm:11: A  <--
./test 28  22.39s user 3.79s system 99% cpu 26.282 total
}}}

No problem, say I; let me re-compile with an increased heap.
That works well - and the code gives back the correct answer - but,
I now encounter the bug I wish to report:

{{{
vjo@glaucus/pts/11:chicken/man_or_boy % csc -O4 -heap-size 4096M test.scm
vjo@glaucus/pts/11:chicken/man_or_boy % time ./test 28
-103821058

Error: segmentation violation

        Call history:

        test.scm:13: x5
        test.scm:11: A
        test.scm:13: x4
        test.scm:13: x5
        test.scm:13: x5
        test.scm:11: A
        test.scm:13: x4
        test.scm:11: A
        test.scm:13: x4
        test.scm:13: x5
        test.scm:13: x5
        test.scm:11: A
        test.scm:13: x4
        test.scm:13: x5
        test.scm:20: chicken.base#print
        chicken.base#implicit-exit-handler              <--
./test 28  90.91s user 1.71s system 99% cpu 1:32.65 total
}}}

It *appears* that the implicit-exit-handler triggers a segmentation
violation for any binary compiled with a non-default heap size
specified; as an illustrative example, here is the same code
compiled with two different heap sizes and executed using k=26. The
first shows what happens with an insufficient heap size, the second
shows what happens when the heap size is *just barely* sufficient,
but non-default value:

{{{
vjo@glaucus/pts/11:chicken/man_or_boy % csc -O4 -heap-size 928M test.scm
vjo@glaucus/pts/11:chicken/man_or_boy % time ./test 26
[panic] out of memory - heap full - execution terminated

...more...
test.scm:14: B
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:13: x4
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:13: x4
test.scm:11: A
test.scm:14: B
test.scm:11: A
test.scm:14: B
test.scm:11: A  <--
./test 26  5.01s user 0.44s system 99% cpu 5.471 total

vjo@glaucus/pts/11:chicken/man_or_boy % csc -O4 -heap-size 929M test.scm
vjo@glaucus/pts/11:chicken/man_or_boy % time ./test 26
-21051458

Error: segmentation violation

        Call history:

        test.scm:13: x5
        test.scm:13: x5
        test.scm:11: A
        test.scm:13: x4
        test.scm:11: A
        test.scm:13: x4
        test.scm:11: A
        test.scm:13: x4
        test.scm:13: x5
        test.scm:13: x5
        test.scm:13: x5
        test.scm:11: A
        test.scm:13: x4
        test.scm:13: x5
        test.scm:20: chicken.base#print
        chicken.base#implicit-exit-handler              <--
./test 26  25.87s user 0.73s system 99% cpu 26.620 total
}}}

The versions of all software involved have been determined below:

{{{
vjo@glaucus/pts/11:chicken/man_or_boy % csc -O4 -kv test.scm          
'/usr/bin/chicken' 'test.scm' -output-file 'test.c' -optimize-level 4 -verbose
'x86_64-linux-gnu-gcc' 'test.c' -o 'test.o' -c  -fno-strict-aliasing -fwrapv
-DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -g -O2
-fdebug-prefix-map=/build/chicken-8b5V5S/chicken-5.1.0=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/chicken
'x86_64-linux-gnu-gcc' 'test.o' -o 'test' -L/usr/lib -Wl,-R/usr/lib -lchicken -lm -ldl

vjo@glaucus/pts/11:chicken/man_or_boy % x86_64-linux-gnu-gcc --version
x86_64-linux-gnu-gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

vjo@glaucus/pts/11:chicken/man_or_boy % csc -version                  
CHICKEN
(c) 2008-2019, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.1.0 (rev 8e62f718)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
}}}
"	vjorlikowski
Milestone someday	1739	math: failure in tests		extensions	5.2.0	defect	Diego	assigned	2021-04-01T19:06:33+02:00	2021-04-11T16:09:44+02:00	See http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2021/03/31/salmonella-report/test/math.html	Mario Domenech Goulart
Milestone someday	1740	ephem: failures in tests (on 32bit systems)		extensions	5.2.0	defect	rca	assigned	2021-04-01T19:10:12+02:00	2021-04-01T19:10:12+02:00	"Some ephem tests fail on 32bit systems.  See http://salmonella-linux-x86.call-cc.org/master-debugbuild/gcc/linux/x86/2021/03/31/salmonella-report/test/ephem.html

Tests pass on 64bit systems (e.g., https://salmonella-linux-x86-64.call-cc.org/master/tcc/linux/x86-64/2021/04/01/salmonella-report/test/ephem.html )"	Mario Domenech Goulart
Milestone someday	1769	Svn-client egg: changes needed to build under musl		extensions	5.2.0	defect	Peter Bex	assigned	2021-07-11T15:42:44+02:00	2021-07-11T15:42:44+02:00		Christopher Brannon
Milestone someday	1775	fuse tests hang		extensions		defect	evhan	assigned	2021-08-07T22:48:21+02:00	2021-10-27T23:18:11+02:00	"The test suite of fuse hangs sometimes.  I don't know a way to reproduce that, but they hang from time to time.

Hangs have been observed with:
* CHICKEN 4 jobs on the salmonella-linux-x86-64 machine (Debian 9)
* CHICKEN 5 jobs on the salmonella-linux-x86 machine (Debian 10)

Below is some info:

{{{
$ cat /etc/debian_version 
9.13

$ clang --version
clang version 3.8.1-24 (tags/RELEASE_381/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ strace -p 23651
strace: Process 23651 attached
restart_syscall(<... resuming interrupted poll ...>
}}}

"	Mario Domenech Goulart
Milestone someday	1778	Typo or incorrect export in fmt egg		extensions		defect	Alex Shinn	assigned	2021-08-25T16:54:30+02:00	2021-08-26T10:56:57+02:00	The documentation for the fmt egg describes a fmt-color procedure. The signature matches the fmt-color**ed** procedure, which is currently internal. I believe fmt-color should be internal or at least fmt-colored should be additionally exported and the documentation updated.	Diego
Milestone someday	1795	Types for srfi-69 egg		extensions	5.3.0	defect		new	2022-01-04T19:23:33+01:00	2025-07-25T18:30:34+02:00	srfi-69 is a widely-used CHICKEN egg, but it does not provide types--in particular, programs using srfi-69 cannot use hash-table as a type in their own code, but must use the non-specific * type instead.  This makes it harder to catch mistakes when using this egg.  Please add type information to srfi-69.	zaifir
Milestone someday	1801	parley constructs an internally inconsistent input port	trivial	extensions	5.3.0	defect		new	2022-04-26T11:50:50+02:00	2022-04-27T06:58:43+02:00	"The parley egg still hasn't been ported successfully to C5. Most of the steps are done already (egg file, imports, tests), but interactive usage fails:

{{{
#;2> (define p (let ((old (current-input-port))) (make-parley-port old)))
#;3> p
#<port ""(parley)"">
#;4> (input-port? (current-input-port))
#t
#;5> (input-port? p)
#t
#;6> (current-input-port p)

Error: (current-input-port) bad argument type - not a port of the correct type: #<port ""(parley)"">

        Call history:

        <syntax>          (current-input-port p)
        <eval>    (current-input-port p)        <--
}}}

Looking at the code performing checks, it seems that the I/O direction slot is checked whether it's an input one. Both `input-port?` and `current-input-port` seem to look at the same slot, but arrive to different conclusions. Perhaps C5 changed some port internals?

One way of side-stepping this would be to avoid low-level port construction, but this might break C4 compatibility completely."	Vasilij Schneidermann
Milestone someday	1805	`html->sxml` with escaped quotes breaks text into multiple nodes		extensions	5.3.0	defect	Alex Shinn	assigned	2022-06-10T20:53:06+02:00	2022-06-10T21:07:06+02:00	"There's some weirdness with escaping quotes in text when using `html->sxml`. Perhaps a short example would be sufficient to explain the problem I'm encountering:

{{{
(html->sxml ""<p>foo&apos;bar&quot;baz</p>"") ;=> (*TOP* (p ""foo"" ""'"" ""bar"" ""\"""" ""baz""))
}}}

As a counter-example, I'll use the [https://wiki.call-cc.org/eggref/5/ssax: ssax egg]:

{{{
(call-with-input-string ""<p>foo&apos;bar&quot;baz</p>"") ;=> (*TOP* (p ""foo'bar\""baz""))
}}}

I guess fundamentally it's a question of whether there should be one text node or not. I would argue that in this particular case, it should be a single node. I have been using html-parser to try and scrape some web pages, and this is extremely unexpected! Especially so if one uses `txpath` / `sxpath` on the final result, as `//p/text()` queries will not necessarily behave as expected. You would have to `(apply string-append ((txpath ""//p/text()"") sxml))` to the result to get the full contents of the text.

Is there a rationale for this, or is that some kind of limitation of the parser? I know that tags may also contain sub-tags in HTML, but I'm not sure a new node should be made if a tag's contents are not HTML tags themselves."	Jeremy Steward
Milestone someday	1814	OS X / PowerPC failing test: remainder return -0.0		unknown	5.3.0	defect		new	2023-02-06T08:57:28+01:00	2023-02-09T00:31:05+01:00	"I recently added CHICKEN 5.3.0 to my package manager for OS X Tiger/PowerPC and Leopard/PowerPC: https://github.com/cellularmitosis/leopard.sh/commit/192014b920692434337783199742ceb217694f27

When I ran the tests, there was only one failure:

{{{
(FAIL) remainder: flo/flo: expected 0.0 but got -0.0
}}}

I also verified it by hand:

{{{
$ csi
CHICKEN
(c) 2008-2021, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.3.0 (rev e31bbee5)
macosx-unix-gnu-ppc [ 32bit dload ]

Type ,? for help.
#;1> (remainder 1.0 1.0)
-0.0
#;2> 
}}}

Thanks for all of your work on CHICKEN!
"	cellularmitosis
Milestone someday	1833	inaccuracy in exponential functions		unknown	5.3.0	defect		new	2024-02-29T14:58:37+01:00	2024-02-29T14:58:37+01:00	"I wish to bring to your kind notice the following:

(sin -1e-6i), whose magnitude should be sinh, gives inaccurate answer, in comparison SCM scheme for the same expression, gives the correct C function answer. The discrepancy is related to the C functions expm1 and log1p which are needed for small x.

Another thing I noticed is the expression (sin 1e-6i) gives the error 1e-6 unbound variable, whereas in the expression (sin +1e-6i) it is correctly recognized as a number.

Thanks."	sjain59
Milestone someday	1845	srfi-69 .types errors		extensions	5.4.0	defect		new	2024-12-14T01:47:23+01:00	2024-12-14T01:47:23+01:00	"
===== hashes return fixes & are not pure

((srfi-69#number-hash (#(procedure clean: enforce:) srfi-69#number-hash (new: number old: fixnum #!optional fixnum fixnum) fixnum)))

((srfi-69#hash (new: #(procedure clean: enforce:) old: #(procedure pure: enforce:) srfi-69#hash (* #!optional fixnum fixnum) fixnum)))

((srfi-69#string-hash (#(procedure clean: enforce:) srfi-69#string-hash (string #!optional fixnum fixnum fixnum fixnum) new: fixnum old: number)))

((srfi-69#string-ci-hash (#(procedure clean: enforce:) srfi-69#string-ci-hash (string #!optional fixnum fixnum fixnum fixnum) new: fixnum old: number)))

((srfi-69#hash-by-identity (new: #(procedure clean: enforce:) old: #(procedure pure: enforce:) srfi-69#hash-by-identity (* #!optional fixnum fixnum) fixnum)))

((srfi-69#string-hash-ci (#(procedure clean: enforce:) srfi-69#string-hash-ci (string #!optional fixnum fixnum fixnum fixnum) new: fixnum old: number)))

===== min/max load is float & equiv-func is a slot

((srfi-69#hash-table-max-load (#(procedure clean: enforce:) srfi-69#hash-table-max-load ((struct hash-table)) new: float old: fixnum) (((struct hash-table)) (##sys#slot #(1) (quote 6)))))

((srfi-69#hash-table-min-load (#(procedure clean: enforce:) srfi-69#hash-table-min-load ((struct hash-table)) new: float old: fixnum) (((struct hash-table)) (##sys#slot #(1) (quote 5)))))

((srfi-69#hash-table-equivalence-function (#(procedure clean: enforce:) srfi-69#hash-table-equivalence-function ((struct hash-table)) (procedure (* *) *)) new: (((struct hash-table)) (##sys#slot #(1) (quote 3)))))
"	Kon Lovett
Milestone someday	1851	utf8 egg: Missing char sets and outdated tables		unknown	5.4.0	defect		new	2025-04-08T08:31:26+02:00	2025-07-04T17:53:52+02:00	"The unicode-char-sets module of the utf8 egg is missing several character sets. In particular, there is no set for characters with the Numeric property (making it impossible to implement a Unicode-aware 'char-numeric?' in CHICKEN) or for any of the punctuation properties. The utf8-srfi-14 module includes char-set:digit and char-set:punctuation, but these are throwaway ASCII-only implementations (in a file that begins with ""Unicode capable char-sets"", no less!). These sets should be added.

Furthermore, the sets that unicode-char-sets does provide seem to be built on data that is extremely out-of-date. The header comment in unicode-char-sets.scm claims the tables were generated in 2007."	Zipheir
Milestone someday	1853	utf8 egg: Missing character type predicates	easy	extensions	5.4.0	defect		new	2025-07-07T16:58:15+02:00	2025-07-07T16:58:15+02:00	"The utf8 egg doesn't provide Unicode-aware versions of the R5RS character type predicates (`char-whitespace?`, etc.). The attached patch provides them; it is based on my updated version of the unicode-char-sets extension (see [http://bugs.call-cc.org/ticket/1851]). It can easily be modified to work with other versions of the egg by simply replacing the multiple char-set imports with `(import (unicode-char-sets))`.
"	zaifir
Milestone someday	1863	delete-file and delete-file* inconsistency	trivial	unknown	5.3.0	defect		new	2026-01-01T09:53:46+01:00	2026-01-01T09:53:46+01:00	"While trying to delete an invalid symbolic link file (for which the linked file is deleted), delete-file function succeeds, while delete-file* returns false.
I have conducted a research which showed me that file-exists? on such invalid link also returns false, as it calls stat, and, therefore, follows symbolic links.
I have prepared a patch which replaces stat with lstat. If that approach is not acceptable, I can try to fix it in a more preferred way.

How to reproduce:
$ touch some-file
$ ln -s some-file some-link
$ rm some-file
$ csi -e '(import (chicken file)) (print (file-exists? ""some-link""))'
"	fa11-1eaf
Milestone someday	1866	pretty-print and pp does not print UTF-8 characters		unknown	6.0.0	defect		new	2026-01-08T00:52:01+01:00	2026-01-08T00:52:01+01:00	"csi 6 (installed from https://code.call-cc.org/dev-snapshots/2025/10/25/chicken-6.0.0pre2.tar.gz):
Version 6.0.0pre2 (rev e4e9ea4d)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
(import (chicken pretty-print)) 
(pp ""été"")
=> ""\xe9;t\xe9;""

(pretty-print ""été"") has the same problem in Chicken 6, 

Unicode code point for é is U+00E9
(display ""\xe9;"") => é
(display ""é"" => é
both work. print and write also work fine.
Could it be that interpretations of backslashes is disabled ?

csi 5: 
Version 5.2.0 (rev 317468e4)
(import (chicken pretty-print)) 
(pp ""été"") 
=>  ""été""


"	Kirill Lisovskiy
Milestone someday	258	z3 egg improvements	medium	extensions		enhancement	Jim Ursetto	new	2010-05-29T07:48:59+02:00	2023-11-06T22:01:15+01:00	"z3 implements RFC1951 (deflate) and RFC1952 (gzip) but not RFC1950 (zlib), which is basically deflate + a header and adler32 checksum.  zlib format is used by some applications in lieu of a raw deflate stream -- for example, git objects are stored in this format.  The default python and ruby zlib compression functions read and write zlib format as well, relegating raw deflate to second class status.  That's probably because this is the standard behavior of libz itself, but support seems warranted.

Also as in closed ticket #82, the interface should be improved to be more agnostic to input or output source, allowing any format to be read or written to a port or string. Backward compatibility should be retained where possible.

"	Jim Ursetto
Milestone someday	1162	gethostbyname() is deprecated in favour of getaddrinfo()	easy	core libraries	4.9.x	enhancement		new	2014-10-13T22:34:36+02:00	2016-08-25T21:47:22+02:00	"The [http://lists.gnu.org/archive/html/chicken-users/2014-10/msg00007.html message by Moritz Wilhelmy] is copied below:

{{{
While building the OpenSuSE package for Chicken, I discovered the following:

[  473s] RPMLINT report:
[  473s] ===============
[  482s] chicken-runtime.i586: I: binary-or-shlib-calls-gethostbyname 
/usr/lib/libchicken.so.7
[  482s] The binary calls gethostbyname(). Please port the code to use 
getaddrinfo().
[  482s] 
[  482s] 5 packages and 0 specfiles checked; 0 errors, 0 warnings.
[  482s] 

(Full build log here: 
http://build.opensuse.org/package/live_build_log/home:mwilhelmy:chicken/chicken/openSUSE_12.3/i586
 )

Do you think it would be a good idea to port chicken to use getaddrinfo()
instead, not that it's top priority or anything? getaddrinfo is part of
POSIX.1-2001 so it should be present on most systems, while POSIX.1-2008
removes gethostbyname() from the specification altogether.
}}}"	Mario Domenech Goulart
Milestone someday	1176	Support capturing multiple value type in `forall`, etc.	medium	scrutinizer	4.9.x	enhancement		new	2015-01-12T06:08:45+01:00	2016-08-25T21:47:34+02:00	"As requested by alaricsp in [https://lists.nongnu.org/archive/html/chicken-users/2014-11/msg00016.html this thread], it would be nice if one could capture and refer to multiple-valued return types with `forall`, e.g.:

{{{
(: call-with-foo (forall (a) (foo (-> . a) -> . a)))

(define (call-with-foo foo thunk)
  ; do some stuff and return whatever thunk does,
  ; even if it's multi-valued:
  (thunk))
}}}

(The above is just a sketch, not necessarily the right way to express this..)"	evhan
Milestone someday	1215	Warn about too specific type declarations	hard	scrutinizer	4.10.x	enhancement		new	2015-08-25T21:57:46+02:00	2018-04-27T16:45:24+02:00	"The following program produces code that may segfault when compiled with specialization:

{{{
(: foo (-> string))

(define (foo) (read))

(print (string-ref (foo) 0))
}}}
{{{
$ csc -specialize foo.scm
echo '""foo""' | ./foo
f

$ echo 123 | ./foo             

Error: segmentation violation

	Call history:

	baz.scm:5: foo	  
	baz.scm:3: read	  	<--
}}}

I think the root cause is that the declared return type of {{{foo}}} is more specific than that of {{{read}}}. Perhaps this could be detected by the scrutinizer and warned about accordingly."	Moritz Heidkamp
Milestone someday	1310	feathers: show number of debug-events for each line	easy	core tools	4.11.0	enhancement	felix winkelmann	new	2016-08-10T14:07:54+02:00	2016-08-25T20:51:57+02:00	In the source-view, prefix each line with a count of debug-events that take place in that line.	felix winkelmann
Milestone someday	1311	"feathers: Implement ""Next"""	medium	core tools	4.11.0	enhancement		new	2016-08-11T14:46:03+02:00	2016-08-25T20:52:11+02:00	...which should execute in single-stepping mode until an event in the same source file occurs.	felix winkelmann
Milestone someday	1557	openssl load system certs	easy	extensions	4.13.0	enhancement	Jim Ursetto	assigned	2018-11-11T01:55:30+01:00	2021-04-12T20:17:53+02:00	"Patch attached to read the system default certs (configurable via parameter). It also removes (nullifies the action of) the default CA directory parameter because the default of /etc/ssl/certs only works on Debian based systems, and it doesn’t let you select a default certs.pem file anyway.

This is tested on OS X Sierra and should work fine on Debian and RedHat, please test. This lets henrietta-cache automatically work on OS X with Homebrew openssl, which it could not before, as the cert path was invalid."	Jim Ursetto
Milestone someday	1606	Add code to lfa2 for extinguishing SRFI-4 predicates	medium	scrutinizer	5.0.0	enhancement	felix winkelmann	assigned	2019-04-11T13:57:05+02:00	2023-11-06T23:06:07+01:00	"Now that we have inlineable procedures for SRFI-4 vector access, since #757, we should also add code to lfa2 to extinguish predicates for these vectors completely.

If possible, we should add unboxing for f32vectors and f64vectors, too."	sjamaan
Milestone someday	1702	Switch to srfi-115	medium	core libraries	5.2.0	enhancement		new	2020-07-10T09:46:12+02:00	2020-07-10T09:46:12+02:00	"We're currently using the irregex library, but srfi-115 is probably better-maintained as it's officially part of Chibi.  Also it's standardized, which is always nice.

As I understand it, SRFI-115 has complete feature parity with Irregex, including DFA compilation of submatches and full SRE support. However, IIRC there are tiny variations in the SRE dialect used by both libraries.

We should do some performance comparisons and check what the differences are. Then, if both are equally fast, provide a shim library so we can still support the irregex API as well as the srfi-115 API."	sjamaan
Milestone someday	1732	[zmq egg] barebones curve encryption suport	easy	extensions	5.2.0	enhancement	Moritz Heidkamp	assigned	2021-03-11T22:30:16+01:00	2021-03-12T08:14:57+01:00	"I've been fiddling around with zmq for a project of mine and needed encryption support, so I tried my hand at implementing the necessary socket options for curve encryption

Again, it's barebones, but authentication between two sockets seems to be working!

I'm attaching my modifications and some testing code

Cheers!"	Ariela Wenner
Milestone someday	1735	Strip away prefix when importing	medium	core libraries	5.2.0	enhancement		new	2021-03-16T16:41:56+01:00	2021-04-22T09:22:47+02:00	"I know we can easily add prefix when importing but some eggs already come with too much prefix on all of their procedures. Wouldn't it be pretty sweet if we could import sans them?

(import (sans filepath ""filepath:"") (sans irregex ""irregex-""))

I tried my jolly best to implement it in https://idiomdrottning.org/chicken-core

To support both sans and prefix at the same time (when you want to remove their prefix and add your own much cooler prefix) is left as an exercise for the reader. This just removes it for now."	Idiomdrottning
Milestone someday	1776	More scrutable bootstrapping process	insane	unknown	5.2.0	enhancement		new	2021-08-12T20:29:25+02:00	2021-08-12T20:29:25+02:00	"We currently have two ways to build CHICKEN:

* from release tarballs.  In that case we have the C code
  generated by CHICKEN. In this case, the only requirement to
  build CHICKEN is a supported C toolchain and GNU Make.  The C
  code in release tarballs is not really ""source"" code, as it can
  be considered inscrutable by most humans.

* from git. In this case we require a functional CHICKEN
  installation (i.e., binary format, compiled out of a release
  tarball -- see previous item) to compile Scheme code to C.

Currently the most scrutable way to build CHICKEN is using the C
code generated by CHICKEN to build CHICKEN.  But then, as
previously mentioned, we assume the C code we are compiling is
thrustworthy, which can hardly be assessed as the C code is the
output of a compiler, so very hard to follow.

This ticket is about improving this situation, so that we can build
CHICKEN from git in a way that the whole process is more scrutable.

References:

* http://issues.guix.gnu.org/22366 points out the issue reported
  in this ticket.

* https://bootstrappable.org/ has more information on the
  benefits of transparent bootstrapping processes.
"	Mario Domenech Goulart
Milestone someday	1798	No promise type.		core libraries	5.3.0	enhancement		new	2022-02-11T23:16:24+01:00	2023-11-06T23:39:46+01:00	Although promises are a Scheme type, `(chicken type)` does not provide a `promise` type.  What ''does'' work is `(struct promise)`, which seems like an abstraction leak.  Please expose a type for promises; even better, provide a parametric promise type, so that `(promise t)` is a type of delayed `t` values.	Zipheir
Milestone someday	1831	Use a parameter for the directory to be used by create-temporary-{file,directory}	easy	core libraries	6.0.0	enhancement		new	2024-01-02T21:01:54+01:00	2024-01-02T21:01:54+01:00	"Currently, {{{create-temporary-file}}} and {{{create-temporary-directory}}} use the value of the {{{TMPDIR}}}, {{{TMP}}} and {{{TEMP}}} environment variables to determine the directory where to create files/directories, falling back to {{{/tmp}}} if none of them is set.

Relying on environment variables to configure {{{create-temporary-file}}} and {{{create-temporary-directory}}} is not ideal, as changing those variables affect child processes as well.  A better configuration option would be a parameter."	Mario Domenech Goulart
Milestone someday	747	coops: integrate primitive type classes		extensions	4.7.x	task	felix winkelmann	new	2011-12-13T13:30:40+01:00	2023-11-06T22:01:33+01:00	"Currently this is a separate file since it was considered to be an optional feature and would save some space. I'm not sure if this is worthwhile and writing methods on primitive classes is something that can be considered fundamental. IMHO `coops-primitive-objects.scm` should simply be integrated into `coops.scm` (or better: `coops-module.scm`).
"	felix winkelmann
Milestone someday	752	test and document qt-light enhancements by satosi		extensions	4.7.x	task		new	2011-12-13T13:42:29+01:00	2023-11-06T22:01:48+01:00	"See branch `satosi-enhancements`.
"	felix winkelmann
Milestone someday	1476	(scrutinizer) Should global types be smashed in local contexts?		scrutinizer	5.0.0	task		new	2018-06-15T10:31:08+02:00	2023-11-06T23:08:34+01:00	"Currently types for globals are not smashed. Should they be smashed in, say functions?

Similar to #1475.

{{{
(define-type type (vector (or fixnum symbol)))
(: g type)
(define g (vector (the * 1)))

;; define pure alias, so printing doesn't smash
(: p (* --> undefined))
(define p print)

(define (foo)
  (compiler-typecase g (type (p ""global ok"")))
  (vector-set! g 0 'foo)
  (compiler-typecase g (type (p ""global not smashed"")))

  (let ([l g])
    (compiler-typecase l (type (p ""alias ok"")))
    (compiler-typecase l (type (p ""alias ok after printing"")))
    (vector-set! g 0 'foo)
    (compiler-typecase g (type (p ""global not smashed"")))
    (compiler-typecase l
      (type 'oop)
      ((vector *) (p ""alias smashed""))))

  (compiler-typecase g
    (type (p ""global not smashed""))
    ((vector *) (p ""global smashed""))))
(foo)

;; $ csc -O3 global-smashing.scm && ./global-smashing 
;; global ok
;; global not smashed
;; alias ok
;; alias ok after printing
;; global not smashed
;; alias smashed
;; global not smashed

}}}"	megane
Milestone someday	1820	Clean up C preprocessor macros	easy	core libraries	5.3.0	task		new	2023-06-03T11:13:11+02:00	2023-11-06T21:39:41+01:00	"We can replace `C_externimport` and `C_externexport` with `C_extern`.
Also, `C_fcall` can be removed. Possibly also `C_regparm` and `C_ccall` as these refer to obsolete features.

`C_TLS` was never used and should go.

Note: `C_externimport` and `C_externexport` are produced bz the compiler, so need to be retained for at least one release."	felix winkelmann
Milestone someday	1155	values and the scrutinizer	medium	scrutinizer	4.9.x	defect		new	2014-09-19T00:37:12+02:00	2016-08-25T21:48:08+02:00	"The scrutinizer complains a little when faced with values under certain circumstances.  Here are some examples:

{{{
$ echo '(module val () (import scheme) (values))' > val.scm

$ csc val.scm

Warning: at toplevel:
  expected in `let' binding of `t10' a single result, but were given zero results
}}}

{{{
$ echo '(module val () (import chicken scheme) (and-let* ((#t)) (values)))' > al.scm

$ csc al.scm

Warning: at toplevel:
  branches in conditional expression differ in the number of results:

(if #t (values) #f)
}}}

Of course, those warnings make sense, but I wonder if there is anything we can do to improve that situation."	Mario Domenech Goulart
Milestone someday	1351	syntax-rules has difficulty handling ellipsis in some cases?	easy	expander	5.0.0	defect	sjamaan	new	2017-03-10T10:59:09+01:00	2023-11-14T18:50:10+01:00	"As [http://lists.nongnu.org/archive/html/chicken-users/2017-03/msg00003.html reported by Sascha Ziemann], this macro application fails while it ought to succeed:

{{{
(define-syntax define-facts
  (syntax-rules ()
    ((_ (name a0 a1 ...) ((v00 v01 ...) (v10 v11 ...) ...))
     '(define (name a0 a1 ...)
        (conde
          ((== a0 v00) (== a1 v01) ...)
          ((== a0 v10) (== a1 v11) ...)
          ...)))))
}}}

The failing application:

{{{
(define-facts (fathero f c)
  ((""Abraham"" ""Ismael"")
   (""Abraham"" ""Isaac"")
   (""Isaac""   ""Jacob"")
   (""Jacob""   ""Benjamin"")))
}}}

A few other Schemes have difficulty with it, notably Chibi, Gauche, Scheme48 and Gambit (the former two returning the wrong result and the latter two giving an error).  Racket, MIT, Ikarus and Guile work fine."	sjamaan
Milestone someday	1485	"edit of wiki entries - specific ""Description of your changes"" leads to error"		wiki		defect		new	2018-07-12T11:29:39+02:00	2018-07-12T11:29:39+02:00	"Steps to reproduce (anonymous user - I created my user page for testing purposes):

1. https://wiki.call-cc.org/users/martin-schneeweis?action=edit

2. Any change in ""Article contents""

3. ""Description of your changes"" - copy-paste the following 2 lines

{{{
use cells -> use simple-cells
examples: added missing object-type-declarations and comments
}}}

4. Spam-Control-Math

5. Save

==>

{{{
Error! Something went wrong while storing your changes. 
Please try again. If this error keeps up, please notify a system administrator 
about it.
}}}
"	snoewchen
Milestone someday	1731	Lowdown some minor issues		extensions	5.1.0	defect	Moritz Heidkamp	assigned	2021-03-11T15:43:30+01:00	2021-04-14T21:16:03+02:00	"These are already fixed and on their way to upstream, but just in case someone else has the same problems.

I changed one cons to be one append (in tight lists only);
the bug was that

	(pp (markdown->sxml ""* like this""))

produced

	(ul (li (""like"" "" "" ""this"")))

instead of, what it does now,

	(ul (li ""like"" "" "" ""this""))

This also fixes nested lists too, when you have a new bullet list or
ordered list inside the item.

The other problem was that it believed <html> to be an in line element
so <html><body>hi</body></html> did not work while <html> in an <i> or
something worked. Just adding html among the block elements worked as
a workaround but then <blockquote><html>hi</html></ blockquote> worked
(it already did so that wasn't a regression. Just not right). So now
it's a root element, it's own thing basically.

My repo with these fixes are at https://idiomdrottning.org/lowdown"	Idiomdrottning
Milestone someday	776	shared lib link arguments in makefile are not transmitted to eggs	medium	build system	4.7.x	enhancement		new	2012-01-13T09:56:02+01:00	2023-11-06T21:59:16+01:00	"Linker options for shared libraries are all hardcoded in csc (or passed in via CSC_OPTIONS) -- any options set in the Makefile, e.g. via LINKER_LINK_SHARED_DLOADABLE_OPTIONS, are not honored.

Specifically, on OS X, the {{{-headerpad 128}}} option is used to reserve extra space for {{{install_name_tool}}} to do its work.  Without it, egg installation may fail once the Chicken PREFIX gets too long.

The current workaround is to set {{{CSC_OPTIONS='-Wl,-headerpad -Wl,128'}}} prior to calling {{{chicken-install}}}.

It might be nice to add variables into the makefile which are accessible by csc and used to provide default link options to eggs.  This should also allow some of the hardcoded options in csc to be moved out into the Makefiles."	Jim Ursetto
Milestone someday	777	unix-sockets: implement FD sending and receiving	easy	extensions	4.7.x	enhancement	felix winkelmann	assigned	2012-01-13T22:37:20+01:00	2023-11-06T22:02:03+01:00	Unix domain sockets allow sending and receiving FDs through them. It would be nice to add this functionality to the unix-sockets egg. Ruby has a pretty convenient implementation of this, maybe it could be used as a reference. See [http://apidock.com/ruby/UNIXSocket/send_io] and [http://apidock.com/ruby/UNIXSocket/recv_iop].	Moritz Heidkamp
Milestone someday	809	allow to specify argument-type enforcement in type signatures	medium	compiler	4.7.x	enhancement	felix winkelmann	assigned	2012-04-07T12:48:53+02:00	2023-11-06T22:02:21+01:00	"For example: `T1 ... ->! T2 ...` could specify a procedure type that is ""enforcing""."	felix winkelmann
Milestone someday	1020	matchable: Add conversion pattern(s)		extensions	4.8.x	enhancement	Alex Shinn	accepted	2013-07-12T10:48:47+02:00	2013-07-13T11:49:34+02:00	"The attached patch adds two new pattern types to matchable:

   {{{(-> convert pat-1 … pat-n)}}}
   {{{(-?> convert pat-1 … pat-n)}}}

These patterns work like the {{{(? predicate pat-1 … pat-n)}}} pattern
in that {{{convert}}} must be an expression evaluating to a single
argument function which is applied to the corresponding
value. However, in contrast to {{{?}}}, the following patterns
{{{pat-1 … pat-n}}} are applied to the value _returned_ by
{{{convert}}}. In addition, {{{-?>}}} only matches when {{{convert}}}
does not return {{{#f}}}, so it can be expressed as combination of
{{{->}}} and {{{?}}} like this:

  {{{(-> convert (? (lambda (x) x) pat-1 … pat-n))}}}

The rationale is that it allows to match against a converted value and
at the same time being able to bind that value to a variable instead
of having to apply the conversion again in the body. One might argue
that {{{-?>}}} is not really necessary so I'd be happy with only
adding {{{->}}}, too. It should be noted that this patch is not
backwards compatible.


Some examples:

{{{
(match '(""foo"" ""10"")
  ((""foo"" (-> string->number x)) (+ x x)))

;; => 20


(match '(""foo"" ""bar"")
  ((""foo"" (-> string->number x)) (+ x x)))

;; Error: (+) bad argument type: #f


(match '(""foo"" ""10"")
  ((""foo"" (-?> string->number x)) (+ x x))
  (else 'nothing))

;; => 20


(match '(""foo"" ""bar"")
  ((""foo"" (-?> string->number x)) (+ x x))
  (else 'nothing))

;; => nothing
}}}"	Moritz Heidkamp
Milestone someday	1061	syntax-rules should be able to automatically determine implicit exports	hard	expander	4.8.x	enhancement		new	2013-11-08T11:42:23+01:00	2016-08-25T21:31:33+02:00	"Given a module which exports some syntax which expands to an identifier which isn't explicitly exported and isn't itself a syntax identifier, implciit export of that identifier doesn't work:

{{{
;;; foo.scm

(module foo

(some-syntax)

(import scheme)

(define (some-implicitly-used-procedure x)
  (list x))


(define-syntax some-syntax
  (syntax-rules ()
    ((_ x)
     (some-implicitly-used-procedure 'x))))

)
}}}

To trigger the error:

{{{
$ csc -s -J foo.scm
$ csi -R foo -p '(some-syntax bar)'
  
Error: unbound variable: some-implicitly-used-procedure
}}}

As can be witnessed in #1060, it works fine for implicitly exported syntax."	Moritz Heidkamp
Milestone someday	1134	with-input-from-pipe should be rewritten so it does not block	hard	core libraries	4.9.x	enhancement		new	2014-06-25T12:05:56+02:00	2016-08-25T21:48:19+02:00	"The current implementation of with-input-from-pipe is straightforward and uses the underlying POSIX functions popen and pclose.

However the usage of pclose will wait for the child process of the pipe to exit and thus will hang the whole chicken process.

This gets in the way if threading is used.

Therefore it should be implemented in a way that we explicitly wait for the SIGCHLD to arrive in the scheduler. Maybe a thread-wait-for-signal mechanism needs to be implemented.

This will complicate a lot of things so I will put this on the back burner for now."	Christian Kellermann
Milestone someday	1384	Simplify resolution of include/extend/types/inline/extension files		compiler	5.0.0	enhancement		new	2017-07-05T11:47:45+02:00	2017-07-05T11:47:45+02:00	"There are currently a bunch of different implementations of ""file resolution"", many of which amount to the same thing and some of which seem to be (mis|ab)used in certain places. It would be good to audit these and simplify things where possible.

At a glance, {{{load-identifier-database}}} and {{{load-types-file}}} both have their own logic for locating files; {{{##sys#find-extension}}} is similar to these in that it searches the working directory and the repository, but also considers ""setup-mode"" (speaking of which, is this still necessary with the new egg system?) and the include path when looking for import libraries; and then there's {{{##sys#resolve-include-filename}}}, which is being used for include, extend, and inline files. This one is pretty complex and has a somewhat confusing signature. It would also be worth investigating whether {{{##sys#canonicalize-extension-path}}} is really necessary wherever it appears."	evhan
Milestone someday	1439	Add switch to csi to set initial module	medium	core tools	5.0.0	enhancement		new	2018-01-03T06:42:39+01:00	2018-01-24T21:43:09+01:00	"Add a command line option to csi to specify the starting module, similar to Chibi's ""-x"" switch. This would be equivalent to running csi interactively and immediately using "",m <module>"", but could be used with non-interactive scripts, for example."	evhan
Milestone someday	1445	Support parameterised hash table type declarations	medium	scrutinizer	5.0.0	enhancement		new	2018-02-19T06:40:05+01:00	2018-02-22T20:46:21+01:00	"As suggested by megane on [https://lists.nongnu.org/archive/html/chicken-hackers/2018-02/msg00008.html chicken-hackers].

Support specifying the types of hash table keys and values:

{{{
(define t (the (hash-table fixnum symbol) ...))

(hash-table-ref t 'foo) ; warning ""expected argument #2 of type `fixnum' but was given an argument of type `symbol'""

(hash-table-ref t 42) ; result would be known to be a symbol
}}}

And so on."	evhan
Milestone someday	1446	Implement contravariant type checking for procedure types		scrutinizer	5.0.0	enhancement		new	2018-02-20T16:40:45+01:00	2023-11-06T23:09:25+01:00	"Consider list types `A = (list foo)` and `B = (list bar)`. In functions where list of type `A` is expected you can give list of type `B` if `bar` is more specific (or  of same type) than `foo`. For example `foo` could be `(or fixnum string)` and `bar` be `fixnum`.

Now consider procedure types `F = (t1 -> *)` and `H = (t2 -> *)`. In functions where a function parameter of type `F` is expected you can give function of type `H` if `t2` is more '''general''' than `t1`. For example, if `t2` is `(or fixnum string)` and `t1` is `string`.

Here is an example where the scrutinizer can't tell anything is wrong:
{{{
(define-type dog (vector string))
 (define-type cat (vector fixnum string))
 (define-type animal (or cat dog))
 
 (: make-dog (-> dog))
 (define (make-dog)
   (vector ""woof""))
 (define (dog? a)
   (= 1 (vector-length a)))
 
 (: make-cat (-> cat))
 (define (make-cat)
   (vector 0 ""meow""))
 (define (cat? a)
   (= 2 (vector-length a)))
 
 (: animal-print (animal -> *))
 (define (animal-print a)
   (cond
    [(dog? a) (dog-print a)]
    [(cat? a) (cat-print a)]))
 
 (: dog-print (dog -> *))
 (define (dog-print d)
   (print ""dog says "" (vector-ref d 0)))
 
 (: cat-print (cat -> *))
 (define (cat-print c)
   (print ""cat says "" (vector-ref c 1)))
 
 (: apply-printer (forall (T) ((T -> *)  T -> *)))
 (define (apply-printer pr e)
   (pr e))
 
 (: print-animals ((animal -> *) (list-of animal) -> *))
 (define (print-animals pr animals)
   (for-each pr animals))
 
 ;; (apply-printer cat-print (make-dog)) ; warns ok
 
 ;; (print-animals animal-print (list (make-dog) (make-cat))) ; works ok
 
 ;; doesn't warn, but fails at runtime
 (print-animals cat-print (list (make-cat) (make-dog)))
 
 ;; $ csc -O3 vector-contravariant.scm  && ./vector-contravariant
 ;; cat says meow
 ;; 
 ;; Error: (vector-ref) out of range
 ;; #(""woof"")
 ;; 1
 ;; 
 ;;  Call history:
 ;; 
 ;;  vector-contravariant.scm:44: print-animals    
 ;;  vector-contravariant.scm:36: g30      
 ;;  vector-contravariant.scm:29: print    
 ;;  vector-contravariant.scm:36: g30   
}}}"	megane
Milestone someday	1471	[types] Enforce parameter types on specialization	medium	scrutinizer	5.0.0	enhancement		new	2018-06-06T09:02:43+02:00	2018-06-06T09:02:43+02:00	"Currently no enforcing happens if specialization takes place.

Here's a case from scrutiny-tests.
Note that scheme#+ has a specialization for parameters (* *).
When using `-A` flag no specialization takes place, so the enforcing happens.

In this example you'd like to have the type for `x` to be enforced to `number` after the `if`.

{{{
;; noreturn conditional branch enforces ""number"" on x
(define (foo2 x)
  (if (string? x) (error ""foo"") (+ x 3))
  (string-append x ""abc""))

;; $ csc -O3 enforce-fail.scm
;;
;; Warning: in toplevel procedure `foo2':
;;   (enforce-fail.scm:7) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `(not string)'

;; $ csc -A enforce-fail.scm
;;
;; Warning: in toplevel procedure `foo2':
;;   (enforce-fail.scm:7) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number'
}}}"	megane
Milestone someday	1657	"It would be nice if glob ""/*/*"" worked"	easy	core libraries	5.1.0	enhancement		new	2019-11-27T23:21:38+01:00	2021-08-29T21:19:25+02:00	Per [https://lists.nongnu.org/archive/html/chicken-users/2019-11/msg00013.html an email] from Matt Welland.	evhan
Milestone someday	1749	Parallelize CHICKEN core tests	medium	build system		enhancement		new	2021-04-18T00:02:43+02:00	2021-04-18T00:02:43+02:00	"= What?

This ticket is meant to be the place to discuss everything related to the parallelization of the (current) CHICKEN core tests (`make check`). It's not a ""please do this"" ticket! I'm willing to work on it.

I'd like to know if there's any interest in it, so please share your opinions, thoughts, and ideas!

= Why?

The tests take the majority of the time of the whole build process. On my desktop:

 * Build: ~3m32s (1 CPU); ~2m25s (2 CPUs); ~2m12s (3 CPUs); ~2m8s (4 CPUs)
 * Test: ~7m38s
 * Install: ~2m19s

On my RBPi2 the whole process takes hours -- I usually leave it running over night. On my RBPi4 it takes around 45min, which is not so bad, I'm still impressed with it, but ""I want it all, and I want it now""! This is actually my biggest incentive, because of the salmonella tests.

megane said on IRC that there's been some talk about rewriting the tests in Scheme, but that it's not for the near future, which I can understand. However, I think parallelizing the current tests should be pretty maneagable, and quicker than rewritting them in Scheme (a guess before actually putting my hands to work, of course), so we could take advantage of those in the meantime.

= How?

Assuming that there's interest, I'd like to know what others think -- ideas on how to implement, and how not to implement the tests. Related, I'd also like to know what's OK, and what isn't -- file structure, file names, number of new files in the repository, files created by the tests, etc.

Now, my current idea/plan: Keep everything contained in the `tests/` directory, as it is now. Have a script for each test -- one for ""repository search path"", one for ""types.db consistency"", etc. Have an ""environment"" script that sets up the environment variables (`CHICKEN`, `CHICKEN_PROFILE`, ...), commands (`compile`, `compile_r`, ...), etc, to be used by each of the previously mentioned scripts. Have a Make target for each test, so the actual parallelization is managed by Make. Each test script should return the usual 0 for OK, and !0 for !OK, so that Make works correctly.

The first obvious problem is the tests' output. Right now, since they're sequential, everything is printed to stdout, and all is fine. But running in parallel that's not an option. My first idea to solve this was to save the output of each test script to a test-specific output file.

And the last thing I'm wondering about is whether having a test-specific directory inside `tests/` is worth it or not. This is mainly to unclutter the `tests/` directory, due to the tests' output files.

That's all I have for now! Hopefully I didn't miss anything stupidly obvious...
"	siiky
Milestone someday	1762	Maybe/Just Int checker in Silex compilation		scrutinizer	5.2.0	enhancement		reopened	2021-06-06T07:09:14+02:00	2021-06-06T18:04:50+02:00	"When chicken-install silex I get this

Warning: Invalid argument
  In file `silex.scm:472',
  In module `silex',
  In procedure `digraph',
  In procedure `store-final338',
  In procedure `loop',
  In procedure call:

    (scheme#vector-set! prio voisin infinity)

  Argument #2 to procedure `vector-set!' has an invalid type:

    false

  The expected type is:

    fixnum

  This is the expression:

    voisin

  Procedure `vector-set!' from module `scheme' has this type:

    (vector fixnum * -> undefined)

In the code, the index value ""voisin"" is derived from a vector-ref call on another vector that's initialized with #f's but populated by fixnums (hopefully? I didn't fully analyze the code here…) before being referenced.

So probably one of two things are going on:

The silex code is bugged and the variable won't be a fixnum in time (in which case this is is a serious bug in silex), or (what I believe is more likely)

The type-checking code is mislabeling the situation here. It doesn't know that it'll be an int in time. This is just an, uh, ""cosmetic"" bug in core, which is how I'm labeling it. Or I'm wrong and it's instead a serious bug in exts (silex)."	Idiomdrottning
Milestone someday	1767	patch to port the netstring egg to CHICKEN 5	trivial	extensions	5.2.0	enhancement	Moritz Heidkamp	assigned	2021-06-22T12:29:11+02:00	2022-10-21T16:00:33+02:00	"I needed to be able to talk to something that speaks netstrings,
so I ported the netstring egg to CHICKEN 5.
The patch is attached."	Christopher Brannon
Milestone someday	1848	cairo: quality of life improvements for matrix operations	easy	extensions	5.4.0	enhancement		new	2025-01-02T19:34:44+01:00	2025-01-02T19:34:44+01:00	I've tried to manipulate a font matrix with cairo and failed. This seems to be due to that part of the interface being half-finished (text/font extents use records, matrices use f64vectors for some reason?), so I rewrote it to use records, exposed accessors and {{{cairo_get_font_matrix}}}. I've attached a small test program as well which exercises this feature set.	Vasilij Schneidermann
Milestone someday	1860	overwrite-error in chicken-install should identify egg	medium	core tools	6.0.0	enhancement		new	2025-08-20T10:07:58+02:00	2025-08-20T10:07:58+02:00	When an egg installation would overwrite already installed files from another egg, it should show the offending egg in the error message.	felix winkelmann
