-
-
Notifications
You must be signed in to change notification settings - Fork 2k
force_ruby_platform misses gemspec dependencies on Windows #6801
Comments
I don't have a windows machine handy, so can you check if #6809 fixes the sample project? |
@segiddins Thanks so much for working on this! I don't have a windows machine either, but I can configure appveyor :) I tried to use your fix in the sample project's appveyor configuration. When using it, |
Huh, the test shows the file is requireable.... |
Maybe it's related with the way I'm testing your patch. I'm doing something quite weird: |
Ah yeah. -r will come before the require Bundler puts in RUBYOPT |
I see! Tried it in a different way and it worked now 👉 https://ci.appveyor.com/project/deivid-rodriguez/force-ruby-platform-test/builds/20567819. |
6809: Fix using gemspec & force_ruby_platform on windows r=deivid-rodriguez a=segiddins ### What was the end-user problem that led to this PR? The problem was using `gemspec` and `force_ruby_platform` on Windows would lead to gems not being requirable. Fixes #6801. ### What was your diagnosis of the problem? My diagnosis was there was a place where `force_ruby_platform` wasn't being taken into account, namely the query methods on `Bundler.current_ruby` ### What is your fix for the problem, implemented in this PR? My fix was to add a check for the local platform in `current_ruby`, so the `force_ruby_platform` override would be taken into account. ### Why did you choose this fix out of the possible options? I chose this fix because it avoids hard-coding knowledge of the setting in more places. Co-authored-by: Samuel Giddins <[email protected]> Co-authored-by: David Rodríguez <[email protected]>
If you use
force_ruby_platform
on Windows, gemspec dependencies seem to be ignored. I was using this setting on byebug because I had problems in the past when installing some default gems under Windows, and setting that fixed it.Since I encountered this problem I have now removed the setting, and things seem to be working fine, but I thought I would report it anyways.
I created a sample project to demostrate the issue. Basically, when I specify a runtime dependency on the gemspec (
rouge
in this case), and I useforce_ruby_platform
on Windows, this new dependency is ignored bybundle install
even if thegemspec
DSL is properly specified in theGemfile
.The text was updated successfully, but these errors were encountered: