diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f15ae5b3d4d..e01cebcca07 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: @@ -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: @@ -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: @@ -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: