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

"bundle" from bundler conflicts with truffleruby-head/bin/bundle #2780

Closed
eregon opened this issue Nov 9, 2022 · 1 comment
Closed

"bundle" from bundler conflicts with truffleruby-head/bin/bundle #2780

eregon opened this issue Nov 9, 2022 · 1 comment
Assignees

Comments

@eregon
Copy link
Member

eregon commented Nov 9, 2022

From https://github.com/ruby-syntax-tree/syntax_tree/actions/runs/3429160877/jobs/5714402479
cc @kddnewton

Can be reproduced locally:

~ ∴ chruby dev
Using truffleruby-dev: truffleruby 23.0.0-dev-baac89dc, like ruby 3.1.2, GraalVM CE Native [x86_64-linux]
~ ∴ bundle --version                                    
Bundler version 2.3.7
~ ∴ gem i bundler -v 2.3.6
Fetching bundler-2.3.6.gem
bundler's executable "bundle" conflicts with /home/eregon/.rubies/truffleruby-dev/bin/bundle
Overwrite the executable? [yN]  
ERROR:  Error installing bundler:
	"bundle" from bundler conflicts with /home/eregon/.rubies/truffleruby-dev/bin/bundle
zsh: exit 1     gem i bundler -v 2.3.6

Here is the original bundle file.
Seems newer RubyGems doesn't like it even with the This file was generated by RubyGems. on line 3?

$ cat /home/eregon/.rubies/truffleruby-dev/bin/bundle
#!/usr/bin/env bash
#
# This file was generated by RubyGems.
# The above lines match the format expected by rubygems/installer.rb check_executable_overwrite
# bash section ignored by the Ruby interpreter

# get the absolute path of the executable and resolve symlinks
SELF_PATH=$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")
while [ -h "$SELF_PATH" ]; do
  # 1) cd to directory of the symlink
  # 2) cd to the directory of where the symlink points
  # 3) get the pwd
  # 4) append the basename
  DIR=$(dirname "$SELF_PATH")
  SYM=$(readlink "$SELF_PATH")
  SELF_PATH=$(cd "$DIR" && cd "$(dirname "$SYM")" && pwd)/$(basename "$SYM")
done
exec "$(dirname $SELF_PATH)/ruby" "$SELF_PATH" "$@"

#!ruby
#
# This file was generated by RubyGems.
#
# The application 'bundler' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0.a"

str = ARGV.first
if str
  str = str.b[/\A_(.*)_\z/, 1]
  if str and Gem::Version.correct?(str)
    version = str
    ENV['BUNDLER_VERSION'] = str

    ARGV.shift
  end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('bundler', 'bundle', version)
else
gem "bundler", version
load Gem.bin_path("bundler", "bundle", version)
end
@eregon eregon self-assigned this Nov 9, 2022
eregon added a commit to ruby/setup-ruby that referenced this issue Nov 9, 2022
@eregon
Copy link
Member Author

eregon commented Nov 9, 2022

https://github.com/rubygems/rubygems/pull/2929/files#diff-b25097522a961ed7158012499383b8a8057caf87cbc445d6b168a5b8a27ba45dR224 is what caused the new failure, together with our bin/ scripts design: https://github.com/oracle/truffleruby/blob/master/doc/contributor/launchers.md

I worked around it in setup-ruby to fix it as fast as possible: ruby/setup-ruby@f2c070b
And that fixes the build: https://github.com/ruby-syntax-tree/syntax_tree/actions/runs/3429563818/jobs/5715726788

I'll also fix it in TruffleRuby (will take a bit longer to merge and build a dev build), and then the harder part making a test for this which seems quite tricky.
Alternatively, longer-term we should probably use the pure-Ruby bin/ scripts, even though that can cause issues if truffleruby is not in PATH.

kodiakhq bot added a commit to weareinreach/InReach that referenced this issue Nov 10, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions-rs/toolchain](https://togithub.com/actions-rs/toolchain) | action | pinDigest |  -> `16499b5` |
| [actions/checkout](https://togithub.com/actions/checkout) | action | pinDigest |  -> `93ea575` |
| [actions/setup-java](https://togithub.com/actions/setup-java) | action | pinDigest |  -> `de1bb2b` |
| [actions/setup-node](https://togithub.com/actions/setup-node) | action | pinDigest |  -> `8c91899` |
| [actions/setup-python](https://togithub.com/actions/setup-python) | action | pinDigest |  -> `13ae5bb` |
| [actions/stale](https://togithub.com/actions/stale) | action | pinDigest |  -> `5ebf00e` |
| [atlassian/gajira-login](https://togithub.com/atlassian/gajira-login) | action | pinDigest |  -> `90a5995` |
| [chromaui/action](https://togithub.com/chromaui/action) | action | pinDigest |  -> `9f9e97c` |
| [cypress-io/github-action](https://togithub.com/cypress-io/github-action) | action | pinDigest |  -> `30008f1` |
| [dessant/lock-threads](https://togithub.com/dessant/lock-threads) | action | pinDigest |  -> `e460dfe` |
| [github/codeql-action](https://togithub.com/github/codeql-action) | action | pinDigest |  -> `c3b6fce` |
| [jesusvasquez333/verify-pr-label-action](https://togithub.com/jesusvasquez333/verify-pr-label-action) | action | pinDigest |  -> `657d111` |
| [micnncim/action-label-syncer](https://togithub.com/micnncim/action-label-syncer) | action | pinDigest |  -> `3abd5ab` |
| [ruby/setup-ruby](https://togithub.com/ruby/setup-ruby) | action | minor | `v1.120.0` -> `v1.121.0` |

---

### Release Notes

<details>
<summary>ruby/setup-ruby</summary>

### [`v1.121.0`](https://togithub.com/ruby/setup-ruby/releases/tag/v1.121.0): Update to actions/cache@v3

[Compare Source](https://togithub.com/ruby/setup-ruby/compare/v1.120.1...v1.121.0)

-   [ruby/setup-ruby#396

### [`v1.120.1`](https://togithub.com/ruby/setup-ruby/releases/tag/v1.120.1): Workaround issue with gem install bundler on truffleruby-head

[Compare Source](https://togithub.com/ruby/setup-ruby/compare/v1.120.0...v1.120.1)

-   [oracle/truffleruby#2780

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/weareinreach/InReach).



PR-URL: #38
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
JoeKarow pushed a commit to weareinreach/InReach that referenced this issue Dec 3, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions-rs/toolchain](https://togithub.com/actions-rs/toolchain) | action | pinDigest |  -> `16499b5` |
| [actions/checkout](https://togithub.com/actions/checkout) | action | pinDigest |  -> `93ea575` |
| [actions/setup-java](https://togithub.com/actions/setup-java) | action | pinDigest |  -> `de1bb2b` |
| [actions/setup-node](https://togithub.com/actions/setup-node) | action | pinDigest |  -> `8c91899` |
| [actions/setup-python](https://togithub.com/actions/setup-python) | action | pinDigest |  -> `13ae5bb` |
| [actions/stale](https://togithub.com/actions/stale) | action | pinDigest |  -> `5ebf00e` |
| [atlassian/gajira-login](https://togithub.com/atlassian/gajira-login) | action | pinDigest |  -> `90a5995` |
| [chromaui/action](https://togithub.com/chromaui/action) | action | pinDigest |  -> `9f9e97c` |
| [cypress-io/github-action](https://togithub.com/cypress-io/github-action) | action | pinDigest |  -> `30008f1` |
| [dessant/lock-threads](https://togithub.com/dessant/lock-threads) | action | pinDigest |  -> `e460dfe` |
| [github/codeql-action](https://togithub.com/github/codeql-action) | action | pinDigest |  -> `c3b6fce` |
| [jesusvasquez333/verify-pr-label-action](https://togithub.com/jesusvasquez333/verify-pr-label-action) | action | pinDigest |  -> `657d111` |
| [micnncim/action-label-syncer](https://togithub.com/micnncim/action-label-syncer) | action | pinDigest |  -> `3abd5ab` |
| [ruby/setup-ruby](https://togithub.com/ruby/setup-ruby) | action | minor | `v1.120.0` -> `v1.121.0` |

---

### Release Notes

<details>
<summary>ruby/setup-ruby</summary>

### [`v1.121.0`](https://togithub.com/ruby/setup-ruby/releases/tag/v1.121.0): Update to actions/cache@v3

[Compare Source](https://togithub.com/ruby/setup-ruby/compare/v1.120.1...v1.121.0)

-   [ruby/setup-ruby#396

### [`v1.120.1`](https://togithub.com/ruby/setup-ruby/releases/tag/v1.120.1): Workaround issue with gem install bundler on truffleruby-head

[Compare Source](https://togithub.com/ruby/setup-ruby/compare/v1.120.0...v1.120.1)

-   [oracle/truffleruby#2780

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/weareinreach/InReach).



PR-URL: #38
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
john-heinnickel pushed a commit to thermofisher-jch/truffleruby that referenced this issue Aug 16, 2023
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

1 participant