Skip to content

Commit

Permalink
docs: Add further notes to contributing guide
Browse files Browse the repository at this point in the history
• Added note on what files are created after intalling `forc` and `fuel-core`
• Added a note that resolves the issue that arises when using standard binaries
but it uses the previously downloaded binaries.
  • Loading branch information
richardgreg committed Oct 4, 2024
1 parent ca5bcc8 commit 5b53fab
Showing 1 changed file with 41 additions and 6 deletions.
47 changes: 41 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ pnpm install
pnpm build
```

# Files and Directories Created After Installation

After running `pnpm install` and `pnpm build`, the following files and directories are created:

- Forc Repository:
- Located at `internal/forc/sway-repo`.
- Contains the source code for the version of `forc` you are using.

- Fuel-Core Repository:
- Located at `internal/fuel-core/fuel-core-repo`.
- Contains the source code for the version of `fuel-core` you are using.

# Developing

For building everything in watch-mode, run:
Expand Down Expand Up @@ -118,12 +130,11 @@ When you need to work with unreleased versions of `forc` or `fuel-core`, you can
To use an unreleased version of `forc`:

1. **Edit the `VERSION` File**
Open the `packages/forc/VERSION` file and replace the version number (e.g., 0.59.0) with the desired git branch:
Open the `internal/forc/VERSION` file and replace the version number (e.g., 0.59.0) with the desired git branch:

```bash
```text
git:some/branch-name
```

1. **Install and Build**
To download and build `forc` from the specified branch after updating `VERSION` file, run:

Expand All @@ -132,17 +143,18 @@ To download and build `forc` from the specified branch after updating `VERSION`
pnpm build
```

The following directory will be updated or created: `internal/forc/sway-repo`

## Using Unreleased Fuel-Core

Similarly, to use an unreleased version of `fuel-core`:

1. **Edit the `VERSION` file:**
Open the packages/fuel-core/VERSION file and replace the version number with the desired git branch:
Open the `internal/fuel-core/VERSION` file and replace the version number with the desired git branch:

```bash
```text
git:some/branch-name
```

1. **Install and Build**
To download and build `fuel-core` from the specified branch after updating `VERSION` file, run:

Expand All @@ -151,6 +163,29 @@ To download and build `fuel-core` from the specified branch after updating `VERS
pnpm build
```

The following directory will be updated or created: `internal/fuel-core/fuel-core-repo`

# Switching Back to Standard Binaries

If you switch back to using standard binaries you might encounter issues where the SDK still uses the previously downloaded unreleased binaries.


## Resolving the Issue

To resolve the issue and ensure the SDK uses the correct binaries:

1. **Delete the downloaded repositories**

```sh
rm -rf internal/forc/sway-repo
rm -rf internal/fuel-core/fuel-core-repo
```
1. **Reinstall and build.**
```sh
pnpm install
pnpm build
```

# Testing

In order to run tests locally, you can run the following commands:
Expand Down

0 comments on commit 5b53fab

Please sign in to comment.