FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Vectorize file argument to cpp_source() by krlmlr · Pull Request #337 · r-lib/cpp11 · GitHub

/ cpp11 Public

Vectorize file argument to cpp_source() - #337

Closed
krlmlr wants to merge 1 commit into
mainfrom
f-source-vectorize
Closed

krlmlr wants to merge 1 commit into
mainfrom
f-source-vectorize

Conversation

krlmlr commented Oct 23, 2023

Copy link
Copy Markdown
Member

Use case: debugging if a particular phenomenon occurs if code is distributed across multiple source files.

krlmlr force-pushed the f-source-vectorize branch from 4ed89e9 to 6e584df Compare May 1, 2024 18:45

Copy link
Copy Markdown
Contributor

@krlmlr @DavisVaughan I think this one should be merged, gcc 4.8 is vintage now

Copy link
Copy Markdown
Member

Closed via #492 for a similar debugging use case

krlmlr added a commit to krlmlr/cpp11 that referenced this pull request Sep 12, 2026
Upstream implemented the feature itself in r-lib#493's sibling
r-lib#492, so the conflict resolves to removing this patch.

This branch vectorized `cpp_source()`'s `file` argument:
`all(file.exists(file))` instead of `file.exists(file)`,
`vapply(file, generate_cpp_name, ...)` instead of one name,
and a shared-library name derived from the first file
rather than the last.

r-lib#492 teaches `cpp_source()` to source multiple files
outright, and covers each of those points:
it checks `all(file.exists(file))` and reports the first missing path,
maps `generate_cpp_name()` over `file` with `vcapply()`,
and derives the library name from `generate_package_name()`,
which sidesteps the naming problem this patch worked around.
It also adds fixtures and a test, which this patch never had.

Davis Vaughan closed the upstream pull request carrying this patch,
r-lib#337, with "Closed via r-lib#492 for a similar debugging use case".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K8MneV8KqHYUuC8fWV3X5Q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL