Skip to content

[build website]patch docs #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/tutorials/patch_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Creating a Patch File

We can also create a patch file for the update and changes that we made to the source code.

1) Assuming we have made a change and we want to submit a patch.

If necessary, update the version of R you are working on, with the latest changes in <https://svn.r-project.org/R/trunk/>.

E.g. if the version of R you are working on is named "R-devel-working"

```bash
cd $TOP_SRCDIR/R-devel-working
svn update
cd $BUILDDIR/R-devel-working
make # this will run the configure as before
```

2) Now run R's test suite to make sure that your change has not broken anything:

```bash
make check
```

3) Then create a patch. The patch file will be saved inside the patchdir directory.

```bash
cd "$TOP_SRCDIR"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd "$TOP_SRCDIR"
cd "$TOP_SRCDIR/R-devel-working"

svn update
svn diff > $PATCHDIR/patch.diff
```
66 changes: 66 additions & 0 deletions docs/tutorials/update_source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## Updating Source Code

After following through the Contribution workflow and making the following changes, we need to update it inside the source code directory. To do so, first we need to follow this steps:

#### 1) Change Directory to TOP_SRCDIR

If you are currently inside the BUILDDIR directory or root directory(/workspaces/r-dev-env) make sure to change it to TOP_SRCDIR so that we can update the changes made inside our source code.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are currently inside the BUILDDIR directory or root directory(/workspaces/r-dev-env) make sure to change it to TOP_SRCDIR so that we can update the changes made inside our source code.
If you are currently inside the BUILDDIR directory or root directory(/workspaces/r-dev-env) make sure to change it to the source directory for the version of R you are working on so that we can update the changes made inside our source code. For example,


```bash
cd $TOP_SRCDIR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd $TOP_SRCDIR
cd $TOP_SRCDIR/R-devel-working

```

#### 2) Update using svn

Now we want to update the source code for that we will use svn command update

```bash
svn update
```

#### 3) Check changes made using diff

To cross check the changes we made in source code. We will use this command

```bash
svn diff
```

#### 4) Revert Changes(Optional step)

In some cases, we might want to revert the changes we made. We can use the revert command

To revert the changes made in specific file, we can use

```bash
svn revert src/library/utils/R/askYesNo.R
```

To revert changes in a directory

```bash
svn revert src/lib/utils
```

To revert all local changes

```bash
svn revert -R .
```

#### 5) Change Directory and Rebuild

To rebuild the R version and reflect on the changes made, we want to change directory to BUILDDIR from TOP_SRCDIR

```bash
cd $BUILDDIR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd $BUILDDIR
cd $BUILDDIR/R-devel-working

```

#### 6) Rebuild the Source Code

Now rebuild using make command

```bash
make check
make
Comment on lines +64 to +65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make check
make
make
make check

```
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ nav:
- 'Running R' : 'tutorials/running_r.md'
- 'Building R': 'tutorials/building_r.md'
- 'R Contribution Workflow' : 'tutorials/contribution_workflow.md'
- 'Updating Source Code' : 'tutorials/update_source.md'
- 'Creating a Patch File' : 'tutorials/patch_update.md'
- 'Multiple R Version' : 'tutorials/multi_r_compilation.md'
- 'Local Setup' : 'tutorials/localsetup.md'
- 'Restarting and Stopping' : 'tutorials/codespacestartstop.md'
Expand Down
23 changes: 0 additions & 23 deletions tutorials/build_and_install_r.sh

This file was deleted.