mapbox / mapbox/mason

Allow `mason install` to work without scripts?

Open
#186 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ng
Dominant language
Python
Stars
258
Forks
68
PR merge metrics
No merged PRs in 30d

Description

I'm pondering the best, most lightweight, method to recommend installing mason packages on CI systems.

Installing mason with git clone -b master --single-branch https://github.com/mapbox/mason.git brings down > 2.7 MB of data and this will likely grow over time.

That is not a lot, but much more than is needed to install a package, which can currently be done as simply as:

PACKAGE_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/${MASON_NAME}/${MASON_VERSION}.tar.gz"
travis_retry wget --quiet -O - ${PACKAGE_URL} | tar -xz

For packages representing libraries most usecases will want/need the main mason command in order to query for cflags and ldflags. But for command line tools these features are unnecessary.

Two ideas (with command line tools in mind):

  • Write a very small mason-install script that CI systems could download and use to install a package: ./mason-install clang 3.8.0. It would not work for header-only libs (would put them in the wrong location)
  • Modify the existing mason binary to work for installs without needing the script/ metadata around.
    • This would require disabling the checks for MASON_LIB_FILE among other modifications. Hmmmm...

/cc @ericfischer @TheMarex (maintainers on two repos that are using the manual method to install, but this is brittle)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing mason binary and the script/ metadata checks mentioned in the issue. Compare the proposed standalone mason-install script with changing the binary to install without metadata, including the stated header-only library limitation. The issue does not name files or tests, and completion criteria would need to be defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.