bugMIT/GNU Scheme - Bugs: bug #64799, Messages about free references in...

 
 

bug #64799: Messages about free references in libraries include extra identifiers

Submitter:  Arthur A. Gleckler <aag>
Submitted:  Fri 20 Oct 2023 05:35:46 AM UTC
   
 
Category:  runtime Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  cph Originator Name: 
Open/Closed:  Open
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 20 Oct 2023 11:04:27 PM UTC, comment #5: 

comment #4:

> OK, fix is pushed. Please try at your convenience.


That's far better.  The list of warnings is much smaller this time.  That's partly because I've fixed bunch of missing imports that were reported before this fix, but also because, at least in my quick scan, no false reports this time.

Also, I reverted the changes I made to reorder the code to get around the ;Can't define name; already free:" errors.  Those errors don't happen any more.

Thanks!

Arthur A. Gleckler <aag>
Group Member
Fri 20 Oct 2023 07:10:33 PM UTC, comment #4: 

OK, fix is pushed. Please try at your convenience.

Chris Hanson <cph>
Group administrator
Fri 20 Oct 2023 07:05:22 PM UTC, comment #3: 

It could be related.

I've checked in, but not pushed, a fix for this bug. I'd appreciate hearing if it affects the other problem you're seeing.

Chris Hanson <cph>
Group administrator
Fri 20 Oct 2023 06:50:48 PM UTC, comment #2: 

I'm not sure whether it's related, but I also got lots of ";Can't define name; already free:" errors in code that had been working before.  Reordering definitions worked around this problem.  It alwayas happened when a macro referred to a binding that hadn't yet been defined in the same file.

Arthur A. Gleckler <aag>
Group Member
Fri 20 Oct 2023 06:35:36 PM UTC, comment #1: 

I think this is a consequence of the environment probes that syntax-rules does to determine the role of its identifiers.

Chris Hanson <cph>
Group administrator
Fri 20 Oct 2023 05:35:46 AM UTC, original submission:  

Compiling a library that includes the syntax definition below results in a "has free references not provided by imports:" that includes many extraneous identifiers.


(define-syntax define-test-group
  (syntax-rules ()
    ((_ test-group-name
        test-procedure
        row ...)
     (let ((procedure test-procedure))
       (install-test-group! 'test-group-name
                            (list
                             (make-unit-test
                              (append 'test-group-name row)
                              (lambda () (apply procedure row)))
                             ...))))))


Here's the message:


Library (unit-test) has free references not provided by imports: (row test-group-name test-procedure procedure expression test-name)


Note that the macro's arguments and its local bindings are included, which is probably not the intent.

Arthur A. Gleckler <aag>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cph (Posted a comment)
  • -email is unavailable- added by aag (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-20 aag StatusNone Fixed
    2023-10-20 cph CategoryNone runtime
        Assigned toNone cph

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code