Skip to content

Commit

Permalink
Fight the bitrot, get Glow to compile again.
Browse files Browse the repository at this point in the history
  • Loading branch information
fare committed Oct 3, 2023
1 parent 0b25a36 commit 3cca2c1
Show file tree
Hide file tree
Showing 58 changed files with 623 additions and 321 deletions.
28 changes: 15 additions & 13 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ is better suited to work on *Glow* itself and can be unstable), use:
docker run -it --mount type=volume,src=glow-home,dst=/root mukn/glow:devel bash

You can build your own using `scripts/make-docker-image.ss` from
[gerbil-utils](https://github.com/fare/gerbil-utils).
[gerbil-utils](https://github.com/mighty-gerbils/gerbil-utils).

Note that the `--mount` option is there to help you persist your working state
between sessions of running *Glow* inside docker.
Expand Down Expand Up @@ -227,11 +227,12 @@ Assuming for now you won't be modifying their source code,
just install them with `gxpkg install` and `gxpkg build`.

```
DEPS=(github.com/fare/gerbil-utils
github.com/fare/gerbil-poo
github.com/fare/gerbil-crypto
github.com/fare/gerbil-persist
github.com/fare/gerbil-ethereum
DEPS=(github.com/mighty-gerbils/gerbil-leveldb
github.com/mighty-gerbils/gerbil-utils
github.com/mighty-gerbils/gerbil-poo
github.com/mighty-gerbils/gerbil-crypto
github.com/mighty-gerbils/gerbil-persist
github.com/mighty-gerbils/gerbil-ethereum
github.com/drewc/gerbil-swank
github.com/drewc/drewc-r7rs-swank
github.com/drewc/smug-gerbil
Expand All @@ -256,11 +257,12 @@ after possibly editing the script to adjust the `SRCDIR` shell variable
to adjust where you'll install those dependencies:

```
DEPS=(github.com/fare/gerbil-utils
github.com/fare/gerbil-poo
github.com/fare/gerbil-crypto
github.com/fare/gerbil-persist
github.com/fare/gerbil-ethereum
DEPS=(github.com/mighty-gerbils/gerbil-leveldb
github.com/mighty-gerbils/gerbil-utils
github.com/mighty-gerbils/gerbil-poo
github.com/mighty-gerbils/gerbil-crypto
github.com/mighty-gerbils/gerbil-persist
github.com/mighty-gerbils/gerbil-ethereum
github.com/drewc/gerbil-swank
github.com/drewc/drewc-r7rs-swank
github.com/drewc/smug-gerbil
Expand Down Expand Up @@ -321,8 +323,8 @@ And you can run our integration tests with:

However, mind that integration tests require you
to have a local private [`geth`](https://geth.ethereum.org/) running
(typically using the [`script/run-ethereum-test-net.ss`](https://github.com/fare/gerbil-ethereum/blob/master/scripts/run-ethereum-test-net.ss)
from [gerbil-ethereum](https://github.com/fare/gerbil-ethereum))
(typically using the [`script/run-ethereum-test-net.ss`](https://github.com/mighty-gerbils/gerbil-ethereum/blob/master/scripts/run-ethereum-test-net.ss)
from [gerbil-ethereum](https://github.com/mighty-gerbils/gerbil-ethereum))
and may maintain state in a `run` directory
that you might have to wipe with `rm -rf run`
each time you restart `geth`, shortly *before* said restart
Expand Down
198 changes: 146 additions & 52 deletions all-glow.ss
Original file line number Diff line number Diff line change
Expand Up @@ -10,81 +10,175 @@
(import

;; Gerbil
(only-in :gerbil/gambit/os time)
:gerbil/expander <expander-runtime> :std/interactive
:gerbil/gambit/bytes :gerbil/gambit/exact :gerbil/gambit/threads :gerbil/gambit/ports
:scheme/base-impl :scheme/char
:std/actor :std/assert :std/coroutine
:std/debug/heap :std/debug/memleak :std/debug/threads
:std/error :std/format :std/getopt :std/iter :std/logger
:std/misc/bytes :std/misc/deque :std/misc/hash :std/misc/list :std/misc/number
:std/misc/ports :std/misc/process :std/misc/queue :std/misc/repr :std/misc/string
:std/net/request :std/net/websocket
:std/pregexp :std/sort
:std/srfi/1 :std/srfi/13 (except-in :std/srfi/19 time) ;; :std/srfi/43
:gerbil/gambit
:gerbil/expander
<expander-runtime>
:std/interactive
:std/actor
:std/assert
:std/coroutine
:std/debug/heap
:std/debug/memleak
:std/debug/threads
:std/error
:std/format
:std/getopt
:std/io
:std/iter
:std/logger
:std/misc/bytes
:std/misc/decimal
:std/misc/deque
:std/misc/hash
:std/misc/list
:std/misc/number
:std/misc/path
:std/misc/ports
:std/misc/process
:std/misc/queue
:std/misc/repr
:std/misc/string
:std/net/request
:std/pregexp
:std/sort
:std/source
:std/srfi/1
:std/srfi/13
(except-in :std/srfi/19 time)
;; :std/srfi/43
:std/srfi/141
:std/stxutil
:std/sugar
:std/text/csv :std/text/hex :std/text/json
:std/text/basic-parsers
:std/text/basic-printers
:std/text/char-set
:std/text/csv
:std/text/hex
:std/text/json
:std/test

;; swank
;; NB: until https://github.com/ecraven/r7rs-swank/pull/10 is merged,
;; use https://github.com/fare-patches/r7rs-swank as your checkout
;; :ecraven/gerbil-swank

;; Clan Utilities
:clan/net/json-rpc :clan/net/s3 :clan/net/simple-http-client :clan/net/websocket
:clan/assert :clan/base :clan/basic-parsers :clan/basic-printers
#;:clan/call-limiter :clan/cli :clan/concurrency :clan/config
:clan/debug :clan/decimal :clan/diceware
:clan/error :clan/exit
:clan/failure :clan/ffi :clan/files :clan/filesystem
:clan/generator :clan/git-fu :clan/hash
:clan/json :clan/list :clan/logger
:clan/maybe :clan/memo :clan/multicall :clan/number :clan/option :clan/order
:clan/path :clan/path-config :clan/peekable-iterator :clan/ports
;; gerbil-utils
:clan/net/tcp
:clan/net/s3
:clan/net/websocket
:clan/net/whois
:clan/assert
:clan/base
#;:clan/call-limiter
:clan/cli
:clan/concurrency
:clan/config
:clan/debug
:clan/diceware
:clan/error
:clan/exit
:clan/failure
:clan/ffi
:clan/files
:clan/filesystem
:clan/generator
:clan/git-fu
:clan/hash
:clan/json
:clan/list
:clan/logger
:clan/maybe
:clan/memo
:clan/multicall
:clan/option
:clan/order
:clan/path-config
:clan/peekable-iterator
:clan/ports
:clan/random
:clan/shell :clan/simple-rpc-client :clan/source
:clan/stateful-avl-map :clan/string :clan/subprocess :clan/syntax
:clan/temporary-files :clan/timestamp
:clan/vector :clan/versioning :clan/watch :clan/with-id
:clan/persist/db :clan/persist/persist :clan/persist/content-addressing

;; POO
:clan/poo/object :clan/poo/io :clan/poo/debug :clan/poo/cli
(prefix-in :clan/poo/mop poo.) (prefix-in :clan/poo/type poo.)
:clan/shell
:clan/simple-actor-client
:clan/source
:clan/stateful-avl-map
:clan/string
:clan/syntax
:clan/temporary-files
:clan/timestamp
:clan/vector
:clan/versioning
:clan/watch

;; gerbil-poo
:clan/poo/cli
:clan/poo/debug
:clan/poo/object
:clan/poo/io
:clan/poo/trie
(prefix-in :clan/poo/mop poo.)
(prefix-in :clan/poo/type poo.)
(only-in :clan/poo/mop
Type Type. Class Class. Slot Lens Function Fun
.defgeneric .method proto validate element? slot-lens sexp<-)
(only-in :clan/poo/number Number Real JsInt IntSet)
:clan/poo/trie

;; gerbil-crypto
:clan/crypto/keccak
:clan/crypto/secp256k1

;; gerbil-persist
:clan/persist/content-addressing
:clan/persist/db
:clan/persist/persist

;; gerbil-ethereum
:clan/ethereum/abi
:clan/ethereum/assembly
:clan/ethereum/assets
:clan/ethereum/cli
:clan/ethereum/contract-config
:clan/ethereum/erc20
:clan/ethereum/ethereum
:clan/ethereum/evm-runtime
:clan/ethereum/hex
:clan/ethereum/json-rpc
:clan/ethereum/logger
:clan/ethereum/network-config
:clan/ethereum/nonce-tracker
:clan/ethereum/known-addresses
:clan/ethereum/meta-create2
:clan/ethereum/rlp
:clan/ethereum/transaction
:clan/ethereum/simple-apps
:clan/ethereum/tx-tracker
:clan/ethereum/types
:clan/ethereum/watch
#|
;; Glow
:mukn/glow/version
:mukn/glow/path-config
:mukn/glow/compiler/syntax-context
:mukn/glow/compiler/passes :mukn/glow/compiler/multipass :mukn/glow/compiler/common
:mukn/glow/compiler/alpha-convert/symbolnat :mukn/glow/compiler/alpha-convert/fresh
:mukn/glow/cli/contacts
:mukn/glow/cli/ethereum
:mukn/glow/cli/identities
:mukn/glow/cli/interaction
:mukn/glow/compiler/alpha-convert/alpha-convert
:mukn/glow/compiler/alpha-convert/symbolnat
:mukn/glow/compiler/alpha-convert/fresh
:mukn/glow/compiler/anf/anf
;;:mukn/glow/compiler/checkpointify/checkpointify
:mukn/glow/compiler/common
:mukn/glow/compiler/desugar/desugar
:mukn/glow/compiler/multipass
:mukn/glow/compiler/passes
:mukn/glow/compiler/syntax-context
:mukn/glow/compiler/typecheck/typecheck
:mukn/glow/compiler/anf/anf
:mukn/glow/runtime/participant-runtime
:mukn/glow/path-config
:mukn/glow/runtime/consensus-code-generator
:mukn/glow/runtime/glow-path
:mukn/glow/cli/interaction :mukn/glow/cli/contacts :mukn/glow/cli/identities :mukn/glow/cli/ethereum

;;:mukn/glow/compiler/checkpointify/checkpointify
:clan/crypto/keccak :clan/crypto/secp256k1
:mukn/ethereum/hex :mukn/ethereum/abi :mukn/ethereum/types :mukn/ethereum/ethereum
:mukn/ethereum/rlp :mukn/ethereum/known-addresses :mukn/ethereum/logger
:mukn/ethereum/network-config :mukn/ethereum/json-rpc :mukn/ethereum/transaction :mukn/ethereum/watch
:mukn/ethereum/assembly :mukn/ethereum/contract-config :mukn/ethereum/evm-runtime
:mukn/ethereum/nonce-tracker :mukn/ethereum/tx-tracker :mukn/ethereum/simple-apps
:mukn/ethereum/assets :mukn/ethereum/erc20 :mukn/ethereum/cli :mukn/ethereum/meta-create2
:mukn/glow/runtime/participant-runtime
:mukn/glow/version

;; Testing Glow
:mukn/glow/t/common
)
|#
)

(import :clan/poo/brace)

Expand Down
4 changes: 2 additions & 2 deletions build.ss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
(init-build-environment!
name: "Glow"
;; NB: missing versions for drewc/smug-gerbil and vyzo/libp2p
deps: '("clan" "clan/crypto" "clan/poo" "clan/persist" "mukn/ethereum")
deps: '("clan" "clan/crypto" "clan/poo" "clan/persist" "clan/ethereum")
spec: files)

;; TODO: create version files for all overridden dependencies, too
Expand All @@ -41,5 +41,5 @@
[(map (cut string-append <> "-unstable") '("gambit" "gerbil")) ...
(map (cut string-append "gerbilPackages-unstable." <>)
'("gerbil-utils" "gerbil-poo" "gerbil-crypto" "gerbil-persist" "gerbil-ethereum"
"gerbil-libp2p" "smug-gerbil")) ...
"gerbil-libp2p" "smug-gerbil" "ftw")) ...
"glow-lang"])
2 changes: 1 addition & 1 deletion cardano/haskell-types/client.ss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(import
:clan/poo/object (except-in :clan/poo/number Int) :clan/poo/mop :clan/poo/type
(only-in :mukn/ethereum/types delay-type)
(only-in :clan/ethereum/types delay-type)
../poo-extensions)


Expand Down
2 changes: 1 addition & 1 deletion cardano/haskell-types/data.ss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(import
:clan/poo/object (except-in :clan/poo/number Int) :clan/poo/mop :clan/poo/type
(only-in :mukn/ethereum/types delay-type)
(only-in :clan/ethereum/types delay-type)
../poo-extensions)


Expand Down
2 changes: 1 addition & 1 deletion cardano/smart-contract-backend.ss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

(import
:clan/exception :clan/logger
:gerbil/gambit/ports :gerbil/gambit/threads
:gerbil/gambit
:std/net/request :std/text/json :std/misc/ports :std/misc/process :std/misc/repr
:clan/poo/object :clan/poo/brace
./util ./haskell-types/client)
Expand Down
2 changes: 1 addition & 1 deletion cardano/wallet.ss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

(import
:clan/json :clan/logger
:gerbil/gambit/ports :gerbil/gambit/threads
:gerbil/gambit
:std/logger :std/misc/ports :std/misc/shuffle :std/net/request :std/srfi/1 :std/text/json
./util)

Expand Down
35 changes: 31 additions & 4 deletions cli/contacts.ss
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
(export #t)

(import
:std/format :std/getopt :std/iter :std/misc/hash :std/misc/number :std/sort :std/srfi/13 :std/sugar
:clan/config :clan/crypto/secp256k1 :clan/files :clan/json :clan/multicall :clan/path :clan/syntax
:clan/poo/brace :clan/poo/cli :clan/poo/io :clan/poo/mop :clan/poo/object :clan/poo/type
;; gerbil
:std/format
:std/getopt
:std/iter
:std/misc/hash
:std/misc/number
:std/misc/path
:std/sort
:std/srfi/13
:std/sugar
;; gerbil-utils
:clan/config
:clan/files
:clan/json
:clan/multicall
:clan/syntax
;; gerbil-poo
:clan/poo/brace
:clan/poo/cli
:clan/poo/io
:clan/poo/mop
(only-in :clan/poo/number Nat)
:mukn/ethereum/cli :mukn/ethereum/hex :mukn/ethereum/ethereum :mukn/ethereum/known-addresses
:clan/poo/object
:clan/poo/type
;; gerbil-crypto
:clan/crypto/secp256k1
;; gerbil-ethereum
:clan/ethereum/cli
:clan/ethereum/hex
:clan/ethereum/ethereum
:clan/ethereum/known-addresses
;; glow
:mukn/glow/cli/utils
(only-in ./identities Identity)
(rename-in ../contacts/db (add-contact add-contact.db) (list-contacts list-contacts.db)))
Expand Down
Loading

0 comments on commit 3cca2c1

Please sign in to comment.