From 88fb22a9687d9885677286b4e80af947ce8ceef5 Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 09:02:50 -0500 Subject: [PATCH 1/9] Make changes to kopernicus's refactoring --- CONTRIBUTING.md | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6b8e7afa7..751de589c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ There are many ways to help us out and we appreciate all of them. * [Communication](#communication) * [Slack Chat](#slack) * [Reddit](#reddit) -* [How to contribute?](#how-to-contribute) +* [Direct Contributing](#direct-contributing) * [Low-Hanging Fruit - Easy Targets for Newbies](#easy-targets) * [GitHub Issues](#gh-issues) * [Pull Requests](#prs) @@ -17,13 +17,11 @@ There are many ways to help us out and we appreciate all of them. * [General](#general) * [Kernel](#kernel) * [Testing pratices](#testing-practices) -* [Style guidelines](#style-guidelines) +* [Style Guidelines](#style-guidelines) * [Rust](#rust-style-guidelines) * [Git](#git-style-guidelines) -* [Interactions with other projects](#interactions-with-other-projects) -* [Applications vs Kernel](#applications-vs-kernel) -### External links +### Other External Links * [redox-os.org](http://redox-os.org) * [rust-os-comparison](https://github.com/jackpot51/rust-os-comparison) @@ -41,10 +39,10 @@ The quickest and most open way to communicate with the Redox team is with [Slack ### Reddit -Don't forget to talk about the RedoxOS in [Reddit](https://www.reddit.com/r/rust/), especially when the new RedoxOS weekly news has been edited! +You can find Redox on reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [/r/redox/](https://www.reddit.com/r/redox/). The weekly update news is posted on the former. - -## How to contribute ? + +## Direct Contributing ### Low-Hanging Fruit - Easy Targets for Newbies @@ -96,7 +94,7 @@ It's completely fine to just submit a small pull request without first making an 5. Optionally create a separate branch (recommended if you're making multiple changes simultaneously) (`git checkout -b my-branch`) 6. Make changes 7. Commit (`git add . --all; git commit -m "my commit"`) -8. Optionally run `rustfmt` on the files you changed and commit again if it did anything. +8. Run `rustfmt` on the files you changed and commit again if it did anything (check with `git diff` first) 9. Test your changes with `make qemu` or `make virtualbox` (you might have to use `make qemu_no_kvm`) (see [Best Practices and Guidelines]) 10. Pull from upstream (`git fetch upstream; git rebase upstream/master`) (Note: try not to use `git pull`, it is equivalent to doing `git fetch upstream; git merge master upstream/master`, which is not usually preferred for local/fork repositories, although it is fine in some cases.) 11. Repeat step 9 to make sure the rebase still works @@ -154,13 +152,3 @@ Since Rust is a relatively small and new language compared to others like C, the * Commit messages should describe their changes in present-tense, e.g. "`Add stuff to file.ext`" instead of "`added stuff to file.ext`". This logically makes more sense because, say you're scrolling through history, and you see a commit named "`create file X`". You immediately know that this is what this commit will do to your working directory. It also generally is just more consistent and conventional. * Try to remove duplicate commits from PRs as these clutter up history. - - -## Interactions with Other Projects - - - - -## Applications vs Kernel - - From c0b666eb836a4ae298f02219d033bdca96d87b36 Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 09:12:08 -0500 Subject: [PATCH 2/9] Change some things CONTRIBUTING.md --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 751de589c..c4d03354f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing +# Contributing to Redox Thank you for your interest in contributing to Redox! This document is a guide to help newcomers contribute! There are many ways to help us out and we appreciate all of them. @@ -25,6 +25,7 @@ There are many ways to help us out and we appreciate all of them. * [redox-os.org](http://redox-os.org) * [rust-os-comparison](https://github.com/jackpot51/rust-os-comparison) +* [rust-lang.org](http://rust-lang.org) From aeabefb340b7de4ada5575f96d156b82d939862e Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 10:39:22 -0500 Subject: [PATCH 3/9] Update README.md I realized the issue submitting instructions did not belong in the README. --- README.md | 58 +++++++++++++++++++++++-------------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 57a6761be..fe586da09 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Redox +Redox **Redox** is a operating system written in pure Rust, designed to be modular and secure. The development blog can be found at http://www.redox-os.org. @@ -12,13 +12,13 @@ Please make sure you use the **latest nightly** of `rustc` before building (for ## Contents * [What it looks like](#what_it_looks_like) -* [HELP! Redox won't compile](#compile-help) +* [Help! Redox won't compile](#compile-help) * [Contributing to Redox](#contributing) * [Cloning the repository](#cloning) * [Installation](#installation) - * [Building and running](#bulding_running) - * [Debian and Ubuntu family](#debian_ubuntu) - * [Archlinux](#archlinux) + * [Building and running](#bulding-running) + * [Debian and Ubuntu family](#debian-ubuntu) + * [Archlinux](#arch-linux) * [Fedora](#fedora) * [Suse](#suse) * [NixOS](#nixos) @@ -26,41 +26,31 @@ Please make sure you use the **latest nightly** of `rustc` before building (for * [Windows](#windows) -## What it looks like +## What it looks like -Redox -Redox -Redox -Redox -Redox -Redox +Redox +Redox +Redox +Redox +Redox +Redox -## Help! Redox won't compile! +## Help! Redox won't compile! Sometimes things go wrong when compiling. Try the following before opening an issue: 1. Run `make clean`. 2. Run `git clean -X -f -d`. -3. Make sure you have **the latest version of Rust nightly!** (`multirust` is recommended for managing Rust versions). +3. Make sure you have **the latest version of Rust nightly!** ([multirust](https://github.com/brson/multirust) is recommended for managing Rust versions). 4. Update **LLVM**, **GNU Make**, **nasm** and **QEMU/VirtualBox**. 5. Pull the upstream master branch (`git remote add upstream git@github.com:redox-os/redox.git; git pull upstream master`). and then rebuild! -When you have completed these steps, done a full rebuild, you can open an issue. **Make sure you answer the following questions**: - -- Have you followed the steps in "Help! Redox won't compile!"? (confirmation) -- What host OS are you building Redox on? -- What is the output of `rustc -V`? -- Have you made any changes? -- Is it a build problem or a launch problem? On some systems, VirtualBox/QEMU may have problems. Try `make virtualbox`, `make qemu`, and `make qemu_no_kvm`. - -Else, your issue may be closed. - -## Contributing to Redox +## Contributing to Redox If you're interested in this project, and you'd like to help us out, [here](CONTRIBUTING.md) is a list of ways you can do just that. -## Cloning the repository +## Cloning the Repository Make sure you get submodules when you clone the repository. ```bash @@ -73,11 +63,11 @@ can download them with: git submodule update --init ``` -## Installation +## Installation -### Building and running +### Building and running -#### Debian/Ubuntu family +#### Debian/Ubuntu family ##### Building @@ -113,7 +103,7 @@ sudo apt-get install qemu-system-x86 qemu-kvm make qemu ``` -#### Archlinux +#### Arch Linux ##### Building * Run the setup script and enter your password when prompted (to install the Rust compiler and its dependencies) @@ -172,7 +162,7 @@ sudo yum install qemu-system-x86 qemu-kvm make qemu ``` -#### Suse +#### SUSE ##### Building @@ -198,7 +188,7 @@ sudo zypper install qemu-x86 qemu-kvm make qemu ``` -#### NixOS +#### NixOS ##### Building and running (Qemu, Advanced) @@ -208,7 +198,7 @@ make all make qemu ``` -#### OS X +#### OS X ##### Building @@ -235,7 +225,7 @@ make all make virtualbox ``` -#### Windows +#### Windows ##### Building * Download and install the latest 32-bit Rust nightly from http://www.rust-lang.org/install.html From 3d222f9adc5b917766cf0788f7129b0568073ee7 Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 11:16:41 -0500 Subject: [PATCH 4/9] Make some changes to kopernicus's refactoring --- CONTRIBUTING.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4d03354f..cf3648eab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to Redox +# Contributing Thank you for your interest in contributing to Redox! This document is a guide to help newcomers contribute! There are many ways to help us out and we appreciate all of them. @@ -8,7 +8,7 @@ There are many ways to help us out and we appreciate all of them. * [Communication](#communication) * [Slack Chat](#slack) * [Reddit](#reddit) -* [Direct Contributing](#direct-contributing) +* [How to contribute](#how-to-contribute) * [Low-Hanging Fruit - Easy Targets for Newbies](#easy-targets) * [GitHub Issues](#gh-issues) * [Pull Requests](#prs) @@ -17,15 +17,16 @@ There are many ways to help us out and we appreciate all of them. * [General](#general) * [Kernel](#kernel) * [Testing pratices](#testing-practices) -* [Style Guidelines](#style-guidelines) +* [Style guidelines](#style-guidelines) * [Rust](#rust-style-guidelines) * [Git](#git-style-guidelines) +* [Interactions with other projects](#interactions-with-other-projects) +* [Applications vs Kernel](#applications-vs-kernel) -### Other External Links +### External links * [redox-os.org](http://redox-os.org) * [rust-os-comparison](https://github.com/jackpot51/rust-os-comparison) -* [rust-lang.org](http://rust-lang.org) @@ -40,10 +41,10 @@ The quickest and most open way to communicate with the Redox team is with [Slack ### Reddit -You can find Redox on reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [/r/redox/](https://www.reddit.com/r/redox/). The weekly update news is posted on the former. +Don't forget to talk about the RedoxOS in [Reddit](https://www.reddit.com/r/rust/), especially when the new RedoxOS weekly news has been edited! - -## Direct Contributing + +## How to contribute ? ### Low-Hanging Fruit - Easy Targets for Newbies @@ -95,7 +96,7 @@ It's completely fine to just submit a small pull request without first making an 5. Optionally create a separate branch (recommended if you're making multiple changes simultaneously) (`git checkout -b my-branch`) 6. Make changes 7. Commit (`git add . --all; git commit -m "my commit"`) -8. Run `rustfmt` on the files you changed and commit again if it did anything (check with `git diff` first) +8. Optionally run `rustfmt` on the files you changed and commit again if it did anything. 9. Test your changes with `make qemu` or `make virtualbox` (you might have to use `make qemu_no_kvm`) (see [Best Practices and Guidelines]) 10. Pull from upstream (`git fetch upstream; git rebase upstream/master`) (Note: try not to use `git pull`, it is equivalent to doing `git fetch upstream; git merge master upstream/master`, which is not usually preferred for local/fork repositories, although it is fine in some cases.) 11. Repeat step 9 to make sure the rebase still works @@ -153,3 +154,13 @@ Since Rust is a relatively small and new language compared to others like C, the * Commit messages should describe their changes in present-tense, e.g. "`Add stuff to file.ext`" instead of "`added stuff to file.ext`". This logically makes more sense because, say you're scrolling through history, and you see a commit named "`create file X`". You immediately know that this is what this commit will do to your working directory. It also generally is just more consistent and conventional. * Try to remove duplicate commits from PRs as these clutter up history. + + +## Interactions with Other Projects + + + + +## Applications vs Kernel + + From 240ab5e332428112842af4637d324ea391c8692d Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 11:41:17 -0500 Subject: [PATCH 5/9] fix CONTRIBUTING.md --- CONTRIBUTING.md | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf3648eab..86c1f7caa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing +# Contributing to Redox Thank you for your interest in contributing to Redox! This document is a guide to help newcomers contribute! There are many ways to help us out and we appreciate all of them. @@ -8,7 +8,7 @@ There are many ways to help us out and we appreciate all of them. * [Communication](#communication) * [Slack Chat](#slack) * [Reddit](#reddit) -* [How to contribute](#how-to-contribute) +* [Direct Contributing](#direct-contributing) * [Low-Hanging Fruit - Easy Targets for Newbies](#easy-targets) * [GitHub Issues](#gh-issues) * [Pull Requests](#prs) @@ -17,16 +17,17 @@ There are many ways to help us out and we appreciate all of them. * [General](#general) * [Kernel](#kernel) * [Testing pratices](#testing-practices) -* [Style guidelines](#style-guidelines) +* [Style Guidelines](#style-guidelines) * [Rust](#rust-style-guidelines) * [Git](#git-style-guidelines) * [Interactions with other projects](#interactions-with-other-projects) * [Applications vs Kernel](#applications-vs-kernel) -### External links +### Other External Links * [redox-os.org](http://redox-os.org) * [rust-os-comparison](https://github.com/jackpot51/rust-os-comparison) +* [rust-lang.org](http://rust-lang.org) @@ -41,10 +42,10 @@ The quickest and most open way to communicate with the Redox team is with [Slack ### Reddit -Don't forget to talk about the RedoxOS in [Reddit](https://www.reddit.com/r/rust/), especially when the new RedoxOS weekly news has been edited! +You can find Redox on reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [/r/redox/](https://www.reddit.com/r/redox/). The weekly update news is posted on the former. - -## How to contribute ? + +## Direct Contributing ### Low-Hanging Fruit - Easy Targets for Newbies @@ -96,7 +97,7 @@ It's completely fine to just submit a small pull request without first making an 5. Optionally create a separate branch (recommended if you're making multiple changes simultaneously) (`git checkout -b my-branch`) 6. Make changes 7. Commit (`git add . --all; git commit -m "my commit"`) -8. Optionally run `rustfmt` on the files you changed and commit again if it did anything. +8. Optionally run `rustfmt` on the files you changed and commit again if it did anything (check with `git diff` first) 9. Test your changes with `make qemu` or `make virtualbox` (you might have to use `make qemu_no_kvm`) (see [Best Practices and Guidelines]) 10. Pull from upstream (`git fetch upstream; git rebase upstream/master`) (Note: try not to use `git pull`, it is equivalent to doing `git fetch upstream; git merge master upstream/master`, which is not usually preferred for local/fork repositories, although it is fine in some cases.) 11. Repeat step 9 to make sure the rebase still works @@ -154,13 +155,3 @@ Since Rust is a relatively small and new language compared to others like C, the * Commit messages should describe their changes in present-tense, e.g. "`Add stuff to file.ext`" instead of "`added stuff to file.ext`". This logically makes more sense because, say you're scrolling through history, and you see a commit named "`create file X`". You immediately know that this is what this commit will do to your working directory. It also generally is just more consistent and conventional. * Try to remove duplicate commits from PRs as these clutter up history. - - -## Interactions with Other Projects - - - - -## Applications vs Kernel - - From 4b6001b8567bf2183e316d26b7a8f337976c8aa6 Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 12:15:44 -0500 Subject: [PATCH 6/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 62 +++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86c1f7caa..84a262dd2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,20 +6,20 @@ There are many ways to help us out and we appreciate all of them. ### Index * [Communication](#communication) - * [Slack Chat](#slack) - * [Reddit](#reddit) + * [Slack Chat](#slack) + * [Reddit](#reddit) * [Direct Contributing](#direct-contributing) - * [Low-Hanging Fruit - Easy Targets for Newbies](#easy-targets) - * [GitHub Issues](#gh-issues) - * [Pull Requests](#prs) - * [Creating a Pull Request](#creating-a-pr) + * [Low-Hanging Fruit - Easy Targets for Newbies](#easy-targets) + * [GitHub Issues](#gh-issues) + * [Pull Requests](#prs) + * [Creating a Pull Request](#creating-a-pr) * [Best Practices/Guidelines](#best-practices) - * [General](#general) - * [Kernel](#kernel) - * [Testing pratices](#testing-practices) + * [General](#general) + * [Kernel](#kernel) + * [Testing Practices](#testing-practices) * [Style Guidelines](#style-guidelines) - * [Rust](#rust-style-guidelines) - * [Git](#git-style-guidelines) + * [Rust](#rust-style-guidelines) + * [Git](#git-style-guidelines) * [Interactions with other projects](#interactions-with-other-projects) * [Applications vs Kernel](#applications-vs-kernel) @@ -53,20 +53,20 @@ You can find Redox on reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [ * If you're not fluent in [Rust](https://www.rust-lang.org/): - * Writing documentation - * Using/testing Redox, filing issues for bugs and needed features - * Web development (Redox website, separate repo) - * Unit tests (may require minimal knowledge of rust) + * Writing documentation + * Using/testing Redox, filing issues for bugs and needed features + * Web development (Redox website, separate repo) + * Unit tests (may require minimal knowledge of rust) * If you are fluent in Rust, but not OS Development: - * Apps - * Shell (Ion) development - * Package manager (Oxide) development - * High-level code + * Apps + * Shell (Ion) development + * Package manager (Oxide) development + * High-level code * If you are fluent in Rust, and have experience with OS Dev: - * Familiarize yourself with the repository and codebase - * Find tags in comments like `TODO`, `FIXME` etc. and complete those tasks + * Familiarize yourself with the repository and codebase + * Find tags in comments like `TODO`, `FIXME` etc. and complete those tasks ### GitHub Issues @@ -83,17 +83,17 @@ It's completely fine to just submit a small pull request without first making an 1. Fork the repository 2. Clone the original repository to your local PC using one of the following commands based on the protocol you are using: - * HTTPS:`git clone https://github.com/redox-os/redox.git` - * SSH:`git clone git@github.com:redox-os/redox.git --origin upstream --recursive` - * Then rebase: `git rebase upstream master` - Use HTTPS if you don't know which one to use. (Recommended: learn about SSH if you don't want to have to login every time you push/pull!) + * HTTPS:`git clone https://github.com/redox-os/redox.git` + * SSH:`git clone git@github.com:redox-os/redox.git --origin upstream --recursive` + * Then rebase: `git rebase upstream master` + Use HTTPS if you don't know which one to use. (Recommended: learn about SSH if you don't want to have to login every time you push/pull!) 3. Add your fork with - * HTTPS:`git remote add origin https://github.com/your-username/redox.git` - * SSH:`git remote add origin git@github.com:your-username/redox.git --origin upstream --recursive` + * HTTPS:`git remote add origin https://github.com/your-username/redox.git` + * SSH:`git remote add origin git@github.com:your-username/redox.git --origin upstream --recursive` 4. Alternatively, if you already have a fork and copy of the repo, you can simply check to make sure you're up-to-date - * Fetch the upstream:`git fetch upstream master` - * Rebase with local commits:`git rebase upstream master` - * Update the submodules:`git submodule update --init` + * Fetch the upstream:`git fetch upstream master` + * Rebase with local commits:`git rebase upstream master` + * Update the submodules:`git submodule update --init` 5. Optionally create a separate branch (recommended if you're making multiple changes simultaneously) (`git checkout -b my-branch`) 6. Make changes 7. Commit (`git add . --all; git commit -m "my commit"`) @@ -155,3 +155,5 @@ Since Rust is a relatively small and new language compared to others like C, the * Commit messages should describe their changes in present-tense, e.g. "`Add stuff to file.ext`" instead of "`added stuff to file.ext`". This logically makes more sense because, say you're scrolling through history, and you see a commit named "`create file X`". You immediately know that this is what this commit will do to your working directory. It also generally is just more consistent and conventional. * Try to remove duplicate commits from PRs as these clutter up history. +* Generally, when syncing your local copy with the master branch, you will want to rebase instead of merge. This is because it will create duplicate commits that don't actually do anything when merged into the master branch. +* When you start to make changes, you will want to create a separate branch, and keep the `master` branch of your fork identical to the main repository, so that you can compare your changes with the main branch and test out a more stable build if you need to. From 472c428b5007f8bba1498be5f06d6d38242da8e5 Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 12:26:49 -0500 Subject: [PATCH 7/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84a262dd2..9ec4900f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,6 +23,7 @@ There are many ways to help us out and we appreciate all of them. * [Interactions with other projects](#interactions-with-other-projects) * [Applications vs Kernel](#applications-vs-kernel) + ### Other External Links * [redox-os.org](http://redox-os.org) @@ -42,7 +43,7 @@ The quickest and most open way to communicate with the Redox team is with [Slack ### Reddit -You can find Redox on reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [/r/redox/](https://www.reddit.com/r/redox/). The weekly update news is posted on the former. +You can find Redox on Reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [/r/redox/](https://www.reddit.com/r/redox/). The weekly update news is posted on the former. ## Direct Contributing @@ -52,31 +53,35 @@ You can find Redox on reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [ -* If you're not fluent in [Rust](https://www.rust-lang.org/): +* If you're not fluent in Rust: + * Writing documentation * Using/testing Redox, filing issues for bugs and needed features * Web development (Redox website, separate repo) - * Unit tests (may require minimal knowledge of rust) + * Writing unit tests (may require minimal knowledge of rust) * If you are fluent in Rust, but not OS Development: - * Apps - * Shell (Ion) development - * Package manager (Oxide) development - * High-level code + + * Apps development + * Shell ((Ion)[https://github.com/redox-os/ion]) development + * Package manager ((Oxide)[https://github.com/redox-os/oxide]) development + * Other high-level code tasks * If you are fluent in Rust, and have experience with OS Dev: + * Familiarize yourself with the repository and codebase * Find tags in comments like `TODO`, `FIXME` etc. and complete those tasks + * Improve and optimize code, especially in the kernel ### GitHub Issues -A bit more formal way of communication with fellow Redox devs, but a little less quick and convienent like the Slack chat (unless of course you aren't in it yet, which if you're going to be involved in this project really at all, it is recommended that you request to join). These are for more specific topics, simply put, issues try to state something more than ask. +A bit more formal way of communication with fellow Redox devs, but a little less quick and convienent like the Slack chat (unless of course you aren't in it yet, which if you're going to be involved in this project really at all, it is recommended that you request to join). These are for more specific topics. ### Pull Requests -It's completely fine to just submit a small pull request without first making an issue or something, but if it's a big change that will require a lot of planning and reviewing, it's best you start with writing an issue first. +It's completely fine to just submit a small pull request without first making an issue or something, but if it's a big change that will require a lot of planning and reviewing, it's best you start with writing an issue first. Also see (git guidelines)[#git-style-guidelines] ### Creating a Pull Request @@ -97,10 +102,10 @@ It's completely fine to just submit a small pull request without first making an 5. Optionally create a separate branch (recommended if you're making multiple changes simultaneously) (`git checkout -b my-branch`) 6. Make changes 7. Commit (`git add . --all; git commit -m "my commit"`) -8. Optionally run `rustfmt` on the files you changed and commit again if it did anything (check with `git diff` first) +8. Optionally run (rustfmt)[https://github.com/rust-lang-nursery/rustfmt] on the files you changed and commit again if it did anything (check with `git diff` first) 9. Test your changes with `make qemu` or `make virtualbox` (you might have to use `make qemu_no_kvm`) (see [Best Practices and Guidelines]) 10. Pull from upstream (`git fetch upstream; git rebase upstream/master`) (Note: try not to use `git pull`, it is equivalent to doing `git fetch upstream; git merge master upstream/master`, which is not usually preferred for local/fork repositories, although it is fine in some cases.) -11. Repeat step 9 to make sure the rebase still works +11. Repeat step 9 to make sure the rebase still builds and starts 12. Push to your fork (`git push origin my-branch`) 13. Create a pull request 14. Describe your changes @@ -109,8 +114,6 @@ It's completely fine to just submit a small pull request without first making an ## Best Practices and Guidelines - - ### General @@ -119,7 +122,7 @@ It's completely fine to just submit a small pull request without first making an * Prefer passing references to the data over owned data. (Don't take `String`, take `&str`. Don't take `Vec` take `&[T]`). * Use generics, traits, and other abstractions Rust provides. * Be sure to mark parts that need work with `TODO`, `FIXME`, `BUG`, and `UNOPTIMIZED`. -* Don't forget to look after news in [Reddit](https://www.reddit.com/r/rust/). +* Check (Slack)[#slack], (the Website)[#], and **the Subreddit** frequently. ### Kernel @@ -143,8 +146,6 @@ It's completely fine to just submit a small pull request without first making an ## Style Guidelines - - ### Rust From 949f974b10281cb07db2281ebe640f37c6d86a85 Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 12:55:55 -0500 Subject: [PATCH 8/9] fix readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fe586da09..b47d9fc36 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Please make sure you use the **latest nightly** of `rustc` before building (for ## Contents -* [What it looks like](#what_it_looks_like) +* [What it looks like](#what-it-looks-like) * [Help! Redox won't compile](#compile-help) * [Contributing to Redox](#contributing) * [Cloning the repository](#cloning) @@ -26,7 +26,7 @@ Please make sure you use the **latest nightly** of `rustc` before building (for * [Windows](#windows) -## What it looks like +## What it looks like Redox Redox @@ -65,7 +65,7 @@ git submodule update --init ## Installation -### Building and running +### Building and running #### Debian/Ubuntu family From 5cf933f5c5ec19b6398e20341c10e6a50ab3cbdc Mon Sep 17 00:00:00 2001 From: Polymetric Date: Wed, 16 Dec 2015 13:02:48 -0500 Subject: [PATCH 9/9] fix formatting --- CONTRIBUTING.md | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ec4900f8..7cefbeb8e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,8 +23,7 @@ There are many ways to help us out and we appreciate all of them. * [Interactions with other projects](#interactions-with-other-projects) * [Applications vs Kernel](#applications-vs-kernel) - -### Other External Links +### Other External Links * [redox-os.org](http://redox-os.org) * [rust-os-comparison](https://github.com/jackpot51/rust-os-comparison) @@ -32,24 +31,19 @@ There are many ways to help us out and we appreciate all of them. - -## Communication +## Communication - -### Slack Chat +### Slack Chat The quickest and most open way to communicate with the Redox team is with [Slack](https://slack.com/). Currently, the only way to join our slack team is by sending an email to [info@redox-os.org](mailto:info@redox-os.org), which might take a little while, since it's not automated. We're currently working on an easier way to do this, but this is the most convenient way right now. - -### Reddit +### Reddit You can find Redox on Reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [/r/redox/](https://www.reddit.com/r/redox/). The weekly update news is posted on the former. - -## Direct Contributing +## Direct Contributing - -### Low-Hanging Fruit - Easy Targets for Newbies +### Low-Hanging Fruit - Easy Targets for Newbies @@ -73,13 +67,11 @@ You can find Redox on Reddit in [/r/rust/](https://www.reddit.com/r/rust/) and [ * Find tags in comments like `TODO`, `FIXME` etc. and complete those tasks * Improve and optimize code, especially in the kernel - -### GitHub Issues +### GitHub Issues A bit more formal way of communication with fellow Redox devs, but a little less quick and convienent like the Slack chat (unless of course you aren't in it yet, which if you're going to be involved in this project really at all, it is recommended that you request to join). These are for more specific topics. - -### Pull Requests +### Pull Requests It's completely fine to just submit a small pull request without first making an issue or something, but if it's a big change that will require a lot of planning and reviewing, it's best you start with writing an issue first. Also see (git guidelines)[#git-style-guidelines] @@ -111,11 +103,9 @@ It's completely fine to just submit a small pull request without first making an 14. Describe your changes 15. Submit! - -## Best Practices and Guidelines +## Best Practices and Guidelines - -### General +### General * Follow the style conventions * Use `.into()` and `.to_owned()` over `.to_string()`. @@ -124,24 +114,22 @@ It's completely fine to just submit a small pull request without first making an * Be sure to mark parts that need work with `TODO`, `FIXME`, `BUG`, and `UNOPTIMIZED`. * Check (Slack)[#slack], (the Website)[#], and **the Subreddit** frequently. - -### Kernel +### Kernel * When trying to access a slice, **always** use the `common::GetSlice` trait and the `.get_slice()` method to get a slice without causing the kernel to panic. The problem with slicing in regular Rust, e.g. `foo[a..b]`, is that if someone tries to access with a range that is out of bounds of an array/string/slice, it will cause a panic at runtime, as a safety measure. Same thing when accessing an element. Always use `foo.get(n)` instead of `foo[n]` and try to cover for the possibility of `Option::None`. Doing the regular way may work fine for applications, but never in the kernel. No possible panics should ever exist in kernel space, because then the whole OS would just stop working. - -### Testing Practices +### Testing Practices * It's always better to test boot (`make qemu` or `make virtualbox`) every time you make a change, because it is important to see how the OS boots and works after it compiles. Even though Rust is a safety-oriented language, something as unstable as an in-dev operating system will have problems in many cases and may completely break on even the slightest critical change. Also, make sure you check how the unmodified version runs on your machine before making any changes. Else, you won't have anything to compare to, and it will generally just lead to confusion. TLDR: Rebuild and test boot often. * To run the ZFS tests: - * Create the zfs.img only once. If one has not been created, run `make filesystem/apps/zfs/zfs.img` before booting into Redox. - * Run `open zfs.img` to open the created ZFS image. - * Run `file /home/LICENSE.md` twice to ensure ARC isn't broken. + * Create the zfs.img only once. If one has not been created, run `make filesystem/apps/zfs/zfs.img` before booting into Redox. + * Run `open zfs.img` to open the created ZFS image. + * Run `file /home/LICENSE.md` twice to ensure ARC isn't broken. ## Style Guidelines @@ -151,8 +139,7 @@ It's completely fine to just submit a small pull request without first making an Since Rust is a relatively small and new language compared to others like C, there's really only one standard. Just follow the official Rust standards for formatting, and maybe run `rustfmt` on your changes, until we setup the CI system to do it automatically. - -### Git +### Git * Commit messages should describe their changes in present-tense, e.g. "`Add stuff to file.ext`" instead of "`added stuff to file.ext`". This logically makes more sense because, say you're scrolling through history, and you see a commit named "`create file X`". You immediately know that this is what this commit will do to your working directory. It also generally is just more consistent and conventional. * Try to remove duplicate commits from PRs as these clutter up history.