Closed avdi closed 8 years ago
I've experienced the same problem. Rolling back the parser
gem version to 2.2.3.0
worked.
I experience the same thing and but with the seeing_is_believing vim plugin. And I cant downgrade the version because rubocop requires a higher one.
Aye. They have a newer version that probably works. I've been intending to try to upgrade, but too many plates to keep them all spinning. If anyone wants to try restricting the version or updating the code, I'm happy to pull (prob ping me on Twitter, issues get lost in my inbox).
Oh, in the interim, you can specify the version to use for a gem with a special argument (eg if you can't an an env var)
$ rails -v
Rails 4.2.5
$ rails _4.2.2_ -v
Rails 4.2.2
I've got it mostly there. It fixes this common issue (against Parser's HEAD, the change isn't released yet). But other changes prevent it from extracting valid comments (ie clearing the annotations partway through an edit that leaves the file in an invalid state).
I was trying to get seeing_is_believing (s_i_b) working with Sublime Text 3 and was also getting a parser error. It was suggested by Josh to downgrade from my current parser gem of parser-2.3.0.6
to parser-2.2.2.6
by doing a gem uninstall parser
, then reinstall the older version with gem install parser --version 2.2.2.6
. That's is the parser version s_i_b was written against. This worked for me! I verified by running this at the terminal with seeing_is_believing -e '1+1'
which printed out 1+1 # => 2
, I also verified by going into sublime and writing something in ruby to be evaluated (eg. 2 + 2
). That worked too.
You should be able to get a working version now, with $ gem install seeing_is_believing --version 3.0.0.beta.7
I understand that I should obviously just release v3.0, but give me 3 months more, and then you can yell at me and I'll say "yes, you're right". Part of the problem is the implication of major versions, so I pushed a lot of changes towards this, rather than feeling comfortable releasing them incrementally :(
Here are all the commits since last release.
They pushed a newer version of parser, largely b/c of this issue, 4 days ago. I just released a new version of SiB https://rubygems.org/gems/seeing_is_believing/versions/3.0.0.beta.7
BasicObject
got added hereI think that's most of it. The crux of it is that my deps updated while I was busy, and SemVer wasn't sufficient to imply that they would break SiB, so when they updated, the newer deps got downloaded and ran with SiB,
Thanks a lot, Josh!
On Tue, Mar 29, 2016 at 11:55 PM Josh Cheek notifications@github.com wrote:
How to fix the issue!!
You should be able to get a working version now, with $ gem install seeing_is_believing --version 3.0.0.beta.7 I understand that I should obviously just release v3.0, but give me 3 months more, and then you can yell at me and I'll say "yes, you're right". Part of the problem is the implication of major versions, so I pushed a lot of changes towards this, rather than feeling comfortable releasing them incrementally :( Commits
Here https://github.com/JoshCheek/seeing_is_believing/compare/252911d...e73fced are all the commits since last release. Synopsis
They pushed a newer version of parser, largely b/c of this issue, 4 days ago. I just released a new version of SiB https://rubygems.org/gems/seeing_is_believing/versions/3.0.0.beta.7
- The largest issue was due to changes which disallowed multiple insertions at the same location (change is here https://github.com/whitequark/parser/pull/277). When I discovered the issue, I pointed out SiB's use case here https://github.com/whitequark/parser/pull/259#issuecomment-184513762. Parser added an API to re-enable this functionality, largely b/c SiB needs it, here https://github.com/whitequark/parser/pull/277.
- The ability to edit invalid files was temporarily lost, I whined about it https://github.com/whitequark/parser/issues/281 and they pointed out that there's a way better way to do it than I was doing, so now it's back https://github.com/JoshCheek/seeing_is_believing/commit/add87f1d87d12da380eb3bfdba4287d2a534ba37 .
- Some tests were failing b/c of this https://github.com/whitequark/parser/issues/283, I just removed them, here https://github.com/JoshCheek/seeing_is_believing/commit/add87f1d87d12da380eb3bfdba4287d2a534ba37
- Found a bug in MRI https://bugs.ruby-lang.org/issues/12073 and Parser https://github.com/whitequark/parser/issues/274, which is now fixed.
- I also fixed a bug https://github.com/JoshCheek/seeing_is_believing/issues/59 around explicit warning, while I was in there.
- A while back, an unreleased fix on recording instances of BasicObject got added here https://github.com/JoshCheek/seeing_is_believing/commit/37ad246
I think that's most of it. The crux of it is that my deps updated while I was busy, and SemVer wasn't sufficient to imply that they would break SiB, so when they updated, the newer deps got downloaded and ran with SiB,
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/JoshCheek/seeing_is_believing/issues/69#issuecomment-203235161
Thanks :clap:
My favorite tool is back!
Recently
sib
started blowing up on me, and I traced it to theparser
gem version. I had the latest version (2.3.0.6) installed, along with an older one (2.2.3.0). When I removed the newer version, stuff started working again.Here's the error I was getting on any Ruby source code: