Skip to content

Instantly share code, notes, and snippets.

@olivergeorge
Created July 2, 2012 00:16
Show Gist options
  • Save olivergeorge/3030159 to your computer and use it in GitHub Desktop.
Save olivergeorge/3030159 to your computer and use it in GitHub Desktop.
Sample code to demonstrate error when using cljs-binding with compiler optimisations
Uncaught Error: No protocol method ISeqable.-seq defined for type function: function () {cljsbinding.boot()}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
var CLOSURE_NO_DEPS = true;
</script>
<script src="test.min.js" type="text/javascript"></script>
<script>$(function() {cljsbinding.boot()})</script>
</body>
</html>
(defproject test "1.0.0-SNAPSHOT"
:description "Test compiling with optimisations for production"
:dependencies [[org.clojure/clojure "1.3.0"]
[fluentsoftware/cljs-binding "1.0.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "0.2.1"]]
:cljsbuild {
:builds {
:prod
{:source-path "src-cljs"
:compiler {:output-to "test.min.js"
:optimizations :advanced
:pretty-print false}}}})
(ns test
(:require [cljsbinding :as binding])
)
(js/console.log "hello from test")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment