Roblox / foreman

Toolchain manager for Roblox projects
MIT License
171 stars 26 forks source link

Better artifact choosing algorithm #18

Open LPGhatguy opened 4 years ago

LPGhatguy commented 4 years ago

Right now, Foreman just picks the first artifact that has the name of your platform in it.

Some software like ripgrep has releases with lots of artifacts. For this release, 11.0.2, there are four Windows releases alone:

  1. ripgrep-11.0.2-i686-pc-windows-gnu.zip
  2. ripgrep-11.0.2-i686-pc-windows-msvc.zip
  3. ripgrep-11.0.2-x86_64-pc-windows-gnu.zip
  4. ripgrep-11.0.2-x86_64-pc-windows-msvc.zip

On my system, the ideal choice would be artifact 4, because it is 64-bit and compiled for MSVC, my preferred compiler.

We should change the artifact-choosing algorithm to extract "attributes" from an artifact based on its name. From there, we can rank artifacts and choose the best one for our platform. Some attributes we might pick include:

  1. Platform, like Windows or macOS
  2. Architecture, like i686/x86/32, x86_64/x64/64, arm, or aarch64
  3. Toolchain, like MSVC, GNU or MUSL