-
Notifications
You must be signed in to change notification settings - Fork 25
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
Catch up with CLJS 1.10.520 #41
Comments
I have some concern here in regards to I can help with QA-ing things 😄 |
I would really appreciate some help with this, if you guys are up for it. I've spoken a bit with @bhb about the breaking changes in CLJS and ended up reverting some bits so orchestra and expound could continue working together (since they're love & marriage, as far as I'm concerned). Ideally we can move both them forward together. |
#42 should make co-developing new features in orchestra + expound easier. |
Another suggestion: It's possible to support older versions of CLJS via Example: https://github.com/borkdude/speculative/blob/master/src/speculative/specs.cljc#L9 |
I was hoping the "Improved Exception Messages and Printing" fixes would fix compatibilities with Expound, but my initial testing indicates that this is only partially fixed. I'll have more time to dig in this weekend. |
I have to confirm, kind of taking back what I have said on Slack. I receive now as instrumentation error that does not contain the On the other end, the latest |
Maybe make a JIRA issue about this in CLJS? |
Something like https://dev.clojure.org/jira/browse/CLJS-2913 ? ;)
|
But yes, I will make a follow up JIRA once I have isolated a minimal repro 😄
|
@arichiardi There are a lot of moving parts here. Can you post a repro including CLJS version, CLJ version, spec version, and if you are calling a function or a macro? |
This is a good idea in general, but wouldn't have caught the particular bug I know about, because the bug is that the REPL doesn't call expound (or any custom printer) correctly. I suppose expound could do some acrobatics to test the REPL layer, but that seems out of scope? |
There seem to be tests around CLI usage here: https://github.com/clojure/clojurescript/blob/master/src/test/cljs_cli/cljs_cli/test.clj |
@borkdude That's a good point. To summarize the situation with 1.10.516 and Expound
I'll add some new documentation on Expound/CLJS compat https://github.com/bhb/expound/blob/078673b8c5bb42f3bcc9a8c2abf53d945d77efdb/doc/compatibility.md |
From the compatibility matrix on master I understand that expound works with clj 1.10 + 1.10.516 equally well as it did with 1.0 + 1.10.349? |
That's correct. |
TL;DR:
If there's any documentation about what Orchestra changes to vanilla CLJS spec, catching up would be easier: copy the existing code from CLJS and apply those changes, run the tests, done? |
Awesome. Thanks, guys, for tracking this down. I'll get the dirty work done with the upstream sync this weekend. We don't have docs for all of the changes, but we do have tests for them. |
I've deployed This is also working just fine with the Expound |
@jeaye Thanks! So far I've seen no errors when running with speculative. A ret spec violation looks as follows now:
Is that how it should look? |
Everything on Orchestra's end, as far as instrumentation goes, looks correct there. However, due to the fact that the REPL is now the one printing the spec failure, you're not getting proper reporting of the return value and spec. Will you try the same thing, but with Expound enabled? I believe that should handle the It could be that Orchestra should either require Expound or that we need to implement our own printing of spec failures in the REPL. Basically the same code as upstream, but with |
I was just checking. It seems to be it would be nice to be able to plug your own error printers and not require a specific one (expound) although that could be recommended in the README?
Maybe as a feature in a future version? |
It may be necessary, even for this version. Otherwise, REPL reporting is borked. I'm not familiar with how to hook up custom REPL error printers. If any of you feel like taking a crack at it, by all means, please do. I'll be able to take a look at it over this weekend otherwise. I'll leave this build as a snapshot until this is sorted out. |
I don't get it... with
it doesn't pick up line number which is not very helpful, but not a big deal. So I replaced it with
So it now become even less helpful? |
Correct, since error reporting is no longer done by spec, it's done by the REPL printer. That is precisely what I meant when I said (in the comment above yours):
Furthermore, if you have something catching spec errors outside the REPL, you'll now need to manually print them using spec's explain functions or something link expound. This has nothing to do with Orchestra and is just the way upstream spec is dealing with things now. It's more flexible, but it's more work for everyone. |
There have been several significant improvements and fixes to clojure.spec in CLJS 1.10.516.
Most of them are listed here:
https://github.com/borkdude/speculative/blob/master/doc/issues.md#fixed-and-released
The text was updated successfully, but these errors were encountered: