Skip to content

Conversation

Malabarba
Copy link
Contributor

It seems assertions need a pair of brakets around them.

razum2um added a commit that referenced this pull request Mar 28, 2015
Fix ill-defined assertion
@razum2um razum2um merged commit e1aac03 into razum2um:master Mar 28, 2015
@razum2um
Copy link
Owner

@Malabarba thanks. without brackets the assertion got inverted:

user=> (defn f [x] {:pre (not (nil? x))} (prn x))
#'user/f
user=> (f nil)
nil
nil
user=> (f 1)

AssertionError Assert failed: (nil? x)  user/f (form-init8526694049218854550.clj:1)

@bbatsov
Copy link
Contributor

bbatsov commented Mar 28, 2015

@razum2um Can we get a bugfix release?

@razum2um
Copy link
Owner

@bbatsov I'm sorry for 0.1.5 which really shows the lack of specs :( , but I'm short of time and besides, not really heavily using it by myself recently, but I will hopefully try my best to get it working properly and to compete at least with byebug features seen it ruby land, which I came from (and I know you mostly by rubocop ;)

tl'dr deployed 0.1.6

@bbatsov
Copy link
Contributor

bbatsov commented Mar 28, 2015

Thanks!

@bbatsov I'm sorry for 0.1.5 which really shows the lack of specs :( , but I'm short of time and besides, not really heavily using it by myself recently, but I will hopefully try my best to get it working properly and to compete at least with byebug features seen it ruby land, which I came from (and I know you mostly by rubocop ;)

No worries, it's pretty much the same for me. I don't use Clojure at work (much), it's mostly a hobby of mine. I have a feeling that clj-debugger might become a pretty popular tool in Clojure-land, given the absence of any serious alternatives. :-)

Btw, I work with @kossnocorp and @tukan. Small world I guess. :-)

@Malabarba
Copy link
Contributor Author

thanks. without brackets the assertion got inverted:

Yes, that's how I found out about it. But it's very surprising that sometimes it works without the brackets. I think it's because clojure interprets (nil? x) as [nil? x].

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.

3 participants