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

[#4] make compatible with GraalVM #5

Merged
merged 2 commits into from
Apr 1, 2020
Merged

[#4] make compatible with GraalVM #5

merged 2 commits into from
Apr 1, 2020

Conversation

borkdude
Copy link
Contributor

@borkdude borkdude commented Apr 1, 2020

See #4.

@@ -314,14 +314,15 @@
'namespace/name'."
(fn [_output thing]
(cond
(instance? (RT/classForName "[B") thing) :bytes
(nil? thing) :list
(-> thing class .getComponentType (= Byte/TYPE)) :bytes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a good idea to add a comment here we've borrowed this from Clojure 1.9.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

(instance? InputStream thing) :input-stream
(integer? thing) :integer
(string? thing) :string
(symbol? thing) :named
(keyword? thing) :named
(map? thing) :map
(or (nil? thing) (coll? thing) (.isArray (class thing))) :list
(or (coll? thing) (.isArray (class thing))) :list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated, so probably it should be in a different commit, so people won't think it's something to do with GraalVM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That change is not unrelated though. As explained, the nil check was moved up, since we needed that in the check for bytes.

@bbatsov bbatsov merged commit 0d40496 into nrepl:master Apr 1, 2020
@bbatsov
Copy link
Contributor

bbatsov commented Apr 1, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants