2017-05-07 9 views
5

clojure.spec을 배우려고합니다. clojure.spec.alpha가 필요한 동안 부트 빌드 도구를 따라 clojure 프로젝트를 설정하는 동안 다음 오류가 발생합니다. 다음과 같이이러한 네임 스페이스가 없습니다. 클로저 스크립트 프로젝트 설정의 clojure.spec.alpha

Compiling ClojureScript... 
• js/app.js 
No such namespace: clojure.spec.alpha, could not locate clojure/spec/alpha.cljs, clojure/spec/alpha.cljc, or Closure namespace "clojure.spec.alpha" in f 
ile src/cljs/flowparser/app.cljs 
Elapsed time: 0.141 sec 

내 부팅 구성은 다음과 같습니다 난 그냥이에 대한 clojure 어떤 제안을

(ns flowparser.app 
    (:require [clojure.spec.alpha :as spec])) 

(defn init [] 
    "Hello World") 

을 시작하고 따라 다음과 같이

(def +version+ "0.0.1-SNAPSHOT") 
(def +description+ "Parses graph DSL for VADE") 

(set-env! 
    :source-paths #{"src/cljs"} 
    :resource-paths #{"resources"} 
    :dependencies '[ 
        [org.clojure/clojure "1.9.0-alpha16"] 
        [org.clojure/clojurescript "1.9.521"] 
        [org.clojure/core.async "0.3.442"] 
        [adzerk/boot-cljs "2.0.0" :scope "test"] 
        [adzerk/boot-cljs-repl "0.3.3" :scope "test"] 
        [adzerk/boot-reload "0.5.1" :scope "test"] 
        [pandeiro/boot-http "0.8.0" :scope "test"] 
        [com.cemerick/piggieback "0.2.1" :scope "test"] 
        [org.clojure/tools.nrepl "0.2.13" :scope "test"] 
        [weasel "0.7.0" :scope "test"] 
        [crisptrutski/boot-cljs-test "0.3.0" :scope "test"] 
        [binaryage/dirac "1.2.7" :scope "test"] 
        [powerlaces/boot-cljs-devtools "0.2.0" :scope "test"] 
        [proto-repl "0.3.1" :scope "test"] 
        [proto-repl-charts "0.3.2" :scope "test"] 
        [boot-codox "0.10.3" :scope "test"] 
        [adzerk/bootlaces "0.1.13"]]) 

(require 
'[adzerk.boot-cljs  :refer [cljs]] 
'[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]] 
'[adzerk.boot-reload :refer [reload]] 
'[pandeiro.boot-http :refer [serve]] 
'[crisptrutski.boot-cljs-test :refer [test-cljs]] 
'[powerlaces.boot-cljs-devtools :refer [cljs-devtools dirac]] 
'[codox.boot :refer [codox]] 
'[adzerk.bootlaces :refer :all]) 

(bootlaces! +version+ :dont-modify-paths? true) 

(task-options! 
    pom {:project  'vadelabs/flowparser 
     :version  +version+ 
     :description +description+ 
     :url   "https://github.com/pntripathi9417/flowparser" 
     :scm   {:url "https://github.com/pntripathi9417/flowparser"} 
     :license  {"Eclipse Public License" 
        "http://www.eclipse.org/legal/epl-v10.html"}}) 

(deftask build [] 
    (comp (speak) 
     (cljs))) 

(deftask run [] 
    (comp (serve) 
     (watch) 
     (cljs-repl) 
     (dirac) 
     (reload) 
     (build) 
     (target))) 

(deftask production [] 
    (task-options! cljs {:optimizations :advanced}) 
    identity) 

(deftask development [] 
    (task-options! cljs {:optimizations :none} 
       reload {:on-jsload 'flowparser.app/init}) 
    identity) 

(deftask dev 
    "Simple alias to run application in development mode" 
    [] 
    (comp (development) 
     (run))) 

(deftask docs [] 
    "Generates documentation for the library" 
    (comp (codox 
      :name "vadelabs/flowparser" 
      :description +description+ 
      :version +version+ 
      :language :clojurescript 
      :output-path ".") 
     (target :dir #{"docs"}))) 

내 주요 app.cljs 파일입니다 문제의 종류가 크게 도움이 될 것입니다.

감사합니다.

답변

9

입니다. Clojure 1.9.0-alpha16은 네임 스페이스를 clojure.spec에서 clojure.spec.alpha으로 바 꾸었습니다.

ClojureScript는 마스터에서 동일한 변경을 수행했지만 새 버전은 아직 릴리스되지 않았습니다. 따라서 ClojureScript < = 1.9.521의 경우, 필요한 네임 스페이스로 clojure.spec을 대신 사용해야합니다.