Skip to content

Support clojure-dart #615

New issue

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

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

Already on GitHub? # to your account

Closed
jgoday opened this issue Apr 17, 2022 · 3 comments · Fixed by #616
Closed

Support clojure-dart #615

jgoday opened this issue Apr 17, 2022 · 3 comments · Fixed by #616

Comments

@jgoday
Copy link
Contributor

jgoday commented Apr 17, 2022

Support clojure-dart source files.

Currently, clojure-dart files are basically clojure source files that compiles to dart.
See:

Expected behavior

Clojure-mode should support clojure-dart files (.cljd).

Actual behavior

Current clojure-mode does not detect .cljd files.

Steps to reproduce the problem

Environment & Version information

clojure-mode version

clojure-mode (version 5.14.0)

Emacs version

28.0.91

Operating system

MacOS 12.0.1
jgoday added a commit to jgoday/clojure-mode that referenced this issue Apr 17, 2022
@jgoday jgoday mentioned this issue Apr 17, 2022
5 tasks
@bbatsov
Copy link
Member

bbatsov commented Apr 18, 2022

Are there any syntax differences between Clojure and ClojureDart?

@jgoday
Copy link
Contributor Author

jgoday commented Apr 18, 2022

Are there any syntax differences between Clojure and ClojureDart?

As pointed here: https://github.com/Tensegritics/ClojureDart/blob/main/doc/differences.md
there are some minor/very subtle differences (taken directly from clojureDart documentation)

  • Exceptions: Try/catch with additional stacktrace alongside with the exception
(try
  ...
  (catch io/HttpException e ; no stack trace binding
    ...)
  (catch Exception e st ; stack trace binding
    ...))
  • Member names as strings
(. a "[]=" i v)
  • Dart literals
#dart [1 2 3] ; a growable List<dynamic>
#dart ^:fixed [1 2 3] ; a fixed List<dynamic>
#dart ^int [1 2 3] ; a growable List<int>
#dart ^:fixed ^int [1 2 3] ; a fixed List<int>
  • Reify with extends
(reify
  :extends material/StatelesWidget
  (build [_ ctx] ...))

jgoday added a commit to jgoday/clojure-mode that referenced this issue Apr 18, 2022
bbatsov pushed a commit that referenced this issue Apr 18, 2022
@vemv
Copy link
Member

vemv commented Jul 19, 2022

Released as clojure-mode 5.15.0, which will be available within a couple hours

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants