From 9eba4ada04be0465b763ac5ef72907d9ad589bd9 Mon Sep 17 00:00:00 2001 From: gunungpw Date: Fri, 2 Aug 2024 19:31:42 +0700 Subject: [PATCH 1/2] update bun version and install script from ovensh --- reflex/constants/installer.py | 4 ++-- scripts/install.ps1 | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py index fbee4cd5ac..993616e083 100644 --- a/reflex/constants/installer.py +++ b/reflex/constants/installer.py @@ -36,9 +36,9 @@ class Bun(SimpleNamespace): """Bun constants.""" # The Bun version. - VERSION = "1.1.10" + VERSION = "1.1.21" # Min Bun Version - MIN_VERSION = "0.7.0" + MIN_VERSION = "1.1.21" # The directory to store the bun. ROOT_PATH = os.path.join(Reflex.DIR, "bun") # Default bun path. diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 3c432ac3b5..ab3bf98c6e 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -1,5 +1,7 @@ #!/usr/bin/env pwsh param( + # TODO: change this to 'latest' when Bun for Windows is stable. + [String]$Version = "latest", # Forces installing the baseline build regardless of what CPU you are actually using. [Switch]$ForceBaseline = $false, # Skips adding the bun.exe directory to the user's %PATH% @@ -12,7 +14,7 @@ param( # Debugging: Always download with 'Invoke-RestMethod' instead of 'curl.exe' [Switch]$DownloadWithoutCurl = $false ); -$Version = if ($env:BUN_VERSION) { $env:BUN_VERSION } else { "latest" } + # filter out 32 bit + ARM if (-not ((Get-CimInstance Win32_ComputerSystem)).SystemType -match "x64-based") { Write-Output "Install Failed:" @@ -214,8 +216,12 @@ function Install-Bun { # http://community.sqlbackupandftp.com/t/error-1073741515-solved/1305 if (($LASTEXITCODE -eq 3221225781) -or ($LASTEXITCODE -eq -1073741515)) # STATUS_DLL_NOT_FOUND { + # TODO: as of July 2024, Bun has no external dependencies. + # I want to keep this error message in for a few months to ensure that + # if someone somehow runs into this, it can be reported. Write-Output "Install Failed - You are missing a DLL required to run bun.exe" Write-Output "This can be solved by installing the Visual C++ Redistributable from Microsoft:`nSee https://learn.microsoft.com/cpp/windows/latest-supported-vc-redist`nDirect Download -> https://aka.ms/vs/17/release/vc_redist.x64.exe`n`n" + Write-Output "The error above should be unreachable as Bun does not depend on this library. Please comment in https://github.com/oven-sh/bun/issues/8598 or open a new issue.`n`n" Write-Output "The command '${BunBin}\bun.exe --revision' exited with code ${LASTEXITCODE}`n" return 1 } @@ -302,4 +308,4 @@ function Install-Bun { $LASTEXITCODE = 0; } -Install-Bun -Version $Version -ForceBaseline $ForceBaseline +Install-Bun -Version $Version -ForceBaseline $ForceBaseline \ No newline at end of file From 833c0ad6bc8fe0bdfa7ca8c4873b2d42120053b1 Mon Sep 17 00:00:00 2001 From: "Gunung Pambudi W." <55311527+gunungpw@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:03:01 +0700 Subject: [PATCH 2/2] Update installer.py change the MIN version to `1.1.10` and MAX version to `1.1.22` --- reflex/constants/installer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py index 993616e083..51ec8a725d 100644 --- a/reflex/constants/installer.py +++ b/reflex/constants/installer.py @@ -36,9 +36,9 @@ class Bun(SimpleNamespace): """Bun constants.""" # The Bun version. - VERSION = "1.1.21" + VERSION = "1.1.22" # Min Bun Version - MIN_VERSION = "1.1.21" + MIN_VERSION = "1.1.10" # The directory to store the bun. ROOT_PATH = os.path.join(Reflex.DIR, "bun") # Default bun path.