Skip to content

Commit 7a1fba0

Browse files
committed
Add a package dependency on the sha package. This should fix the Travis CI tests against Racket 6.12, as well as making it simpler to use raco pkg install anarki.
1 parent a0509e2 commit 7a1fba0

File tree

5 files changed

+9
-30
lines changed

5 files changed

+9
-30
lines changed

.travis.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ env:
2727

2828
# Versions prior to 6.3 don't define the `racket/random` module,
2929
# which is needed for news.arc and one of the tests.
30+
31+
# Versions prior to 6.11 have a bug in unmarshaling namespace
32+
# information, which prevents us from having ac.scm statically
33+
# require `crypto-random-bytes` from `racket/random` or
34+
# `ssl-connect` from `openssl`.
3035

3136
# This is the earliest known supported version.
32-
- RACKET_VERSION=6.3
37+
- RACKET_VERSION=6.11
3338

3439
# This is the latest known supported version.
3540
- RACKET_VERSION=6.12

README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ privileges, just submit your first pull request or ask on [**Arc Language Forum*
88

99
### Installation
1010

11-
First [install **Racket** (v6.8 or later)](http://racket-lang.org), then
11+
First [install **Racket** (v6.11 or later)](http://racket-lang.org), then
1212

1313
$ raco pkg install sha
1414
$ git clone http://github.com/arclanguage/anarki

ac.rkt

-22
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
(only-in "brackets.rkt" bracket-readtable)
2727

2828
(for-syntax racket/base))
29-
; This module also uses `dynamic-require` for the following
30-
; dependencies:
31-
;
32-
; (only-in openssl ssl-connect)
33-
; (only-in racket/random crypto-random-bytes)
3429

3530
(provide (all-defined-out))
3631

@@ -1132,15 +1127,6 @@
11321127
(lambda () (tcp-connect host port)))))
11331128

11341129
(xdef ssl-connect (lambda (host port)
1135-
; dynamic-require is slow as molasses. don't use in hot code!
1136-
;
1137-
; ; NOTE: There was a bug in unmarshaling namespace
1138-
; ; information from compiled Racket code that was
1139-
; ; fixed in Racket 6.11. On that version and later,
1140-
; ; we can replace this with
1141-
; ; `(require (only-in openssl ssl-connect))`.
1142-
; (define ssl-connect
1143-
; (dynamic-require 'openssl 'ssl-connect))
11441130
(ar-init-socket
11451131
(lambda () (ssl-connect host port)))))
11461132

@@ -1179,14 +1165,6 @@
11791165
str))))
11801166

11811167
(define (ar-tmpname)
1182-
; dnymaic-require is slowness itself. don't use in hot code!
1183-
;
1184-
; ; NOTE: There was a bug in unmarshaling namespace information from
1185-
; ; compiled Racket code that was fixed in Racket 6.11. On that
1186-
; ; version and later, we can replace this with
1187-
; ; `(require (only-in racket/random crypto-random-bytes))`.
1188-
; (define crypto-random-bytes
1189-
; (dynamic-require 'racket/random 'crypto-random-bytes))
11901168
(string-append "/tmp/"
11911169
(list->string
11921170
(map (lambda (byte)

arc.arc

+1-5
Original file line numberDiff line numberDiff line change
@@ -1726,11 +1726,7 @@ protocol requires them."
17261726
(c "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
17271727
nc 62
17281728
s (newstring n)
1729-
i 0
1730-
; Don't use dynamic-require. It it slooooow
1731-
; crypto-random-bytes
1732-
; ($.dynamic-require 'racket/random 'crypto-random-bytes)
1733-
)
1729+
i 0)
17341730
(while (< i n)
17351731
(let x ($.bytes-ref ($.crypto-random-bytes 1) 0)
17361732
(unless (> x 247)

info.rkt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
(define version "0.0")
44
(define pkg-desc "Community-managed variant of the Arc dialect of Lisp")
55

6-
(define deps '("base"))
6+
(define deps '("base" "sha"))
77
(define build-deps '("racket-doc" "scribble-lib"))
88

99
(define scribblings '(("scribblings/anarki.scrbl" ())))

0 commit comments

Comments
 (0)