Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.56 KB

CONTRIBUTING.md

File metadata and controls

63 lines (43 loc) · 2.56 KB

Contributing to moonbitlang/core

Step 0: Contributor License Agreement

Step 1: Clone the repository

  • To start working on the project, you need a local copy of the repository. Currently, moon looks for moonbitlang/core at ~/.moon/lib/core. So, remove it if it exists:

    rm -rf ~/.moon/lib/core
  • Then, use the following command to get the latest version of moonbitlang/core:

    git clone https://github.com/moonbitlang/core ~/.moon/lib/core
  • Run the following command to bundle moonbitlang/core:

    moon bundle --source-dir ~/.moon/lib/core
  • If everything goes well, it will generate a bundled core file at ~/.moon/lib/core/target/bundle/core.core.

  • Now, you can create a new project and run it to check if everything is working as expected:

    moon new hello
    cd hello
    echo """fn main {
      println(@list.reverse(@list.from_array([1, 2, 3])))
    }""" > main/main.mbt
    moon run main
    # Output: List::Cons(3,List::Cons(2,List::Cons(1,Nil)))

Step 2: Make your change

Now it's time to make your changes to the codebase. Whether it's fixing a bug, adding a new feature, or improving documentation, your contributions are welcome. Ensure that your changes are clear and understandable to others who will review your code.

Step 3: Test your change

After making your changes, it's important to test them to ensure they work as expected and do not introduce new issues. Run the following commands to test your changes:

moon check
moon test
moon bundle

Step 4: Submit a pull request and request a review

Simply follow the standard GitHub flow to submit your pull request.

After submitting your pull request, request a review from the project maintainers or other contributors.