Permalink
Browse files

Update to JVM commit 42a7fd4 (2017.04.27): Remove clojure.spec and re…

…name spec namespace usage
  • Loading branch information...
dmiller committed Dec 2, 2017
1 parent 706cf43 commit 32279cceb6cf1242d79130fcbbc83900c77ae6f9
@@ -32,6 +32,8 @@
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<DirectLinking Condition=" '$(DirectLinking)' == '' ">true</DirectLinking>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug 3.5|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -138,6 +140,13 @@
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>set clojure.compiler.direct-linking=$(DirectLinking)
-$(TargetPath) clojure.core clojure.core.protocols clojure.core.server clojure.core.reducers clojure.core.specs clojure.main clojure.set clojure.zip clojure.walk clojure.stacktrace clojure.template clojure.test clojure.test.tap clojure.test.junit clojure.pprint clojure.clr.io clojure.repl clojure.clr.shell clojure.string clojure.data clojure.reflect clojure.edn clojure.spec.gen clojure.spec.test clojure.spec clojure.core.specs</PostBuildEvent>
+$(TargetPath) clojure.core clojure.core.protocols clojure.core.server clojure.core.reducers clojure.main clojure.set clojure.zip clojure.walk clojure.stacktrace clojure.template clojure.test clojure.test.tap clojure.test.junit clojure.pprint clojure.clr.io clojure.repl clojure.clr.shell clojure.string clojure.data clojure.reflect clojure.edn</PostBuildEvent>
</PropertyGroup>
+ <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
+ </Target>
</Project>
@@ -30,6 +30,8 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug 3.5|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -140,4 +142,11 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
+ <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
+ </Target>
</Project>
@@ -88,9 +88,6 @@
<None Include="clojure\core\reducers.clj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="clojure\core\specs.clj">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
<None Include="clojure\core_clr.clj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@@ -169,15 +166,6 @@
<None Include="clojure\dm-test.clj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="clojure\spec.clj">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Include="clojure\spec\gen.clj">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Include="clojure\spec\test.clj">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
<None Include="clojure\stacktrace.clj">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@@ -1,225 +0,0 @@
-(ns ^{:skip-wiki true} clojure.core.specs
- (:require [clojure.spec :as s]))
-
-;;;; destructure
-
-(s/def ::local-name (s/and simple-symbol? #(not= '& %)))
-
-(s/def ::binding-form
- (s/or :sym ::local-name
- :seq ::seq-binding-form
- :map ::map-binding-form))
-
-;; sequential destructuring
-
-(s/def ::seq-binding-form
- (s/and vector?
- (s/cat :elems (s/* ::binding-form)
- :rest (s/? (s/cat :amp #{'&} :form ::binding-form))
- :as (s/? (s/cat :as #{:as} :sym ::local-name)))))
-
-;; map destructuring
-
-(s/def ::keys (s/coll-of ident? :kind vector?))
-(s/def ::syms (s/coll-of symbol? :kind vector?))
-(s/def ::strs (s/coll-of simple-symbol? :kind vector?))
-(s/def ::or (s/map-of simple-symbol? any?))
-(s/def ::as ::local-name)
-
-(s/def ::map-special-binding
- (s/keys :opt-un [::as ::or ::keys ::syms ::strs]))
-
-(s/def ::map-binding (s/tuple ::binding-form any?))
-
-(s/def ::ns-keys
- (s/tuple
- (s/and qualified-keyword? #(-> % name #{"keys" "syms"}))
- (s/coll-of simple-symbol? :kind vector?)))
-
-(s/def ::map-bindings
- (s/every (s/or :mb ::map-binding
- :nsk ::ns-keys
- :msb (s/tuple #{:as :or :keys :syms :strs} any?)) :into {}))
-
-(s/def ::map-binding-form (s/merge ::map-bindings ::map-special-binding))
-
-;; bindings
-
-(s/def ::binding (s/cat :binding ::binding-form :init-expr any?))
-(s/def ::bindings (s/and vector? (s/* ::binding)))
-
-;; let, if-let, when-let
-
-(s/fdef clojure.core/let
- :args (s/cat :bindings ::bindings
- :body (s/* any?)))
-
-(s/fdef clojure.core/if-let
- :args (s/cat :bindings (s/and vector? ::binding)
- :then any?
- :else (s/? any?)))
-
-(s/fdef clojure.core/when-let
- :args (s/cat :bindings (s/and vector? ::binding)
- :body (s/* any?)))
-
-;; defn, defn-, fn
-
-(s/def ::arg-list
- (s/and
- vector?
- (s/cat :args (s/* ::binding-form)
- :varargs (s/? (s/cat :amp #{'&} :form ::binding-form)))))
-
-(s/def ::args+body
- (s/cat :args ::arg-list
- :body (s/alt :prepost+body (s/cat :prepost map?
- :body (s/+ any?))
- :body (s/* any?))))
-
-(s/def ::defn-args
- (s/cat :name simple-symbol?
- :docstring (s/? string?)
- :meta (s/? map?)
- :bs (s/alt :arity-1 ::args+body
- :arity-n (s/cat :bodies (s/+ (s/spec ::args+body))
- :attr (s/? map?)))))
-
-(s/fdef clojure.core/defn
- :args ::defn-args
- :ret any?)
-
-(s/fdef clojure.core/defn-
- :args ::defn-args
- :ret any?)
-
-(s/fdef clojure.core/fn
- :args (s/cat :name (s/? simple-symbol?)
- :bs (s/alt :arity-1 ::args+body
- :arity-n (s/+ (s/spec ::args+body))))
- :ret any?)
-
-;;;; ns
-
-(s/def ::exclude (s/coll-of simple-symbol?))
-(s/def ::only (s/coll-of simple-symbol?))
-(s/def ::rename (s/map-of simple-symbol? simple-symbol?))
-(s/def ::filters (s/keys* :opt-un [::exclude ::only ::rename]))
-
-(s/def ::ns-refer-clojure
- (s/spec (s/cat :clause #{:refer-clojure}
- :filters ::filters)))
-
-(s/def ::refer (s/or :all #{:all}
- :syms (s/coll-of simple-symbol?)))
-
-(s/def ::prefix-list
- (s/spec
- (s/cat :prefix simple-symbol?
- :suffix (s/* (s/alt :lib simple-symbol? :prefix-list ::prefix-list))
- :refer (s/keys* :opt-un [::as ::refer]))))
-
-(s/def ::ns-require
- (s/spec (s/cat :clause #{:require}
- :libs (s/* (s/alt :lib simple-symbol?
- :prefix-list ::prefix-list
- :flag #{:reload :reload-all :verbose})))))
-
-(s/def ::package-list
- (s/spec
- (s/cat :package simple-symbol?
- :classes (s/* simple-symbol?))))
-
-(s/def ::import-list
- (s/* (s/alt :class simple-symbol?
- :package-list ::package-list)))
-
-(s/def ::ns-import
- (s/spec
- (s/cat :clause #{:import}
- :classes ::import-list)))
-
-(s/def ::ns-refer
- (s/spec (s/cat :clause #{:refer}
- :lib simple-symbol?
- :filters ::filters)))
-
-(s/def ::use-prefix-list
- (s/spec
- (s/cat :prefix simple-symbol?
- :suffix (s/* (s/alt :lib simple-symbol? :prefix-list ::use-prefix-list))
- :filters ::filters)))
-
-(s/def ::ns-use
- (s/spec (s/cat :clause #{:use}
- :libs (s/* (s/alt :lib simple-symbol?
- :prefix-list ::use-prefix-list
- :flag #{:reload :reload-all :verbose})))))
-
-(s/def ::ns-load
- (s/spec (s/cat :clause #{:load}
- :libs (s/* string?))))
-
-(s/def ::name simple-symbol?)
-(s/def ::extends simple-symbol?)
-(s/def ::implements (s/coll-of simple-symbol? :kind vector?))
-(s/def ::init symbol?)
-(s/def ::class-ident (s/or :class simple-symbol? :class-name string?))
-(s/def ::signature (s/coll-of ::class-ident :kind vector?))
-(s/def ::constructors (s/map-of ::signature ::signature))
-(s/def ::post-init symbol?)
-(s/def ::method (s/and vector?
- (s/cat :name simple-symbol?
- :param-types ::signature
- :return-type simple-symbol?)))
-(s/def ::methods (s/coll-of ::method :kind vector?))
-(s/def ::main boolean?)
-(s/def ::factory simple-symbol?)
-(s/def ::state simple-symbol?)
-(s/def ::get simple-symbol?)
-(s/def ::set simple-symbol?)
-(s/def ::expose (s/keys :opt-un [::get ::set]))
-(s/def ::exposes (s/map-of simple-symbol? ::expose))
-(s/def ::prefix string?)
-(s/def ::impl-ns simple-symbol?)
-(s/def ::load-impl-ns boolean?)
-
-(s/def ::ns-gen-class
- (s/spec (s/cat :clause #{:gen-class}
- :options (s/keys* :opt-un [::name ::extends ::implements
- ::init ::constructors ::post-init
- ::methods ::main ::factory ::state
- ::exposes ::prefix ::impl-ns ::load-impl-ns]))))
-
-(s/def ::ns-clauses
- (s/* (s/alt :refer-clojure ::ns-refer-clojure
- :require ::ns-require
- :import ::ns-import
- :use ::ns-use
- :refer ::ns-refer
- :load ::ns-load
- :gen-class ::ns-gen-class)))
-
-(s/fdef clojure.core/ns
- :args (s/cat :name simple-symbol?
- :docstring (s/? string?)
- :attr-map (s/? map?)
- :clauses ::ns-clauses))
-
-(defmacro ^:private quotable
- "Returns a spec that accepts both the spec and a (quote ...) form of the spec"
- [spec]
- `(s/or :spec ~spec :quoted-spec (s/cat :quote #{'quote} :spec ~spec)))
-
-(s/def ::quotable-import-list
- (s/* (s/alt :class (quotable simple-symbol?)
- :package-list (quotable ::package-list))))
-
-(s/fdef clojure.core/import
- :args ::quotable-import-list)
-
-(s/fdef clojure.core/refer-clojure
- :args (s/* (s/alt
- :exclude (s/cat :op (quotable #{:exclude}) :arg (quotable ::exclude))
- :only (s/cat :op (quotable #{:only}) :arg (quotable ::only))
- :rename (s/cat :op (quotable #{:rename}) :arg (quotable ::rename)))))
@@ -100,8 +100,8 @@
*command-line-args* *command-line-args*
*unchecked-math* *unchecked-math*
*assert* *assert*
- clojure.spec/*explain-out* clojure.spec/*explain-out*
- *1 nil
+ clojure.spec.alpha/*explain-out* clojure.spec.alpha/*explain-out*
+ *1 nil
*2 nil
*3 nil
*e nil]
@@ -12,7 +12,7 @@
^{:author "Chris Houser, Christophe Grand, Stephen Gilardi, Michel Salim"
:doc "Utilities meant to be used interactively at the REPL"}
clojure.repl
- (:require [clojure.spec :as spec])
+ (:require [clojure.spec.alpha :as spec])
) ;;;(:import (java.io LineNumberReader InputStreamReader PushbackReader)
;;; (clojure.lang RT Reflector)))
Oops, something went wrong.

0 comments on commit 32279cc

Please sign in to comment.