Comments (16)
Hi David!
When you built the gem on 1.9.2, what version of rubygems were you using? (output of gem env
)
from psych.
1.6.2. I tried it again locally after upgrading to 1.7.2 as well. Same result.
I should add that I used bundler's build task. Not sure what that would mean, since it shells out to 'gem build', but one never knows.
from psych.
On that last note, I will try building directly and see if I get the same result - but I won't be able to do this until tomorrow evening in all likelihood.
from psych.
Oh - and one last thing:
Hi Aaron!
from psych.
Hi David!!
What commands did you use to build the gem? I can't seem to figure out the right command to do packaging via bundler.
Also, I tried building the gem on 1.9.2 like this:
$ gem build rspec-mocks.gemspec
The resulting gem installed fine on 1.9.2 and 1.8.7. Did you have to upload your gem to rubygems.org before it would break?
from psych.
Hi Aaron!!!
Bundler ships with some rake tasks that you can add to your Rake env like this:
Bundler::GemHelper.install_tasks
One of the tasks is 'build'
rake build
This shells out to "gem build": https://github.com/carlhuda/bundler/blob/1-0-stable/lib/bundler/gem_helper.rb#L40
I did have to upload my gem to rubygems.org before it would break. That makes this debugging effort extra special.
I fear I'm pointing you down a rabbit hole here. Let me figure out how to reproduce the problem, and then we can go from there. Good?
from psych.
Hi David!!!! ❤️
Sounds good. Let me know what you find!
from psych.
I am unable to reproduce this locally. It must have never happened and I must have been on crack. Closing this until the next time I'm on crack, only next time I'll take better notes.
from psych.
Hah! Okay. Let me know if you encounter this again!
from psych.
Hey - guess what? I'm an idiot, and my idiocy has made it so you can see what's actually happening here. I pushed rspec-2.6.0.rc3, which I built with rubygems-1.6.2 in ruby-1.9.2-p180 (rvm). Try "gem install rspec -v 2.6.0.rc3" and you'll see the error this issue.
I will now release 2.6.0.rc4, built on 1.8.7 :)
from psych.
FYI: rspec/rspec-core#358, rspec/rspec-dev#17
from psych.
Oh, and https://rubygems.org/gems/rspec/versions/2.6.0.rc3.
from psych.
OK - I now have steps to reproduce.
- Go to https://rubygems.org/gems/rspec/versions/2.6.0.rc1 and download the gem
- In a ruby-1.9.2 env, run
gem spec rspec-2.6.0.rc1
and you'll see gem dependencies that look like this:
- !ruby/object:Gem::Dependency name: rspec-mocks requirement: &2152509300 !ruby/object:Gem::Requirement none: false requirements: - - = - !ruby/object:Gem::Version version: 2.6.0.rc4 type: :runtime prerelease: false version_requirements: *2152509300
- Now switch to ruby 1.8.7 and run
gem spec rspec-2.6.0.rc1
and you'll see gem dependencies that look like this:
- !ruby/object:Gem::Dependency name: rspec-expectations prerelease: false requirement: &id002 !ruby/object:Gem::Requirement none: false requirements: - - !ruby/object:YAML::Syck::DefaultKey {} - !ruby/object:Gem::Version hash: 15424061 segments: - 2 - 6 - 0 - rc - 4 version: 2.6.0.rc4 type: :runtime version_requirements: *id002
Same is true of rc3,which I am now going to yank.
If you want to really see this in action:
rvm 1.9.2@rspec-dev --create git clone git://github.com/rspec/rspec-dev cd rspec-dev rake setup # wait a while rake gem:build cd repos/rspec rake clobber rake build gem spec pkg/rspec-2.6.0.rc4 # assuming you do this before the next release rvm 1.8.7@rspec-dev --create bundle install gem spec pkg/rspec-2.6.0.rc4
from psych.
Given the fact that psych is included (but not compiled into) ruby 1.9, I imagine it would be hard to ship a fix for 1.9.2 for this. And given the fact that pysch and syck have known differences, I'm not entirely sure what the solution will be.
Instead, I'm wondering if gemcutter should reject any gems that have a YAML gemspec file that is unparseable by Syck. It could be part of what runs on gem push my_gem
.
from psych.
Either what @myronmarston suggested or perhaps rubygems could warn when building a gem in an environment with Pysch compiled into it.
from psych.
This is reported to rubygems:
http://rubyforge.org/tracker/index.php?func=detail&aid=29163&group_id=126&atid=575
from psych.
Related Issues (20)
- Dates with five digit years throw exception HOT 1
- Prevent snakeYAML add backslash when dump multiple line string HOT 1
- YAML.dump(date) generates warnings with Rails 7.0.7+ HOT 1
- [DOC] Link fragment does not work
- YAML 1.2 compliance possibly breaking VCR HOT 3
- Add settings for alias limits, recursion, and duplicate keys HOT 8
- TypeError: allocator undefined for Nokogiri::HTML5::Document on YAML.unsafe_load_file HOT 3
- Psych 5.1.1 fails to load on JRuby 9.x HOT 10
- Singleton Classes Aren't round-trippable
- Issue between psych and mini_racer on platform x86_64-linux HOT 1
- Psych::DisallowedClass when loading fixtures HOT 3
- Strange `FrozenError` on `Psych.load` HOT 1
- Kernel.y interferes with code relying on method_missing HOT 3
- SSL issues preventing installation HOT 1
- yaml parsing is wrong when key's value has leading colon HOT 1
- Preserve quote style while changing a YAML file
- Serialisation of invalid dates is incorrect (maybe?)
- Psych::Nodes::Scalar::LITERAL ignored in encode_with?
- EJSON Failing to Parse Special Characters Through Psych HOT 1
- Some strings that look like date/timestamps are not quoted when dumped
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psych.