Skip to content
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

Gem::Specification#platform= should reset #cache_file #78

Closed
luislavena opened this issue Jun 8, 2011 · 0 comments
Closed

Gem::Specification#platform= should reset #cache_file #78

luislavena opened this issue Jun 8, 2011 · 0 comments

Comments

@luislavena
Copy link
Member

At rake-compiler project, we accept a Gem::Specification object and we duplicate it to be able to generate native gems of it.

Problem is, once we dup'ed the gemspec, changing platform do alter the memoized value of cache_file

I know, the eternal cache invalidation ;-)

Steps to reproduce:

spec1 = Gem::Specification.new do |s|
  s.platform = Gem::Platform::RUBY
  # ...
end
puts s1.cache_file

s2 = s1.dup
s2.platform = "x86-mingw32"

puts s2.cache_file

I can't control when the gemspec will be dup'ed as rake-compiler might be loaded later or before the user defined packaging task.

@ghost ghost assigned zenspider Jun 8, 2011
@ghost ghost assigned luislavena Oct 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants