flower icon indicating copy to clipboard operation
flower copied to clipboard

SUGGESTION: Rewrite in pure Emacs Lisp (and fails to run nrepl on MacOS)

Open rswgnu opened this issue 5 years ago • 7 comments
trafficstars

This would be so much more useful if you wrote a replica in pure Emacs Lisp, removing all Clojure dependencies as getting Clojure setup properly can be quite involved.

For example, I used 'brew' on MacOS to install clojure and leiningen but flower still did not work, some failure in starting up the repl, even though it found it in the path.

rswgnu avatar Oct 21 '20 01:10 rswgnu

Thanks for the suggestion @rswgnu - sounds good but it requires some enormous investment of effort

The most probable issue which prevents the Emacs setup from working might be the same one which prevent pure Clojure version from working: https://github.com/PositiveTechnologies/flower/issues/95#issuecomment-640757785 (we need to release new version which already includes fixes).

Please stay with us for a while. Output from Emacs startup logs will be also be very helpful here.

profitware avatar Oct 21 '20 15:10 profitware

@rswgnu also please consider that default installation of Emacs on Mac OS X cannot find Leiningen in its exec-path which doesn't include /usr/local/bin by default, so some additional steps like (add-to-list 'exec-path "/usr/local/bin") may be required (just reproduced this today). Source: https://stackoverflow.com/a/32151059

profitware avatar Oct 21 '20 23:10 profitware

Thanks for the tip but /usr/local/bin is in my PATH.

Here's the stack trace and cascading list of unfound libraries in the error on MacOS 10.14.6:

Debugger entered--Lisp error: (error "Could not start nREPL server: Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.\nCould not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in central (https://repo1.maven.org/maven2/)\nCould not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in clojars (https://repo.clojars.org/)\nCould not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in atlassian-public (https://maven.atlassian.com/content/repositories/atlassian-public/)\nCould not find artifact com.atlassian.fugue:fugue:jar:2.6.1 in eclipse-releases (https://repo.eclipse.org/content/groups/releases/)\nFailed to read artifact descript...") signal(error ("Could not start nREPL server: Java HotSpot(TM) 64-...")) error("Could not start nREPL server: %s" "Java HotSpot(TM) 64-Bit Server VM warning: Options...") nrepl-server-sentinel(# "exited abnormally with code 1\n")

rswgnu avatar Oct 22 '20 00:10 rswgnu

Yes, seems the same as in https://github.com/PositiveTechnologies/flower/issues/95#issue-452375274

I won't be closing the issue as duplicate until fully checking that everything works in Emacs as intended.

Thank you again for the issue. You will get a comment here once we build new release with @harlov

profitware avatar Oct 22 '20 00:10 profitware

Based on the issue profitware linked to above, I just substituted flower and clojure versions in the Emacs flower/project.clj file and things started working. So you could fix this by just making these updates without even having to merge the new branch.

(defproject flower "0.4.7-SNAPSHOT"
  :description "Flower is a library for integration with task trackers, repositories, messaging systems and more"
  :url "http://github.com/PositiveTechnologies/flower"
  :license {:name "MIT License"
            :url "https://opensource.org/licenses/MIT"}
  :plugins [[lein-sub "0.3.0"]
            [lein-ancient "0.6.15"]
            [lein-bump-version "0.1.6"]]
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [flower/flower-tracker "0.4.7-SNAPSHOT"]
                 [flower/flower-repository "0.4.7-SNAPSHOT"]
                 [flower/flower-messaging "0.4.7-SNAPSHOT"]
                 [flower/flower-team "0.4.7-SNAPSHOT"]
                 [flower/flower-utilities "0.4.7-SNAPSHOT"]
                 [flower/flower-integration-default "0.4.7-SNAPSHOT"]
                 [flower/flower-integration-github "0.4.7-SNAPSHOT"]
                 [flower/flower-integration-gitlab "0.4.7-SNAPSHOT"]
                 [flower/flower-integration-jira "0.4.7-SNAPSHOT"]
                 [flower/flower-integration-tfs "0.4.7-SNAPSHOT"]]
  :aliases {"test" ["do" ["ancient-all"] ["sub" "lint-and-test-all"]]
            "bump-all" ["do" ["bump-version"] ["sub" "bump-version"]]
            "ancient-all" ["do" ["ancient"] ["sub" "ancient"]]
            "deploy-all" ["do" ["sub" "deploy" "clojars"] ["deploy" "clojars"]]}
  :sub ["flower-proto"
        "flower-common"
        "flower-integration-default"
        "flower-integration-github"
        "flower-integration-gitlab"
        "flower-integration-jira"
        "flower-integration-tfs"
        "flower-integration-exchange"
        "flower-integration-slack"
        "flower-tracker"
        "flower-repository"
        "flower-messaging"
        "flower-team"
        "flower-utilities"
        "lein-template"]
  :profiles {:1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]}
             :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]}
             :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}
             :dev {:dependencies [[org.clojure/tools.namespace "0.2.11"]]}})

rswgnu avatar Oct 22 '20 00:10 rswgnu

Thank you for the workaround. Let it reside here until branches merge.

profitware avatar Oct 22 '20 01:10 profitware

@rswgnu please check if 0.4.7 release version works for you. It has been updated in MELPA already: https://melpa.org/#/flower

profitware avatar Oct 23 '20 09:10 profitware