Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Justfile Migration #224

Merged
merged 4 commits into from
May 22, 2024
Merged

feat: Justfile Migration #224

merged 4 commits into from
May 22, 2024

Conversation

refcell
Copy link
Collaborator

@refcell refcell commented Apr 29, 2024

Description

Migrates Magi to Justfile over Makefile.

Makefiles aren't meant to be used for project-specific commands, but are intended to make files. Although make has it's benefits, notably being pre installed in most widely used distributions, it is clunky and commonly littered with .PHONY escapes to just get it to work.

Enter just, a first principles approach to defining project-specific commands. Just is lightweight, simple, and built in rust.

Output

This pr removes the top level Makefile, replacing it with a Justfile and adds a bunch of commands.

It also uses inline comments to allow you to show available Justfile targets easily from the command line. An example output is shown below.

Available recipes:
    build-all        # Builds all docker images
    b                # alias for `build-all`
    build-local      # Builds local magi docker images
    clean            # Cleans all docker images
    default          # default recipe to display help information
    fmt              # Fixes and checks the formatting
    f                # alias for `fmt`
    fmt-native-check # Check the formatting
    fmt-native-fix   # Fixes the formatting
    lint             # Lint for all available targets
    l                # alias for `lint`
    lint-docs        # Lint the Rust documentation
    lint-native      # Lints
    pull             # Pulls all docker images
    run              # Composes docker
    run-erigon       # Runs op-erigon with docker
    run-geth         # Runs op-geth with docker
    run-local        # Composes docker with local images
    test *args=''    # Test for the native target with all features
    t *args=''       # alias for `test`
    test-docs        # Test the Rust documentation
    tests            # Run all tests

@refcell refcell added the infra label Apr 29, 2024
@refcell refcell self-assigned this Apr 29, 2024
@refcell refcell marked this pull request as ready for review April 29, 2024 16:56
@refcell refcell requested a review from ncitron April 29, 2024 16:56
@refcell refcell added K-chore Kind: general fixes not relating to a bug A-infra Area: Repository infrastructure work (ci, configs, manifests, etc) and removed M-tools labels Apr 29, 2024
Justfile Show resolved Hide resolved
@refcell refcell requested a review from ncitron May 20, 2024 15:53
Copy link
Contributor

@ncitron ncitron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ncitron ncitron merged commit 13e124c into master May 22, 2024
4 of 5 checks passed
@ncitron ncitron deleted the refcell/justfile-migration branch May 22, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-infra Area: Repository infrastructure work (ci, configs, manifests, etc) K-chore Kind: general fixes not relating to a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants