This repository is currently being migrated. It's locked while the migration is in progress.
forked from beingmeta/framerd-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptall.scm
80 lines (64 loc) · 2.43 KB
/
optall.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(use-module '{logger optimize})
(config! 'optalltest #t)
(config! 'traceload #t)
;(config! 'optimize:rails #t)
;(config! 'optimize:checkusage #f)
(config! 'mysql:lazyprocs #f)
(define %loglevel %info%)
(config! 'loadpath
(let ((dir (dirname (get-component "optall.scm"))))
(glom dir "%/module.scm:" dir "%.scm:"
dir "safe/%/module.scm:" dir "safe/%.scm:" )))
(optimize! 'optimize)
(define check-modules
(macro expr
`(begin
(use-module ,(cadr expr))
(do-choices (mod ,(cadr expr))
(loginfo |Load All| "Optimizing module " mod)
(optimize-module! mod)))))
(check-modules '{cachequeue calltrack checkurl codewalker
couchdb ctt curlcache dopool dropbox ellipsize
email extoids ezrecords fakezip fifo fillin
findcycles getcontent gpath gravatar gutdb
hashfs hashstats zipfs histogram hostinfo i18n
ice isbn jsonout logctl logger
meltcache mergeutils mimeout mimetable
mttools oauth openlibrary ;; optimize
opts packetfns parsetime bugjar
pump readcsv rulesets samplefns
savecontent saveopt signature speling ;; soap
stringfmts tinygis tracer trackrefs twilio
updatefile usedb varconfig whocalls ximage})
(check-modules '{aws aws/v4 aws/roles
aws/s3 aws/ses aws/simpledb aws/sqs
aws/associates aws/dynamodb})
(check-modules '{domutils domutils/index domutils/localize
domutils/styles domutils/css domutils/cleanup
domutils/adjust domutils/analyze
domutils/hyphenate})
(check-modules '{facebook facebook/fbcall facebook/fbml})
(check-modules '{google google/drive})
(check-modules '{knodules knodules/drules
knodules/html knodules/plaintext})
(check-modules '{misc/oidshift})
(check-modules '{paypal paypal/checkout paypal/express paypal/adaptive})
(check-modules '{textindex textindex/domtext textindex/linkup})
(check-modules '{twitter})
(define (have-morph) (and (get-module 'morph) (get-module 'morph/en)))
(define (have-brico)
(and (config 'bricosource)
(onerror (begin (use-module 'brico) #t) #f)))
(define (have-lexdata)
(and (config 'lexdata)
(onerror (and (exists? (get (get-module 'tagger) 'lextags))
((get (get-module 'tagger) 'lextags)))
(lambda () #f))))
(when (and (have-brico) (have-morph))
(check-modules '{brico brico/dterms brico/indexing brico/lookup
brico/analytics brico/maprules brico/xdterms
brico/wikipedia
knodules/usebrico knodules/defterm
xtags rdf audit}))
(when (have-lexdata)
(check-modules '{lexml}))