From a38fcf47217309e61894f7b81da9c5d96c4902bc Mon Sep 17 00:00:00 2001 From: Josh Cheek Date: Wed, 14 Jan 2015 05:49:47 -0700 Subject: [PATCH] Start prioritizing todos into v3 and v4 stuff I could sit here and fiddle with this shit forever, start choosing what I actually need to release v3 so I can put it out of mind for a while. --- Readme.md | 36 ++++++++++++++++++++---- lib/seeing_is_believing/binary/config.rb | 17 ----------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/Readme.md b/Readme.md index 6107f1b..9747754 100644 --- a/Readme.md +++ b/Readme.md @@ -99,13 +99,39 @@ Known Issues This code will be wrapped. But using the value is syntactically invalid in Ruby, because it constitutes a "void value expression" (aka a nightmare for anyone working with code). I can't easily check it to seee if it's void since it's not in the parsed AST. But it's so edge taht I don't think it's worth worrying about. -Shit that will probably never get done (or if it does, won't be until after 2.0) -================================================================================ +Version 2 +========= + +Feature complete, I'll fix bugs in it until version 3 is released, though + +Version 3 +========= + +These need to be done before release: + +* Add default to number of captures (1000), require user to explicitly set it to infinity +* Update changelog with all changes +* Push the event stream up to the top level so we can expose it via the interface. +* Get it working on JRuby and Rbx +* Order frog stickers +* Figure out how to handle markers + +Version 4 +========= * How about if begin/rescue/end was able to record the result on the rescue section -* How about if you could configure which kinds of results ou were interested in (e.g. turn on/off recording of method definitions, and other results) -* What about recording the result of a line inside of a string interpolation, e.g. "a#{\n1\n}b" could record line 2 is 1 and line 3 is "a\n1\nb" -* If given a file with a Unicode character, but not set Unicode, inform the user +* How about if you could configure which kinds of results you were interested in + (e.g. turn on/off recording of method definitions, and other results) +* What about recording the result of a line inside of a string interpolation, + e.g. "a#{\n1\n}b" could record line 2 is 1 and line 3 is "a\n1\nb" + This would require smarter annotators. +* Allow debugger to take a filename (ie debug to a file insteaad of to stderr) +* `--cd dir` cd to that dir before executing the code +* `--cd -` cd to the dir of the file being executed before executing it +* `--only-show-lines` output only on specified lines (doesn't change stdout/stderr/exceptions) +* More alignment strategies e.g. `min=40` would align to 40, unless that was too short. + Could have fallback strategies, so e.g. `-s min=40,fallback=line` +* Package Ruby with the editor downloads so that they don't require you to know so fkn much to set it up. Inspiration =========== diff --git a/lib/seeing_is_believing/binary/config.rb b/lib/seeing_is_believing/binary/config.rb index ceabacd..818aa29 100644 --- a/lib/seeing_is_believing/binary/config.rb +++ b/lib/seeing_is_believing/binary/config.rb @@ -35,9 +35,7 @@ def self.to_regex(string) stderr: to_regex('^#\s*!>\s*') end - # passed to annotator.call - # TODO: move AnnotatorOptions to uhm, annotator or something class AnnotatorOptions < StrictHash attribute(:alignment_strategy) { AlignChunk } attribute(:markers) { Markers.new } @@ -46,10 +44,6 @@ class AnnotatorOptions < StrictHash attribute(:max_result_length) { Float::INFINITY } end - # TODO: just a thought here: - # the binary is goind to do one of four things: - # print_version, print_cleaned, print_help, and evaluate - # might make sense to implement a state machine on these rather than setting all these boolean flags and having to check them down in finalize predicate(:print_version) { false } predicate(:print_cleaned) { false } predicate(:print_help) { false } @@ -70,17 +64,6 @@ class AnnotatorOptions < StrictHash attribute(:lib_options) { SeeingIsBelieving::Options.new } # passed to SeeingIsBelieving.new attribute(:annotator_options) { AnnotatorOptions.new } - # TODO: allow debugger to take a filename - - # TODO: --cd dir | --cd :file: - # when given a dir, cd to that dir before executing the code - # when not given a dir, cd to the dir of the file being executed before executing it - - # TODO: --only-show-lines - # Output only on specified lines (doesn't change stdout/stderr/exceptions) - - # TODO: --alignment-strategy n-or-line / n-or-chunk / n-or-file (help-file should prob just link to cuke examples) - # add default to number of captures (1000), require user to explicitly set it to infinity def parse_args(args, debug_stream) as = nil filenames = []