Static analysis of `exportPattern()` directives
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start with the existing DESCRIPTION and NAMESPACE export analysis described in #1325 and pull request #870, then review dependency-source access in #2286. The work is complete when source parsing identifies top-level assignments, packages can declare dynamic symbols, and exportPattern() is applied to known namespace objects.
Written by the indexing model from the issue text.
Description
Follow-up to #1325 and https://github.com/posit-dev/ark/pull/870.
We now examine the DESCRIPTION and NAMESPACE files of a package to statically determine its exports, but we don't support the exportPattern() NAMESPACE directive yet, which exports all symbols matching a regex.
It's tricky because packages are installed without their source code, which means we can't statically discover what objects are defined in a namespace. To do this, we'll need access to the source code of the project dependencies: #2286. Then we'll be able to:
-
Parse the source code and detect all top-level assignments
-
For dynamic assignments, packages will have to declare the symbols:
# Declaration foo <- function(my, signature) {} .onLoad <- function(...) { # Dynamic definition. This case is analysable in principle but the namespace # might be modified in more complex ways, e.g. via `.Call()`, hence the need # for declarations in general foo <<- function(my, signature) body } -
Apply export pattern to known namespace objects
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/positron
-
ci-cd lang: python
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
area: quarto lang: r
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area: quarto lang: r
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
area: onboarding area: welcome enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area: assistant bug support
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in posit-dev/positron
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·