Skip to content

Migrate skip installation from custom cask to homebrew-core formula #616

@marcprux

Description

@marcprux

The standard skip installation performed with brew install skiptools/skip/skip uses the release process described in the skipstone Release docs, which involves creating a release build, uploading it to https://github.com/skiptools/skip/releases, and updating the binary Homebrew cask at https://github.com/skiptools/homebrew-skip/blob/main/Casks/skip.rb.

Now that skipstone is open-source, we could convert distribution into an official Homebrew formula instead, which would have the following benefits:

  1. Simplified installation: brew install skip instead of brew install skiptools/skip/skip
  2. More implicit trustworthiness, since the source is built by Homebrew instead of on a local machine
  3. The ability for other formula to depend on Skip (formulas cannot depend on casks)

A trial run of this is promising in the following (scrapped) PR: Homebrew/homebrew-core#267108

However, there are a few considerations:

  1. Since formulae cannot depend on casks, we would no longer be able to have android-platform-tools or android-commandlinetools as prerequisites. As has been pointed out in skip checkup fails unless users manually install Android Studio #606, these dependencies are of dubious value since we still rely on a local Android Studio install anyway. But we would need to perform testing to ensure that these dependencies are not needed for other reasons.
  2. The current Cask setup means that the Skip build plugin and the local skip command are using identical binaries for any given release. This would no longer be the case, since we would continue building the skipstone plugin ourselves (we have to, since we need to publish the SHA-256 of the plugin when we update the skip.git tag), but Homebrew would be building the skip command that is run on macOS and Linux. This should be fine, since skipstone as run by the command plugin and skip as run by the user are typically running different operations, but it is possible that divergent builds could have unanticipated consequences.
  3. Homebrew manages its own build cycle, and while it is generally pretty quick to pick up new release tags and "bottle" the formula, it isn't as instantaneous as our own release process which will synchronize the availability of the plugin with the available of the equivalent corresponding skip tool release. This means that any rapid bugfixes or patches that we want to get out in a timely fashion could be delayed by Homebrew's own processes.
  4. When building locally for the Skip Linux Cask, we use the static Linux (musl) cross-compilation SDK, whereas Homebrew's formula can build directly on Linux. musl and Linux should behave identically, but there are differences in how some things work (specifically, linking to the system libcurl/libxml2/libz for the normal Linux build versus using the Static Linux SDK's own statically linked versions of those dependencies).

None of these issues should be blockers to the migration, but they do require thought. We also need to determine whether the benefits of a simplified brew install skip are worth the effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliIssues with the `skip` command-line tool, such as `skip export` or `skip checkup`enhancementNew feature or requestsetupInstallation and setup issues, including Homebrew/Java installation and skip checkup issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions