cisco / ChezScheme

Chez Scheme
Apache License 2.0
6.99k stars 987 forks source link

fix incorrect wrapping in quote-syntax #867

Closed mnieper closed 1 month ago

mnieper commented 2 months ago

This fixes issue #861.

The mistake was an incorrect application of a wrap.

burgerrg commented 2 months ago

Thank you for finding and fixing this bug! Please add a subsection to the release notes under section:bugfixes for this.

burgerrg commented 2 months ago

Did you intend to update the zlib & zuo submodules? I'd prefer to see those kinds of updates in separate pull requests.

mnieper commented 2 months ago

Did you intend to update the zlib & zuo submodules?

I didn't. Thanks for catching this.

mnieper commented 2 months ago

Thank you for finding and fixing this bug! Please add a subsection to the release notes under section:bugfixes for this.

I missed that. There is now a subsection about the bug in my patch.

burgerrg commented 2 months ago

The fix to the submodule update didn't resolve it, so I took the liberty of rewriting history on your branch to eliminate the submodule updates in the first place.

mflatt commented 1 month ago

When I add just the test here, unpatched Chez Scheme still passes. Maybe I'm confused, but I think it's because the bug is related to annotations, and .ms files are loaded in that way that doesn't get them. If that's right, here's a test that explicitly constructs annotations and fails for me before and passes after.


   (let ([src (make-source-object
               (make-source-file-descriptor "src" (open-bytevector-input-port '#vu8()))
               1
               2)])
     (identifier?
      (eval
       (make-annotation `(quote-syntax
                          ,(make-annotation
                            'if
                            src
                            'if))
                        src
                        '(quote-syntax if)))))