You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems similar to #147 in that @platform and @original_platform differ, and original_platform is being used for spec.to_ruby.
When building with something that calls spec.to_ruby, the original platform is kept, and a gem with the suffix of the new platform is generated, but the manifest lists the incorrect platform
Did you try upgrading RubyGems?
Yes
Post steps to reproduce the problem
bundler gem examplegem
Add spec.platform=Gem::Platform.local (and fix the TODO's) in the gemspec
Change the rakefile to the below
rake doit && tar xfO pkg/examplegem-0.1.0-java.gem metadata.gz | zcat | grep platform; rm -rf pkg
Note the output of the "java" gem: platform: x86_64-linux. This is incorrect
Modifying the Rakefile to set the undocumented original_platform spec.original_platform = spec.platform = Gem::Platform.new("java") outputs the correct result:
platform: java
The text was updated successfully, but these errors were encountered:
result << " s.platform = #{ruby_codeoriginal_platform}"
byteit101
changed the title
gem task/spec.to_ruby use current platform, not spec.platform
gem task/spec.to_ruby uses current platform, not spec.platform
Nov 13, 2022
Describe the problem as clearly as you can
This seems similar to #147 in that @platform and @original_platform differ, and original_platform is being used for spec.to_ruby.
When building with something that calls
spec.to_ruby
, the original platform is kept, and a gem with the suffix of the new platform is generated, but the manifest lists the incorrect platformDid you try upgrading RubyGems?
Yes
Post steps to reproduce the problem
bundler gem examplegem
spec.platform=Gem::Platform.local
(and fix the TODO's) in the gemspecrake doit && tar xfO pkg/examplegem-0.1.0-java.gem metadata.gz | zcat | grep platform; rm -rf pkg
Note the output of the "java" gem:
platform: x86_64-linux
. This is incorrectRakefile
Workaround
Modifying the Rakefile to set the undocumented original_platform
spec.original_platform = spec.platform = Gem::Platform.new("java")
outputs the correct result:The text was updated successfully, but these errors were encountered: