Skip to content

build: Clean up downloading process - #2017

Open
TheJanzap wants to merge 6 commits into
denoland:mainfrom
TheJanzap:build-check-if-binary-exists
Open

build: Clean up downloading process#2017
TheJanzap wants to merge 6 commits into
denoland:mainfrom
TheJanzap:build-check-if-binary-exists

Conversation

@TheJanzap

Copy link
Copy Markdown
Contributor

This PR cleans up the pre-built archive download functionality in build.rs. I originally worked on this because on a fresh install of Windows, none of the downloaders are available and the build fails.

I implemented the following changes:

  • python() now checks PATH for python and python3 if the PYTHON env var doesn't exist or is empty. Additionally, it checks whether the recieved path from those methods is a valid executable. For most calls, I used expect(), as the build from source requires Python to be present. However, just downloading the prebuilt archive does not.
  • Refactored download_file() to more cleanly show in what order the downloaders are executed. The execution of the downloaders has been moved to seperate functions
  • Downloads with curl now check if curl is present. This also uses curl.exe instead of the alias for Invoke-WebRequest on the preinstalled PowerShell 5.1 on Windows.

@TheJanzap
TheJanzap force-pushed the build-check-if-binary-exists branch from 56a24d8 to af6c303 Compare July 15, 2026 09:24
@TheJanzap
TheJanzap force-pushed the build-check-if-binary-exists branch from 6a692c2 to a87c6bb Compare July 28, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant