-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
bundle install fails on windows-latest after using bundle config #13
Comments
In contrast, passing options directly to
However, that results in warnings about using persistent flags with |
Could you link to a log failing because of this? And/or share a workflow triggering it? |
There's literally nothing in the log. You can find a workflow example here: https://github.com/asciidoctor/asciidoctor-pdf/blob/master/.github/workflows/ci.yml#L21 (I'm currently messing with it, so I could be changing). |
So the process is just dying. |
This may or may not having anything to do with this action. I really have no idea because it's giving absolutely no information when it dies. Maybe that's GitHub Actions suppressing the output. Maybe that's Windows. If this issue only serves as a warning to others not to use |
For completeness, here are the warnings we get when using flags instead of
|
As long as the error doesn't happen during the BTW, could you use
A link to a log would help me understand better. I would recommend to not install bundler explicitly, unless you really need a specific version. This action already provides a version of bundle for all Rubies (see https://github.com/eregon/use-ruby-action#bundler). |
Oh, I didn't know that it works that way. |
@slonopotamus That's documented in https://github.com/eregon/use-ruby-action#versioning |
I'll have a look at this later today. I tried the following locally with ruby master on Windows:
See fix at asciidoctor/asciidoctor-pdf#1531 There's always been some quirky things with PowerShell in CI. How STDERR output is handled is a configurable item. Same with EXIT codes. |
Thank you for looking at this @MSP-Greg, it's much appreciated and I had no idea what's going on here. I'll close this issue because I don't think this action can do anything about it, it seems a GitHub Actions/PowerShell issue. I think it's best to discuss in the PR: asciidoctor/asciidoctor-pdf#1531 |
That explodes with JRuby on Windows. |
@slonopotamus Can you show an example log where that happens? |
BTW, I'm happy to improve the README based on the discussion in the PR. |
https://github.com/slonopotamus/epubcheck-ruby/runs/407569369?check_suite_focus=true#step:4:23 |
Interesting. I'm not sure what
comes from. |
I didn't investigate it very much. Just added a mark my brain: jruby+windows+bash = no fun, use native shell instead. There are so many more issues with jruby on windows, this is a very small of them. |
True, though I'm kind of exploring if it has to do with how Ruby is installed.
Yes, ignore that. We're actively testing specific versions. Once our build is stable, we'll switch to the major.
Didn't realize that. Yes, that's what we want.
Is the multi-line script what is causing the problem? That's what I'm trying to determine. |
If we arrive at a conclusion as to what causes the exit code 1, I think we should do that. I am still not seeing the reason why we get an exit code 1 when using |
Could you try with individual commands to see if that would help? |
Let's reopen until we figure it out better, sorry for the early close. |
Sorry, not sure where to discuss. I'm not sure what is causing this. The warning are coming from RubyGems. I don't know if the command is exiting with a code other than 0, and I know that I've seen Windows CI get confused over STDERR output, especially using PowerShell. With some AppVeyor build scripts for Ruby, I had to pipe STDERR to STDOUT, otherwise the script stopped. IOW, this is not an issue with this repo or asciidoctor-pdf. It's somewhere within the space of Actions, PowerShell, Bundler, & RubyGems. The fact that I can't repo it locally doesn't help... |
Re JRuby on Windows, it seems to work better if we remove the |
Sorry, I haven't really looked at JRuby on Windows. But, unless the bash script does something, I'd use the exe. There is no script with mswin or mingw builds for Ruby itself. All the gem bin files are |
* The Bash launcher causes warnings, see ruby/setup-ruby#13 (comment)
* The Bash launcher causes warnings, see ruby/setup-ruby#13 (comment) * Add tests when using an absolute path to jruby.
I removed the Bash launcher on JRuby, it seems better now. |
Using separate steps fixes the problem. https://github.com/mojavelinux/asciidoctor-pdf/actions/runs/33167078 I see no warnings though, which is very strange. While we work to pinpoint the cause of the exit 1, perhaps recommending using separate steps is a reasonable tradeoff until then. |
In that run, the existing Bundler is used, which might change something, but probably not. The full warning is:
And in https://github.com/asciidoctor/asciidoctor-pdf/runs/416845301 it's cut after the first warning line:
So it really seems PowerShell just aborts on STDERR output, for multi-line scripts, as @MSP-Greg said. I think this would be highly valuable to report to GitHub Actions as a bug when using PowerShell with multiple lines. Could you report it? |
Thanks for that assessment, @eregon. That seems to be it! I agree, this should go upstream. I'm not very familiar with the GitHub Actions project. Do you know where it should be filed? |
I just tried the following in a step, and it passed:
|
I think https://github.community/t5/GitHub-Actions/bd-p/actions is a good place to report it. A bit of searching led me to
And "the Write-Error cmdlet" seems similar as writing to STDERR. |
@MSP-Greg Could you post the log of the workflow run? |
Nope, it didn't change anything. It works either way when I use separate steps. |
I can reproduce the failure in GitHub Actions with: - name: Test
run: |
gem install bundler
bundle config --local path .bundle/gems
ruby -e 'STDERR.puts %{NOTE: warning}; STDERR.puts 42'
echo after Removing the - name: Test
run: |
gem install bundler
ruby -e 'STDERR.puts %{NOTE: warning}; STDERR.puts 42'
echo after Not installing latest bundler also passes: - name: Test
run: |
bundle config --local path .bundle/gems
ruby -e 'STDERR.puts %{NOTE: warning}; STDERR.puts 42'
echo after Installing latest bundler and - name: Test
run: |
gem install bundler
bundle config --local path .bundle/gems
echo after So somehow |
What version (Bundler or Ruby) passed? I'll check this locally... |
I'm not sure what's wrong here, but I already spent too much time debugging weird Windows shell bugs. This is clearly not a bug of this action. |
As far as I'm concerned, this is a solved issue either by:
It's just not a hill I want to die on trying to solve otherwise. |
If I use
bundle config
to set bundler options (e.g.,bundle config --local without docs
), the subsequent call tobundle install
fails. The action gives no reason why it failed.This does not happen on ubuntu-latest.
The text was updated successfully, but these errors were encountered: