mapbox / mapbox/mason

Provide user-friendly error messages for architecture mismatches

Open
#307 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Downstream issue: https://github.com/Project-OSRM/osrm-backend/issues/3502

For OSRM we now have a masonized build system providing pre-built packages for x86_64. In case users invoke mason with a different architecture for which there are no pre-built packages (think i686) mason fails exposing internal error messages.

CMake Error at third_party/mason/mason.cmake:118 (message):
  [Mason] Failed to download
  https://mason-binaries.s3.amazonaws.com/linux-i686/boost_libfilesystem/1.61.0.tar.gz:
  curl: (22) The requested URL returned error: 403 Forbidden

Call Stack (most recent call first):
  CMakeLists.txt:388 (mason_use)

It would be great to handle this AccessDenied error (and others) by catching these internal codes and reporting user-friendly error message.

In this case something like "Unsupported architecture: no package for i686" would be great.

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 at third_party/mason/mason.cmake:118 and the mason_use call in CMakeLists.txt:388, then trace how download failures are reported for unsupported architectures such as linux-i686. Done means an AccessDenied or equivalent unavailable-package failure produces a user-friendly architecture message instead of exposing the internal error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.