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

Equal doesn't work on tick/instant w/ advanced compilation #124

Closed
dehli opened this issue Nov 14, 2020 · 0 comments
Closed

Equal doesn't work on tick/instant w/ advanced compilation #124

dehli opened this issue Nov 14, 2020 · 0 comments

Comments

@dehli
Copy link

dehli commented Nov 14, 2020

Edit: After investigating some more, this seems to be an issue with cljs.java-time which is a dependency of cljc.java-time. I'd imagine it'll just require upgrading the library once this is addressed.

Hi, thanks for sharing this great repo! I'm getting an error when I try to call = between two instants. Below is the code and error it throws. Note, these errors only throw when doing a release build. In the context of the compiled code, this.equals does exist so it seems to be a missing extern. I have tried with infer externs enabled without luck.

(deftest tick-equality
  (is (= (t/instant "2020-11-14T05:59:33.757Z")
         (t/instant "2020-11-14T05:59:33.757Z"))))
ERROR in (tick-equality) (TypeError:NaN:NaN)
expected: (= (t/instant "2020-11-14T05:59:33.757Z") (t/instant "2020-11-14T05:59:33.757Z"))
  actual: #object[TypeError TypeError: this.$equals$ is not a function]

This gist showcases the error. I'll continue to investigate and follow up with what progress I make.

Thanks!

@dehli dehli changed the title Equal doesn't work on tick/instant Equal doesn't work on tick/instant w/ Advanced Compilation Nov 14, 2020
@dehli dehli changed the title Equal doesn't work on tick/instant w/ Advanced Compilation Equal doesn't work on tick/instant w/ advanced compilation Nov 14, 2020
@dehli dehli closed this as completed Nov 14, 2020
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

1 participant