Changeset 12609 in project for chicken


Ignore:
Timestamp:
11/27/08 09:23:01 (12 years ago)
Author:
felix winkelmann
Message:
  • updated NEWS and chicken-install.1
  • added import suggestion to compiler using modules.db
  • renamed db file to "modules.db"
Location:
chicken/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/NEWS

    r12596 r12609  
    22
    33- removed custom declarations and "link-options" and "c-options" declarations
    4 - deprecated "-quiet"
     4- deprecated "-quiet" option to "chicken" program
    55- added "-update-db" option to chicken-install
    6 
    7 4.0.0x
     6- the compiler now suggests possibly required module-imports
     7
     84.0.0x2
     9
     10- moved non-standard syntax-definitions into "chicken-syntax" library unit
     11- the pretty-printer prints the end-of-file object readably now
     12- alternative conditional execution paths have separate allocation computation
     13  (previously the allocation of all alternatives was coalesced)
     14- removed unused "%kmp-search" from "srfi-13" library unit
     15- expander handles syntax-reexports and makes unexported syntax available
     16  for exported expanders in import libraries
     17- added checks in some procedures in the the "tcp" library unit.
     18
     194.0.0x1
    820
    921- the macro system has been completely overhauled and converted
  • chicken/trunk/TODO

    r12596 r12609  
    1313*** dirty-macros.scm loops when using `defile'
    1414    possibly due to unrenamed special forms
     15*** slow
    1516
    1617** modules
     
    7374
    7475** build
     76*** running "chicken-install -u" may be problematic with changed DESTDIR
    7577*** rules.make should really be generated by a script
    7678*** need script to process import libraries for generating indices for doc.callcc.org
  • chicken/trunk/chicken-install.1

    r12247 r12609  
    8080
    8181.TP
     82.B \-u,\ \-update
     83Scan all installed import libraries and generate module database file.
     84
     85.TP
    8286.B \-r,\ \-retrieve
    8387Only fetch the extensions, do not install them.
  • chicken/trunk/chicken-install.scm

    r12596 r12609  
    8989  (define *default-transport* 'http)
    9090
     91  (define-constant +module-db+ "modules.db")
     92  (define-constant +defaults-file+ "setup.defaults")
     93
    9194  (define (load-defaults)
    92     (let ((deff (make-pathname (chicken-home) "setup.defaults")))
     95    (let ((deff (make-pathname (chicken-home) +defaults-file+)))
    9396      (cond ((not (file-exists? deff)) '())
    9497            (else
     
    293296        (remove-directory tmpdir))))
    294297
    295   (define (update-db files)
    296     (let* ((files (if (null? files)
    297                       (glob (make-pathname (repository-path) "*.import.*"))
    298                       files) )
    299            (dbfile (make-pathname (repository-path) "db")))
     298  (define (update-db)
     299    (let ((files (glob (make-pathname (repository-path) "*.import.*")))
     300          (dbfile (make-pathname (repository-path) +module-db+)))
    300301      (fluid-let ((##sys#warnings-enabled #f))
    301302        (for-each
     
    319320              (lambda (e1 e2)
    320321                (string<? (symbol->string (car e1)) (symbol->string (car e2)))))))
    321         (with-output-to-file (make-pathname (repository-path) "db")
     322        (with-output-to-file (make-pathname (repository-path) +module-db+)
    322323          (lambda ()
    323324            (for-each (lambda (x) (write x) (newline)) db))))))
     
    342343       -password PASS           set password for transports that require this
    343344  -i   -init DIRECTORY          initialize empty alternative repository
    344   -u   -update-db [FILENAME ...]  update export database
     345  -u   -update-db               update export database
    345346EOF
    346347);|
     
    350351
    351352  (define (main args)
    352     (let ((defaults (load-defaults)))
     353    (let ((defaults (load-defaults))
     354          (update #f))
    353355      (let loop ((args args) (eggs '()))
    354356        (cond ((null? args)
    355                (when (null? eggs)
    356                  (let ((setups (glob "*.setup")))
    357                    (cond ((pair? setups)
    358                           (set! *eggs+dirs*
    359                             (append
    360                              (map (lambda (s) (cons (pathname-file s) ".")) setups)
    361                              *eggs+dirs*)))
    362                          (else
    363                           (print "no setup-scripts to process")
    364                           (exit 1))) ) )
    365                (unless defaults
    366                  (unless *default-transport*
    367                    (error "no default transport defined - please use `-transport' option"))
    368                  (unless *default-location*
    369                    (error "no default location defined - please use `-location' option")))
    370                (install (reverse eggs)))
     357               (cond (update (update-db))
     358                     (else
     359                      (when (null? eggs)
     360                        (let ((setups (glob "*.setup")))
     361                          (cond ((pair? setups)
     362                                 (set! *eggs+dirs*
     363                                   (append
     364                                    (map (lambda (s) (cons (pathname-file s) ".")) setups)
     365                                    *eggs+dirs*)))
     366                                (else
     367                                 (print "no setup-scripts to process")
     368                                 (exit 1))) ) )
     369                      (unless defaults
     370                        (unless *default-transport*
     371                          (error "no default transport defined - please use `-transport' option"))
     372                        (unless *default-location*
     373                          (error "no default location defined - please use `-location' option")))
     374                      (install (reverse eggs)))))
    371375              (else
    372376               (let ((arg (car args)))
     
    407411                        (exit 0))
    408412                       ((or (string=? arg "-u") (string=? arg "-update-db"))
    409                         (update-db (cdr args))
    410                         (exit 0))
     413                        (set! update #t)
     414                        (loop (cdr args) eggs))
    411415                       ((or (string=? arg "-i") (string=? arg "-init"))
    412416                        (unless (pair? (cdr args)) (usage 1))
  • chicken/trunk/compiler.scm

    r12596 r12609  
    848848                                                  (compiler-warning
    849849                                                   'syntax
    850                                                    "module `~s' does not begin with `import' form - maybe unintended?"
     850                                                   "module body of `~s' does not begin with `import' form - maybe unintended?"
    851851                                                   name))
    852852                                                (loop
  • chicken/trunk/expand.scm

    r12595 r12609  
    15781578                                        id) )
    15791579                                      (else (##sys#module-rename id name)))))))
    1580                        (loop (cdr xl)))))))))
     1580                       (loop (cdr xl))))))))
     1581         (suggest '()))
     1582    (define (join lst)
     1583      (string-append
     1584       (symbol->string (car lst))
     1585       (let loop ((lst (cdr lst)))
     1586         (if (null? lst)
     1587             ""
     1588             (string-append " " (symbol->string (car lst)) (loop (cdr lst)))))))
    15811589    (for-each
    15821590     (lambda (u)
    15831591       (unless (memq u elist)
    1584          (##sys#warn "reference to possibly unbound identifier" u)))
     1592         (##sys#warn "reference to possibly unbound identifier" u)
     1593         (and-let* ((a (##sys#get u '##core#db)))
     1594           (let ((m (cadr a)))
     1595             (unless (memq m suggest)
     1596               (set! suggest (cons m suggest)))))))
    15851597     (module-undefined-list mod))
     1598    (when (pair? suggest)
     1599      (##sys#warn
     1600       (string-append
     1601        "suggesting to add `(import "
     1602        (join suggest)
     1603        ")' to module `"
     1604        (symbol->string name)
     1605        "'")))
    15861606    (let* ((exports
    15871607            (map (lambda (exp)
  • chicken/trunk/rules.make

    r12585 r12609  
    10551055        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_UNINSTALL_PROGRAM)
    10561056        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_STATUS_PROGRAM)
     1057endif
     1058ifneq ($(CROSS_CHICKEN),1)
     1059ifeq ($(DESTDIR),)
     1060        $(DESTDIR)$(IBINDIR)/$(CHICKEN_INSTALL_PROGRAM) -update-db
     1061endif
    10571062endif
    10581063endif
Note: See TracChangeset for help on using the changeset viewer.