Skip to content

Commit

Permalink
Try the normal, non-baseline Windows version of Bun again. Simplify s…
Browse files Browse the repository at this point in the history
…pec debug output
  • Loading branch information
yaroslav committed Jan 23, 2025
1 parent 802b19c commit adeb3ef
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,7 @@
it 'successfully uses the Bun runtime' do
Dir.chdir(tmp_dir) do
Bundler.with_unbundled_env do
puts "\n=== ExecJS Integration Debug ==="
puts "Working directory: #{Dir.pwd}"
puts "Binary path: #{Bundlebun::Runner.binary_path}"
puts "Binstub path: #{Bundlebun::Runner.binstub_path}"
puts "Full binstub path: #{File.join(Dir.pwd, Bundlebun::Runner.binstub_path)}"
puts "PATH: #{ENV["PATH"]}"
puts "==================\n"

output, status = capture("bundle exec rails runner \"puts ExecJS.eval('Bun.version')\"")
puts output
expect(status).to be_success
expect(output).to match(/\d+\.\d+\.\d+/)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
expect(status).to be_success

# Install bundlebun
_output, status = capture("bundle exec rake bun:install")
output, status = capture("bundle exec rake bun:install")
puts output
expect(status).to be_success

# Add Bun version check plugin for CSS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
it 'executes vite build through bun' do
Dir.chdir(tmp_dir) do
Bundler.with_unbundled_env do
puts "\n=== Vite Integration Debug ==="
puts "Working directory: #{Dir.pwd}"
puts "Binary path: #{Bundlebun::Runner.binary_path}"
puts "Binstub path: #{Bundlebun::Runner.binstub_path}"
puts "Full binstub path: #{File.join(Dir.pwd, Bundlebun::Runner.binstub_path)}"
puts "PATH: #{ENV["PATH"]}"
puts "==================\n"

File.write('Gemfile', <<~RUBY)
source 'https://rubygems.org'
gem 'rake'
Expand Down
2 changes: 0 additions & 2 deletions spec/integration/rake_task_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
command = if Bundlebun::Platform.windows?
'rake "bun[-e \"console.log(2+2)\"]"'
else
# Use single quotes for Unix
%{rake "bun[-e 'console.log\\(2+2\\)']"}
end

output, status = Open3.capture2e(command)
expect(status).to be_success
puts output
expect(output.strip).to eq('4')
end
end
Expand Down
5 changes: 0 additions & 5 deletions spec/support/integration_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,5 @@ def capture(cmd)
puts "==================\n"

output, status = Open3.capture2e(env, cmd)
puts "\n=== Command Output ==="
puts output
puts "Exit status: #{status.exitstatus}"
puts "==================\n"

[output, status]
end
2 changes: 1 addition & 1 deletion spec/tasks/build_helpers/bun_downloader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
binary_path = downloader.download_for('x64-mingw-ucrt')

expect(Down).to have_received(:download)
.with("https://github.com/#{BuildHelpers::BUN_REPO}/releases/download/bun-v1.0.0/bun-windows-x64-baseline.zip")
.with("https://github.com/#{BuildHelpers::BUN_REPO}/releases/download/bun-v1.0.0/bun-windows-x64.zip")
expect(binary_path).to eq('lib/bundlebun/vendor/bun/bun.exe')
end
end
Expand Down
2 changes: 1 addition & 1 deletion tasks/build_helpers/platform_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PlatformManager
'aarch64-linux' => 'linux-aarch64',
'arm64-darwin' => 'darwin-aarch64',
'x86_64-darwin' => 'darwin-x64',
'x64-mingw-ucrt' => 'windows-x64-baseline'
'x64-mingw-ucrt' => 'windows-x64'
}.freeze

def self.bun_platform_for(ruby_platform)
Expand Down

0 comments on commit adeb3ef

Please sign in to comment.