Skip to content

Commit

Permalink
conscript: drop conscript/local
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp committed Nov 8, 2024
1 parent 3275ad6 commit b6c1dd5
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 547 deletions.
37 changes: 18 additions & 19 deletions congame-core/components/dsl.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,21 @@
(dsl-require* src id)]))

(define (dsl-require* src id)
(let ([src (regexp-replace #rx"#lang conscript/local" src "#lang conscript")])
(log-dsl-debug "dsl-require: ~a" (~.s #:max-width 1024 src))
(unless (regexp-match? #rx"^#lang conscript *\r?\n" src)
(error 'dsl-require "only #lang conscript is supported"))
(define path #f)
(dynamic-wind
(lambda ()
(set! path (make-temporary-file "conscript-dsl-~a.rkt")))
(lambda ()
(call-with-output-file path
#:exists 'truncate/replace
(lambda (out)
(display src out)))
(begin0 (dynamic-require `(file ,(path->string path)) id)
(module-cache-clear!)
(collect-garbage)))
(lambda ()
(with-handlers ([exn:fail:filesystem? void])
(delete-file path))))))
(log-dsl-debug "dsl-require: ~a" (~.s #:max-width 1024 src))
(unless (regexp-match? #rx"^#lang conscript *\r?\n" src)
(error 'dsl-require "only #lang conscript is supported"))
(define path #f)
(dynamic-wind
(lambda ()
(set! path (make-temporary-file "conscript-dsl-~a.rkt")))
(lambda ()
(call-with-output-file path
#:exists 'truncate/replace
(lambda (out)
(display src out)))
(begin0 (dynamic-require `(file ,(path->string path)) id)
(module-cache-clear!)
(collect-garbage)))
(lambda ()
(with-handlers ([exn:fail:filesystem? void])
(delete-file path)))))
2 changes: 1 addition & 1 deletion congame-example-study/conscript-archetype1.rkt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#lang conscript/local
#lang conscript

(provide
hya54)
Expand Down
2 changes: 1 addition & 1 deletion congame-example-study/conscript-examples.rkt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#lang conscript/local
#lang conscript

(require racket/format) ; -> provides ~r

Expand Down
27 changes: 0 additions & 27 deletions congame-example-study/conscript-local-shared.rkt

This file was deleted.

This file was deleted.

This file was deleted.

56 changes: 0 additions & 56 deletions congame-example-study/conscript-local.rkt

This file was deleted.

2 changes: 1 addition & 1 deletion congame-example-study/many-designs/ach91.rkt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#lang conscript/local
#lang conscript

;; ACH91:
;;
Expand Down
1 change: 0 additions & 1 deletion congame-example-study/prisoners-dilemma.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
prisoners-dilemma-model)

;; For next time:
;; * Multiple participants & current owner in conscript/local
;; * Add bot support to conscript (default actions on all steps, figure out models)

(defvar*/instance choices dilemma-choices)
Expand Down
1 change: 0 additions & 1 deletion conscript/base.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
(define whitelist
'(buid
congame-web/components/uploaded-file
conscript/local/matchmaking
conscript/matchmaking
conscript/survey-tools
gregor
Expand Down
1 change: 1 addition & 0 deletions conscript/info.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"koyo-lib"
"mime-type-lib"
"net-lib"
"threading-lib"
"web-server-lib"))
(define build-deps
'("rackunit-lib"))
Loading

0 comments on commit b6c1dd5

Please sign in to comment.