I have a make file in axon:
MOC ?= $(shell vessel bin)/moc
# MOC ?= $(shell dfx cache show)/moc
SOURCES = $(shell vessel sources)
TESTS=$(wildcard *.test.mo)
TEST_TARGETS = $(patsubst %.mo,%.wasm,$(TESTS))
.PHONY: $(TESTS)
all: $(TEST_TARGETS)
%.wasm: %.mo
$(MOC) $(SOURCES) -wasi-system-api -o $@ $< && wasmtime $@
rm -f $@
clean:
rm *.wasm
I’m getting this error:
../../../.vessel/.bin/0.6.2/moc --package base ../../../.vessel/base/aafcdee0c8328087aeed506e64aa2ff4ed329b47/src --package map ../../../.vessel/map/v7.0.0/src --package map_7_0_0 ../../../.vessel/map_7_0_0/v7.0.0/src --package matchers ../../../.vessel/matchers/v1.2.0/src --package stablebuffer ../../../.vessel/stablebuffer/v0.2.0/src --package stablebuffer_0_2_0 ../../../.vessel/stablebuffer_0_2_0/v0.2.0/src -wasi-system-api -o Axon.test.wasm Axon.test.mo && wasmtime Axon.test.wasm
../../../.vessel/base/aafcdee0c8328087aeed506e64aa2ff4ed329b47/src/Prelude.mo:18.5-18.10: type error [M0072], field trap does not exist in type
module {print : Text -> ()}
../../../.vessel/base/aafcdee0c8328087aeed506e64aa2ff4ed329b47/src/Prelude.mo:22.5-22.10: type error [M0072], field trap does not exist in type
module {print : Text -> ()}
../../../.vessel/base/aafcdee0c8328087aeed506e64aa2ff4ed329b47/src/Prelude.mo:30.5-30.10: type error [M0072], field trap does not exist in type
module {print : Text -> ()}
Can anyone spot what is going on? I’m guessing that it is the vessel compiler version? Actually it isn’t…same error with compiler = Some “0.7.3” in my vessel file.
Prelude.mo is
/// General utilities
///
/// This prelude file proposes standard library features that _may_
/// belong in the _language_ (compiler-internal) prelude sometime, after
/// some further experience and discussion. Until then, they live here.
import Debug "Debug";
module {
/// Not yet implemented
///
/// Mark incomplete code with the `nyi` and `xxx` functions.
///
/// Each have calls are well-typed in all typing contexts, which
/// trap in all execution contexts.
public func nyi() : None {
Debug.trap("Prelude.nyi()");
};
public func xxx() : None {
Debug.trap("Prelude.xxx()");
};
/// Mark unreachable code with the `unreachable` function.
///
/// Calls are well-typed in all typing contexts, and they
/// trap in all execution contexts.
public func unreachable() : None {
Debug.trap("Prelude.unreachable()")
};
}