Skip to content

Commit

Permalink
Clarify build instructions and fix typos in devdocs (#57399)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinkya-k authored Feb 16, 2025
1 parent 39255d4 commit 18262ff
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 31 deletions.
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ The Julia community uses [GitHub issues](https://github.com/JuliaLang/julia/issu
Issues and pull requests should have self explanatory titles such that they can be understood from the list of PRs and Issues.
i.e. `Add {feature}` and `Fix {bug}` are good, `Fix #12345. Corrects the bug.` is bad.
You can make pull requests for incomplete features to get code review. The convention is to open these a draft PRs and prefix
You can make pull requests for incomplete features to get code review. The convention is to open these as draft PRs and prefix
the pull request title with "WIP:" for Work In Progress, or "RFC:" for Request for Comments when work is completed and ready
for merging. This will prevent accidental merging of work that is in progress.
Expand All @@ -209,6 +209,7 @@ Add new code to Julia's base libraries as follows (this is the "basic" approach;
Build as usual, and do `make clean testall` to test your contribution. If your contribution includes changes to Makefiles or external dependencies, make sure you can build Julia from a clean tree using `git clean -fdx` or equivalent (be careful – this command will delete any files lying around that aren't checked into git).
#### Running specific tests
There are `make` targets for running specific tests:
make test-bitarray
Expand Down Expand Up @@ -346,8 +347,8 @@ please remove the `backport-X.Y` tag from the originating pull request for the c

### Git Recommendations For Pull Requests

- Avoid working from the `master` branch of your fork, creating a new branch will make it easier if Julia's `master` changes and you need to update your pull request.
- Try to [squash](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) together small commits that make repeated changes to the same section of code so your pull request is easier to review. A reasonable number of separate well-factored commits is fine, especially for larger changes.
- Avoid working from the `master` branch of your fork. Create a new branch as it will make it easier to update your pull request if Julia's `master` changes.
- Try to [squash](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) together small commits that make repeated changes to the same section of code, so your pull request is easier to review. A reasonable number of separate well-factored commits is fine, especially for larger changes.
- If any conflicts arise due to changes in Julia's `master`, prefer updating your pull request branch with `git rebase` versus `git merge` or `git pull`, since the latter will introduce merge commits that clutter the git history with noise that makes your changes more difficult to review.
- Descriptive commit messages are good.
- Using `git add -p` or `git add -i` can be useful to avoid accidentally committing unrelated changes.
Expand Down
15 changes: 11 additions & 4 deletions doc/src/devdocs/build/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,26 @@ directory mirror, with all of the necessary Makefiles to build Julia,
in the specified directory. These builds will share the source files
in Julia and `deps/srccache`. Each out-of-tree build directory can
have its own `Make.user` file to override the global `Make.user` file
in the top-level folder.
in the top-level folder. After modifying the `Make.user` file if necessary,
build using: `make -C <build-directory>`.

If everything works correctly, you will see a Julia banner and an
If everything works correctly, there will be a symlink to
the julia executable in the build directory which can be run as:
```sh
./julia
```
The actual executable is in `<build-directory>/usr/bin`.
After running this, you will see a Julia banner and an
interactive prompt into which you can enter expressions for
evaluation. (Errors related to libraries might be caused by old,
incompatible libraries sitting around in your PATH. In this case, try
moving the `julia` directory earlier in the PATH). Note that most of
the instructions above apply to unix systems.

To run julia from anywhere you can:
- add an alias (in `bash`: `echo "alias julia='/path/to/install/folder/bin/julia'" >> ~/.bashrc && source ~/.bashrc`), or
- add an alias (in `bash`: `echo "alias julia='<build-directory>/usr/bin/julia'" >> ~/.bashrc && source ~/.bashrc`), or

- add a soft link to the `julia` executable in the `julia` directory to `/usr/local/bin` (or any suitable directory already in your path), or
- add a soft link to the `julia` executable in the `<build-directory>/usr/bin` directory to `/usr/local/bin` (or any suitable directory already in your path), or

- add the `julia` directory to your executable path for this shell session (in `bash`: `export PATH="$(pwd):$PATH"` ; in `csh` or `tcsh`:
`set path= ( $path $cwd )` ), or
Expand Down
48 changes: 24 additions & 24 deletions doc/src/devdocs/build/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,32 +129,32 @@ Note: MSYS2 requires **64 bit** Windows 7 or newer.

2. Open the MSYS2 shell. Update the package database and base packages:

```
pacman -Syu
```
```
pacman -Syu
```
3. Exit and restart MSYS2. Update the rest of the base packages:

```
pacman -Syu
```
```
pacman -Syu
```

4. Then install tools required to build julia:

```
pacman -S cmake diffutils git m4 make patch tar p7zip curl python
```
```
pacman -S cmake diffutils git m4 make patch tar p7zip curl python
```

For 64 bit Julia, install the x86_64 version:
For 64 bit Julia, install the x86_64 version:

```
pacman -S mingw-w64-x86_64-gcc
```
```
pacman -S mingw-w64-x86_64-gcc
```

For 32 bit Julia, install the i686 version:
For 32 bit Julia, install the i686 version:

```
pacman -S mingw-w64-i686-gcc
```
```
pacman -S mingw-w64-i686-gcc
```

5. Configuration of MSYS2 is complete. Now `exit` the MSYS2 shell.
2. Build Julia and its dependencies with pre-build dependencies.
Expand All @@ -166,16 +166,16 @@ Note: MSYS2 requires **64 bit** Windows 7 or newer.

2. Clone the Julia sources:

```
git clone https://github.com/JuliaLang/julia.git
cd julia
```
```sh
git clone https://github.com/JuliaLang/julia.git
cd julia
```

3. Start the build

```
make -j$(nproc)
```
```
make -j$(nproc)
```

!!! note "Pro tip: build in dir"
```sh
Expand Down

0 comments on commit 18262ff

Please sign in to comment.