Changeset 11989 in project


Ignore:
Timestamp:
09/24/08 09:33:35 (11 years ago)
Author:
felix
Message:

added srfi-98 support, chicken-install should handle core library units as dependencies (untested)

Location:
chicken/branches/hygienic
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/TODO

    r11967 r11989  
    5353*** handle redirects in http-fetch
    5454*** connect timeout and alternative download location
    55 *** only download tests on demand (-test option)
    56 **** implemented - test
    5755** chicken-install
    58 *** handle needs/depends of builtin extension
    5956*** should cache extension-info
    6057    necessary?
    61 ** henrietta
    62 *** parameter "tests=BOOL" controls whether tests should be downloaded
    63 **** implemented - test
    6458
    6559* documentation
     
    8276
    8377* eggs
    84 ** numbers
    85    segfaults - something wrong with finalization, may be related to
    86    warning on compilation
    87    (might be fixed with force-finalizers not imported - test with optimizations on)
    88 ** test sassy (needs henrietta+test thing!, also convert to proper module)
    89 ** port javahack
     78** sassy: convert to proper module
     79** port javahack, fps
  • chicken/branches/hygienic/chicken-install.scm

    r11961 r11989  
    8383        '()))
    8484
     85  (define (ext-version x)
     86    (cond ((or (eq? x 'chicken)
     87               (equal? x "chicken")
     88               (member (->string x) ##sys#core-library-modules))
     89           (chicken-version) )
     90          ((extension-information x) =>
     91           (lambda (info)
     92             (and-let* ((a (assq 'version info)))
     93               (->string (cadr a)))))
     94          (else #f)))
     95
    8596  (define (outdated-dependencies meta)
    8697    (let ((ds (append
    87               (deps 'depends meta)
    88               (deps 'needs meta)
    89               (if *run-tests* (deps 'test-depends meta) '()))))
     98               (deps 'depends meta)
     99               (deps 'needs meta)
     100               (if *run-tests* (deps 'test-depends meta) '()))))
    90101      (let loop ((deps ds) (missing '()) (upgrade '()))
    91102        (if (null? deps)
     
    95106              (cond ((or (symbol? dep) (string? dep))
    96107                     (loop rest
    97                            (if (or (eq? 'chicken dep)
    98                                    (equal? "chicken" dep)
    99                                    (extension-information dep))
     108                           (if (ext-version dep)
    100109                               missing
    101110                               (cons (->string dep) missing))
     
    103112                    ((and (list? dep) (= 2 (length dep))
    104113                          (or (string? (car dep)) (symbol? (car dep))))
    105                      (let ((info (extension-information (car dep))))
    106                        (if info
    107                            (let ((v (assq 'version info)))
    108                              (cond ((not v)
    109                                     (warning "installed extension has unknown version - assuming it is outdated"
    110                                              (car dep))
    111                                     (loop rest missing
    112                                           (alist-cons
    113                                            (->string (car dep))
    114                                            (->string (cadr dep))
    115                                            upgrade)))
    116                                    ((version>=? (->string (cadr dep)) (->string (cadr v)))
    117                                     (loop rest missing
    118                                           (alist-cons
    119                                            (->string (car dep)) (->string (cadr dep))
    120                                            upgrade)))
    121                                    (else (loop rest missing upgrade)))))))
     114                     (let ((v (ext-version (car dep))))
     115                       (cond ((not v)
     116                              (warning
     117                               "installed extension has unknown version - assuming it is outdated"
     118                               (car dep))
     119                              (loop rest missing
     120                                    (alist-cons
     121                                     (->string (car dep))
     122                                     (->string (cadr dep))
     123                                     upgrade)))
     124                             ((version>=? (->string (cadr dep)) v)
     125                              (loop rest missing
     126                                    (alist-cons
     127                                     (->string (car dep)) (->string (cadr dep))
     128                                     upgrade)))
     129                             (else (loop rest missing upgrade)))))
    122130                    (else
    123                      (warning "invalid dependency syntax in extension meta information" dep)
     131                     (warning
     132                      "invalid dependency syntax in extension meta information"
     133                      dep)
    124134                     (loop rest missing upgrade))))))))
    125135
  • chicken/branches/hygienic/chicken.import.scm

    r11493 r11989  
    113113         get-output-string
    114114         get-properties
    115          getenv
     115         getenv                       
     116         get-environment-variable
    116117         getter-with-setter
    117118         implicit-exit-handler
  • chicken/branches/hygienic/csi.scm

    r11973 r11989  
    115115          (print* t)
    116116          (string-set! t p o)
    117           (let ((t0 (+ (current-milliseconds) 40)))
     117          (let ((t0 (+ (current-milliseconds) 30)))
    118118            (let loop ()                ; crude, but doesn't need srfi-18
    119119              (when (< (current-milliseconds) t0)
  • chicken/branches/hygienic/eval.scm

    r11842 r11989  
    117117(define-constant repository-environment-variable "CHICKEN_REPOSITORY")
    118118(define-constant prefix-environment-variable "CHICKEN_PREFIX")
    119 (define-constant default-binary-version 3)
     119(define-constant default-binary-version 4)
    120120
    121121; these are actually in unit extras, but that is used by default
    122122; srfi-12 in unit library
     123; srfi-98 partically in unit posix
     124
    123125(define-constant builtin-features
    124   '(chicken srfi-2 srfi-6 srfi-10 srfi-12 srfi-23 srfi-28 srfi-30 srfi-31 srfi-39 srfi-69) )
     126  '(chicken srfi-2 srfi-6 srfi-10 srfi-12 srfi-23 srfi-28 srfi-30 srfi-31 srfi-39
     127            srfi-69 srfi-98) )
    125128
    126129(define-constant builtin-features/compiled
  • chicken/branches/hygienic/library.scm

    r11919 r11989  
    230230(define cpu-time (##core#primitive "C_cpu_time"))
    231231(define ##sys#decode-seconds (##core#primitive "C_decode_seconds"))
    232 (define getenv (##core#primitive "C_get_environment_variable"))
     232(define get-environment-variable (##core#primitive "C_get_environment_variable"))
     233(define getenv get-environment-variable)
    233234(define (##sys#start-timer) (##core#inline "C_start_timer"))
    234235(define ##sys#stop-timer (##core#primitive "C_stop_timer"))
     
    32843285            [else         (err x)] ) ) ) )
    32853286
    3286 (define ##sys#features '
    3287   (#:chicken #:srfi-23 #:srfi-30 #:srfi-39 #:srfi-62 #:srfi-17 #:srfi-12))
     3287(define ##sys#features
     3288  '(#:chicken #:srfi-23 #:srfi-30 #:srfi-39 #:srfi-62 #:srfi-17 #:srfi-12 #:srfi-98))
    32883289
    32893290;; Add system features:
  • chicken/branches/hygienic/manual/Overview

    r9524 r11989  
    2323Some of the features supported by CHICKEN:
    2424
    25 * SRFIs 0, 1, 2, 4, 6, 8-19, 23, 25-31, 37-40, 42, 43, 45, 47, 55, 57, 60-63, 66, 69, 72, 78, 85 and 95.
     25* SRFIs 0, 1, 2, 4, 6, 8-19, 23, 25-31, 37-40, 42, 43, 45, 47, 55, 57, 60-63, 66, 69, 72, 78, 85, 95 and 98.
    2626* Lightweight threads based on first-class continuations
    2727* Pattern matching with Andrew Wright's {{match}} package
  • chicken/branches/hygienic/manual/Unit library

    r11646 r11989  
    517517
    518518
    519 ==== getenv
    520 
     519==== get-environment-variable
     520
     521 [procedure] (get-environment-variable STRING)
    521522 [procedure] (getenv STRING)
    522523
    523524Returns the value of the environment variable {{STRING}} or
    524 {{#f}} if that variable is not defined.
    525 
     525{{#f}} if that variable is not defined. See also [[http://srfi.schemers.org/srfi-98/|SRFI-98]].
     526{{getenv}} is an alias for {{get-environment-variable}}.
    526527
    527528
  • chicken/branches/hygienic/manual/Unit posix

    r11542 r11989  
    875875=== Environment access
    876876
    877 ==== current-environment
    878 
    879  [procedure] (current-environment)
     877==== get-environment-variables
     878
     879 [procedure] (get-environment-variables)
    880880
    881881Returns a association list of the environment variables and their
    882 current values.
     882current values (see also [[http://srfi.schemers.org/srfi-98/|SRFI-98]]).
    883883
    884884==== setenv
  • chicken/branches/hygienic/posix.import.scm

    r10788 r11989  
    4545   current-effective-user-id
    4646   current-effective-user-name
    47    current-environment
     47   current-environment                  ; DEPRECATED
     48   get-environment-variables
    4849   current-group-id
    4950   current-process-id
  • chicken/branches/hygienic/posixunix.scm

    r11646 r11989  
    18501850          (posix-error #:file-error 'fifo? "file does not exist" filename) ) ) ) )
    18511851
     1852
    18521853;;; Environment access:
    18531854
     
    18641865  (##core#undefined) )
    18651866
    1866 (define current-environment
     1867(define get-environment-variables
    18671868  (let ([get (foreign-lambda c-string "C_getenventry" int)])
    18681869    (lambda ()
     
    18771878                    (scan (fx+ j 1)) ) )
    18781879              '() ) ) ) ) ) )
     1880
     1881(define current-environment get-environment-variables) ; DEPRECATED
     1882
    18791883
    18801884;;; Memory mapped I/O:
  • chicken/branches/hygienic/posixwin.scm

    r11646 r11989  
    16521652      fd) ) )
    16531653
     1654
    16541655;;; Environment access:
    16551656
     
    16661667  (##core#undefined) )
    16671668
    1668 (define current-environment
     1669(define get-environment-variables
    16691670  (let ([get (foreign-lambda c-string "C_getenventry" int)]
    16701671        [substring substring] )
     
    16781679                    (scan (fx+ j 1)) ) )
    16791680              '() ) ) ) ) ) )
     1681
     1682(define current-environment get-environment-variables) ; DEPRECATED
    16801683
    16811684;;; Time related things:
Note: See TracChangeset for help on using the changeset viewer.