Skip to content

Commit

Permalink
Merge branch 'main' into f-recent-ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored Apr 2, 2023
2 parents 88d584c + d2cba32 commit 50863b3
Show file tree
Hide file tree
Showing 12 changed files with 125 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
^examples$
^cran-comments\.md$
^CRAN-SUBMISSION$
^src/vendor/libbacktrace/\.editorconfig$
^src/vendor/libbacktrace/\.github$
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- cron: "10 0 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }}
cancel-in-progress: true

name: rcc
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/fledge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,29 @@ name: fledge
on:
# for manual triggers
workflow_dispatch:
# for debugging
push:
paths:
- .github/workflows/fledge.yaml
# daily run
schedule:
- cron: "30 0 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }}
cancel-in-progress: true

jobs:
check_fork:
runs-on: ubuntu-latest
outputs:
is_forked: ${{ steps.check.outputs.is_forked }}
steps:
- name: Check if the repo is forked
id: check
run: |
echo "is_forked=$(curl -s -H "Accept: application/vnd.github+json" -H 'Authorization: Bearer ${{ github.token }}' -H "X-GitHub-Api-Version: 2022-11-28" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY} | jq .fork)" >> $GITHUB_OUTPUT
fledge:
runs-on: ubuntu-latest
needs: check_fork
if: needs.check_fork.outputs.is_forked == 'false'
permissions:
contents: write
env:
Expand All @@ -43,3 +51,8 @@ jobs:
fledge::finalize_version(push = TRUE)
}
shell: Rscript {0}

- name: Check release
run: |
fledge:::release_after_cran_built_binaries()
shell: Rscript {0}
4 changes: 4 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:

name: pkgdown

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }}
cancel-in-progress: true

jobs:
pkgdown:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: winch
Title: Portable Native and Joint Stack Traces
Version: 0.0.11.9002
Date: 2022-12-30
Version: 0.0.12.9004
Date: 2023-03-24
Authors@R:
c(person(given = "Kirill",
family = "Müller",
Expand Down
29 changes: 22 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
<!-- NEWS.md is maintained by https://cynkra.github.io/fledge, do not edit -->
<!-- NEWS.md is maintained by https://fledge.cynkra.com, contributors should not edit this file -->

# winch 0.0.11.9002 (2022-12-30)
# winch 0.0.12.9004 (2023-03-24)

- Internal changes only.


# winch 0.0.11.9001 (2022-12-24)
# winch 0.0.12.9003 (2023-02-17)

- Internal changes only.


# winch 0.0.12.9002 (2023-02-02)

- Merged cran-0.0.12 into main.


- Merged cran-0.0.11 into main.

# winch 0.0.12.9001 (2023-01-30)

- Same as previous version.


# winch 0.0.12.9000 (2023-01-30)

- Internal changes only.


# winch 0.0.11.9000 (2022-10-31)
# winch 0.0.12 (2023-01-30)

## Uncategorized
## Chore

- Merged cran-0.0.10 into main
- Fix compiler warnings (@Antonov548, #63).


# winch 0.0.11 (2022-10-31)
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ foo()
```

`rlang::entrace()` checks if winch is installed, and adds a native backtrace.
As this cannot be easily demonstrated in a knitr document, the output is copied from [this GitHub Actions run](https://github.com/r-prof/winch/runs/1147640026?check_suite_focus=true#step:12:169).
As this cannot be easily demonstrated in a knitr document, the output is copied from a GitHub Actions run.

```{r error, eval = FALSE}
options(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Below is an example where an R function calls into C which calls back into R. No
<span class='c'>#&gt; [ reached 'max' / getOption("max.print") -- omitted 99 rows ]</span>
</pre>

[`rlang::entrace()`](https://rlang.r-lib.org/reference/entrace.html) checks if winch is installed, and adds a native backtrace. As this cannot be easily demonstrated in a knitr document, the output is copied from [this GitHub Actions run](https://github.com/r-prof/winch/runs/1147640026?check_suite_focus=true#step:12:169).
[`rlang::entrace()`](https://rlang.r-lib.org/reference/entrace.html) checks if winch is installed, and adds a native backtrace. As this cannot be easily demonstrated in a knitr document, the output is copied from a GitHub Actions run.

<pre class='chroma'>
<span class='nf'><a href='https://rdrr.io/r/base/options.html'>options</a></span>(
Expand Down
6 changes: 3 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
winch 0.0.11
winch 0.0.12

## Current CRAN check results

- [x] Checked on 2022-10-31, problems found: https://cran.r-project.org/web/checks/check_results_winch.html
- [x] WARN: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc: Fixed
- [x] Checked on 2023-01-30, problems found: https://cran.r-project.org/web/checks/check_results_winch.html
- [x] WARN: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64: Fixed.
11 changes: 11 additions & 0 deletions src/vendor/libbacktrace/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
tab_width = 8
57 changes: 57 additions & 0 deletions src/vendor/libbacktrace/.github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

name: example

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} ${{ matrix.config.msystem }}

defaults:
run:
shell: ${{ matrix.config.shell }}

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, shell: bash, allow_fail: true }
- {os: windows-latest, shell: 'msys2 {0}', msystem: MINGW64, allow_fail: true }
- {os: windows-latest, shell: 'msys2 {0}', msystem: MINGW32, allow_fail: true }
- {os: ubuntu-22.04, shell: bash, allow_fail: false }
- {os: ubuntu-20.04, shell: bash, allow_fail: false }
- {os: ubuntu-18.04, shell: bash, allow_fail: false }

steps:
- uses: actions/checkout@v2

- uses: msys2/setup-msys2@v2
if: runner.os == 'Windows'
with:
msystem: ${{ matrix.config.msystem }}
install: 'gcc make'

- name: Configure
run: |
mkdir build
cd build
../configure && rm config.log
- name: Make
run: |
cd build
make
- name: Check
run: |
cd build
make check || ( head -n 1000 *.log && ${{ matrix.config.allow_fail }} )
6 changes: 3 additions & 3 deletions src/vendor/libbacktrace/pecoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ coff_add (struct backtrace_state *state, int descriptor,
magic_ok = memcmp (magic, "PE\0", 4) == 0;
fhdr_off += 4;

memcpy (&fhdr, fhdr_view.data + 4, sizeof fhdr);
memcpy (&fhdr, magic + 4, sizeof fhdr);
}
else
{
Expand Down Expand Up @@ -678,7 +678,7 @@ coff_add (struct backtrace_state *state, int descriptor,
sects_view_valid = 1;
opt_hdr = (const b_coff_optional_header *) sects_view.data;
sects = (const b_coff_section_header *)
(sects_view.data + fhdr.size_of_optional_header);
(void *)((const char *)sects_view.data + fhdr.size_of_optional_header);

if (fhdr.size_of_optional_header > sizeof (*opt_hdr))
{
Expand Down Expand Up @@ -718,7 +718,7 @@ coff_add (struct backtrace_state *state, int descriptor,
goto fail;
syms_view_valid = 1;

str_size = coff_read4 (syms_view.data + syms_size);
str_size = coff_read4 ((const unsigned char *)syms_view.data + syms_size);

str_off = syms_off + syms_size;

Expand Down

0 comments on commit 50863b3

Please sign in to comment.