-
-
Notifications
You must be signed in to change notification settings - Fork 759
Issues with stream configuration / deprecation formatter #1127
Comments
I don't recall specifically. Risk of changing it is external runners that rely on that signature. |
Do you know of any external runners? It would be nice to look into them to see how much this might affect users and gem authors. |
There are probably more, and I haven't looked into how they work, but here are 3: https://github.com/grosser/parallel_tests |
Perhaps we should pass in the configuration rather than the output streams directly to the deprecation formatter, and have it fall back to |
+1 on defaulting |
I'm working something up now |
Hmm, merging #1130 is causing problems for me now. I've spent the last hour trying to understand why I'm not getting any spec output and I think I just figured it out. To repro what I'm seeing, checkout 2-99-maintenance and go to this block in rspec-core/lib/rspec/core/option_parser.rb Lines 65 to 72 in 0c9c2ab
...and add a line like Here's what's going on:
So basically...if the reporter is accessed before This is screwy :(. I need to head to bed now (still didn't make any further progress on the ordering API deprecations; my evening was taken up by tracking down why I wasn't getting spec output!) but I plan to take a stab at implementing some of the things I've outlined above later this weekend. @JonRowe, that may involve reverting the merge of #1130 as I really think we need to take this in a different direction to get this unscrewed. One other idea I have is to implement some other kind of deferred depecation mechanism so that things that need to issue deprecations before everything has been set up don't get things into this bad state. That seems excessively complicated and I hope to fix things up so that that's not necessary. We'll see. |
I'm working on #1092 and I've run into a larger issue that I'd like some feedback on before attempting to solve.
When adding a deprecation for
--order default
(which is--order defined
in RSpec 3), get this error:Here's what's going on:
RSpec::Core::Configuration#output_stream
is initiallynil
; it gets assigned lazily inRSpec::Core::CommandLine#run
. The||=
there goes back to this commit, which, unfortunately, lacks a spec.So, a few things I'm considering:
output_stream
to$stdout
inRSpec::Core::Configuration#initialize
so that it is never nil.RSpec::Core::Configuration#output_stream
and#error_stream
being settable off of the config object and also being set viaCommandLine#run
. @dchelimsky, do you remember whyrun
accepts those args? Any reason not to remove them and just default the values on the config object and then allow users to overwrite them there? It would simplify this considerably, I think./cc @soulcutter @JonRowe @xaviershay @samphippen
The text was updated successfully, but these errors were encountered: