Skip to content

Add support for prebuilt Erlang/OTP installations on MacOS using @erlef/otp_builds#13

Merged
yeshan333 merged 9 commits into
mainfrom
copilot/fix-64e3f5aa-3f9e-470f-ae99-95b41288ed0b
Jul 14, 2025
Merged

Add support for prebuilt Erlang/OTP installations on MacOS using @erlef/otp_builds#13
yeshan333 merged 9 commits into
mainfrom
copilot/fix-64e3f5aa-3f9e-470f-ae99-95b41288ed0b

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jul 6, 2025

This PR implements support for installing prebuilt Erlang/OTP versions on MacOS using the @erlef/otp_builds repository, addressing the feature request to add MacOS prebuilt support.

Changes Made

Core Implementation

  • hooks/pre_install.lua: Added MacOS prebuilt detection and URL generation

    • Supports MacOS versions: macos-11, macos-12, macos-13, macos-14
    • Generates URLs following pattern: https://github.com/erlef/otp_builds/releases/download/OTP-{version}/otp_{macos_version}_{arch}.tar.gz
    • Includes proper validation with clear error messages for unsupported versions
  • hooks/post_install.lua: Added MacOS-specific installation logic

    • MacOS prebuilts are ready-to-use installations that just need file organization
    • Moves extracted contents to release/ subdirectory to match expected vfox structure
    • Different from Linux which uses an Install script

Documentation & Testing

  • README.md: Updated with MacOS prebuilt installation instructions and examples
  • .github/workflows/e2e_test_darwin_prebuilt.yaml: Added E2E test workflow for MacOS prebuilts

Usage

Users can now install prebuilt Erlang/OTP versions on MacOS:

# Install a prebuilt version for MacOS 13 (Ventura)
USE_PREBUILT_OTP="macos-13" vfox install erlang@26.2.3

# Search available versions with prebuilt enabled
USE_PREBUILT_OTP="macos-13" vfox search erlang

Supported Platforms

Platform Supported Versions Architecture
Linux ubuntu-14.04 through ubuntu-24.04 amd64, arm64
MacOS macos-11, macos-12, macos-13, macos-14 amd64, arm64
Windows All versions amd64, x86

Benefits

  • Faster installations: No need to compile from source on MacOS
  • Consistent binaries: Use officially built binaries from @erlef/otp_builds
  • Better CI/CD: Enables faster MacOS builds in automated environments
  • Reduced dependencies: No need for build tools and compilation dependencies

Validation

  • ✅ Lua syntax validation passed
  • ✅ URL generation tested for all supported MacOS versions and architectures
  • ✅ File organization logic tested and handles edge cases
  • ✅ Error handling validates unsupported macOS versions
  • ✅ Documentation includes clear usage examples

This change maintains backward compatibility while extending prebuilt support from Linux-only to include MacOS, providing a consistent experience across platforms.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • builds.hex.pm
    • Triggering command: curl -s REDACTED (dns block)
  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)
  • https://api.github.com/repos/erlef/otp_builds/releases
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits July 6, 2025 14:34
Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com>
Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support to install prebuilt Erlang/OTP version in MacOS. can download prebuilt artifact from @erlef/otp_builds Add support for prebuilt Erlang/OTP installations on MacOS using @erlef/otp_builds Jul 6, 2025
Copilot AI requested a review from yeshan333 July 6, 2025 14:38
@yeshan333 yeshan333 marked this pull request as ready for review July 14, 2025 16:50
@yeshan333 yeshan333 merged commit e079047 into main Jul 14, 2025
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.

2 participants