Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Klipse cannot be built with shadow-cljs #353

Open
strontian opened this issue Dec 9, 2019 · 14 comments
Open

Klipse cannot be built with shadow-cljs #353

strontian opened this issue Dec 9, 2019 · 14 comments

Comments

@strontian
Copy link

Trying to build a project with shadow-cljs when klipse is a dependency causes this error:

Externs must contain builtin for env BROWSER: whatwg_console.js

See below:

thheller/shadow-cljs#615

@viebel
Copy link
Owner

viebel commented Dec 26, 2019

I am aware of this issue.
Feel free to open a PR that makes Klipse compatible with shadow-cljs

@workshub
Copy link

workshub bot commented Jun 2, 2020

This issue is now published on WorksHub. If you would like to work on this issue you can
start work on the WorksHub Issue Details page.

@workshub
Copy link

workshub bot commented Jun 2, 2020

If you successfully complete this Issue via WorskHub there's a $180 reward available.
Start work via WorksHub Issue Details page.

@workshub
Copy link

workshub bot commented Jun 24, 2020

A user started working on this issue via WorksHub.

@Bost
Copy link

Bost commented Jun 28, 2020

I think the "culprit" is the commit clojure/clojurescript@c1cf559#diff-0333a2f6436dc06f1d021fa4c2ac5525L51 more specifically the missing (:infer-externs options)

This helps https://github.com/Bost/clojurescript/commit/3ae53198837813c7eb2707402d43c358f7299152

BTW I analysed the problem using the https://gitlab.com/viebel/clojurescript-reagent-klipse-demo and found out it may have something to do with leiningen: clojure -m figwheel.main works but when you run it with lein fig using the project.clj below it does not.

(defproject clojurescript-reagent-klipse-demo
  "0.0.0"

  :description ""
  :url ""
  :license {:name "Eclipse Public License v1.0"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies
  [
   [org.clojure/clojure
    #_"1.10.0"
    "1.10.1"
    ]
   [org.clojure/clojurescript
    "1.10.782" ;; Upgrade to closure-compiler-unshaded "v20200614"

    ;; "1.10.773" ;; latest - bad
    ;; "1.10.764"
    ;; "1.10.758"
    ;; "1.10.756"
    ;; "1.10.753"
    ;; "1.10.748"
    ;; "1.10.742" ;; bad
    ;; "1.10.741"
    ;; "1.10.740"
    ;; "1.10.739" ;; bad
    ;; "1.10.738" ;; bad
    ;; "1.10.720" ;; bad custom build
    ;; "1.10.719" ;; good custom build
    ;; "1.10.717" ;; good custom build
    ;; "1.10.715" ;; good custom build
    ;; "1.10.711" ;; good custom build
    ;; "1.10.702" ;; good custom build
    ;; "1.10.667" ;; good custom build
    ;; "1.10.597" ;; good with warn
    ;; "1.10.520" ;; good with warn
    ]

   [viebel/klipse "7.9.6"] ;; latest

   ;; [reagent "0.10.0"]
   ;; [reagent-utils "0.3.3"]
   ;; [cljs-ajax "0.8.0"]
   ;; [pez/clerk "1.0.0"]
   ;; [metosin/reitit "0.5.2"]
   ;; [venantius/accountant "0.2.5"]

   ;; [devcards "0.2.7"]
   [com.bhauman/figwheel-main "0.2.9"]
   ;; [cider/piggieback "0.5.0"]
   ;; [com.bhauman/rebel-readline-cljs "0.1.4"]

   ]

  ;; :source-paths ["src"]
  ;; setup target as a resource path
  :resource-paths ["target" "resources"]
  ;; set up an alias to invoke your figwheel build
  :aliases {"fig" ["trampoline" "run" "-m" "figwheel.main"]
            "build-dev" ["trampoline" "run" "-m" "figwheel.main" "-b" "dev" "-r"]}
  )

@workshub
Copy link

workshub bot commented Jun 28, 2020

@Bost started working on this issue via WorksHub.

@workshub
Copy link

workshub bot commented Jan 31, 2021

@irynadunets started working on this issue via WorksHub.

@wilkerlucio
Copy link

I'm having a different issue, when I try to build with Shadow I get:

The required namespace "cljsjs.codemirror.addon.edit.matchbrackets" is not available, it was required by "klipse/ui/editors/editor.cljs".

This one seems simpler, some cljsjs stubs could fix it, has someone done this part? Or know if the current status is different?

@Bost
Copy link

Bost commented Mar 9, 2021

Or know if the current status is different?

I've got no reaction to my findings so I sorta abandoned this klipse project. ¯\_(ツ)_/¯

@viebel
Copy link
Owner

viebel commented Mar 9, 2021

No, noe @Bost . Please don't abandon Klipse.
I'll try to address your comments soon.

@viebel
Copy link
Owner

viebel commented Mar 10, 2021

Compiling Klipse with shadow-cljs requires extra care as it involves self-hosted (bootstrapped) ClojureScript.
First step would be to be able to complile klipse-clj with shadow-cljs.
There is a piece in shadow-cljs that explains how to compile code that involves self-hosted ClojureScript.

@cjqw
Copy link

cjqw commented May 8, 2021

Meet the same issue with figwheel.

@workshub
Copy link

workshub bot commented Jul 22, 2021

A user started working on this issue via WorksHub.

@workshub
Copy link

workshub bot commented Aug 13, 2021

@ZabelTech started working on this issue via WorksHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants