osx-cross / homebrew-arm

Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7).
BSD 2-Clause "Simplified" License
152 stars 21 forks source link

Fix style and rename versioned formulae #17

Closed samford closed 3 years ago

samford commented 3 years ago

I came across this tap while checking if the ARMmbed/formulae tap had updated to the latest arm-none-eabi version and figured I would help with some improvements here.

This PR does the following:

Let me know if this needs any changes.

ladislas commented 3 years ago

Thanks a lot @samford for the PR and the nice cleanup! :)

Are you a user yourself? What's your take on having v10 the default? Should we keep v9 for the moment?

For https://github.com/osx-cross/homebrew-avr, we kept v9 as default to let people experiment with v10 if needed.

For ARM, I've been using v10 since it came out with no significant changes, so I'm happy to keep it as it is.

samford commented 3 years ago

Are you a user yourself? What's your take on having v10 the default? Should we keep v9 for the moment?

I haven't started using this yet, so I don't have any special insight on 9-2020-q2-update vs. 10-2020-q4-major. From a Homebrew perspective, first-party taps (e.g., homebrew/core, homebrew/cask) aim to use the latest version in the formula and sometimes provide versioned alternatives. However, third-party taps can do whatever they feel is most appropriate.

One way to approach this that could make everyone happy is to:

  1. Convert arm-gcc-bin to a versioned arm-gcc-bin@10-2020-q4-major formula.
  2. Create an Aliases/arm-gcc-bin symlink that points to arm-gcc-bin@10-2020-q4-major.rb.
  3. Continue to create a new versioned formula for each release and update the arm-gcc-bin symlink to point to the latest version.

Users who want to always use the latest version can simply install arm-gcc-bin. Alternatively, a user who wants to specifically use 10-2020-q4-major without being updated to a newer version in the future can do so by using brew install arm-gcc-bin@10-2020-q4-major. This would allow users to decide what's most appropriate for their particular circumstance.

I pushed a couple more commits that implement the aforementioned changes, so you can see what I mean and test it out. What do you think about this setup?

ladislas commented 3 years ago

Thanks for the input! I'll review one last time tomorrow morning (it's late in France) and merge your changes. Thanks again for the helpful hand! :)

leojrfs commented 3 years ago

Hey guys, sorry, I've just seen this.

I still find it useful to somehow keep the original versioning format and their respective formulae.

For example, NCS (Nordic's SDK based on zephyr) requires arm-gcc-bin@9-2019-q4-major, as does Contiki. Older Contiki builds for instance, require 5-2015-q4-major.

The great thing about this formulae repo is that all formulae are keg_only, meaning we can have all of those versions installed.

My proposition is then to keep all the formulae in with their original versioning string, but still linking them to the major gcc releases, like so:

and so on...

@ladislas @samford, thoughts?