erl -eval
을 통해 호출하려는 간단한 얼랭 명령이 있습니다 (erlydtl page에 설명 된대로 erlydtl 템플릿을 컴파일하기 위해). 내가 쉘 모두에서 대화 형으로 그것을 할Erlang : 명령 행에서 erl -eval을 호출하지 않습니다.
잘 작동하고 즉시 명령이 종료 :
erl -pa ebin deps\erlydtl\ebin Eshell V5.9.3.1 (abort with ^G)
1> erlydtl:compile('templates/tictactoe.dtl',tictactoe_dtl,[{out_dir,'ebin'}]).
ok
하지만 erl -eval
을 통해 그것을 할 때 (내가 .bat 파일에서이 작업을 실행하려면) :
erl -pa ebin deps\erlydtl\ebin -noshell -eval erlydtl:compile('templates/tictactoe.dtl',tictactoe_dtl,[{out_dir,'ebin'}])
다음 명령은 작업을 수행하지만 템플릿이 종료되지 않고 ctrl + c를 사용하여 수동으로 쉘 프로세스를 종료해야합니다 (Windows에서 작업 중입니다).
그냥 명령을 사용하여 템플릿을 컴파일하고 종료하고 싶습니다. 무엇이 문제일까요?
업데이트 :
하나의 솔루션 명령의 끝에서 종료() 호출을 추가,하지만 내가 다음으로 끝날 수있다 : 그래서,
erl -pa ebin deps\erlydtl\ebin -noshell -eval erlydtl:compile('templates/tictactoe.dtl',tictactoe_dtl,[{out_dir,'ebin'}]),exit(success).
{"init terminating in do_boot",success}
Crash dump was written to: erl_crash.dump
init terminating in do_boot (success)
오류 메시지가 매우 자극적이다 나는 아직도이 해결책을 좋아하지 않는다.
또는 보강 철근을 사용하여 프로젝트를 빌드 할 수 있습니다./templates dir 아래에 놓을 때 Erlydtl 템플릿 컴파일을 지원합니다. –
현재 보강 철근을 사용하지만 대안을 찾고 있습니다. 보강 철근 컴파일이 매우 오래 작동하기 때문입니다. –
'rebar compile skip_deps = true'도 느려 집니까? –