posit-dev / posit-dev/ark

Add `Package::exports()` to replace `Package::namespace().exports`

Open
#1,330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
337
Forks
32
Avg merge
8d 17h
Merged PRs (30d)
11

Description

From https://github.com/posit-dev/ark/pull/1306#discussion_r3512781622

This should be a Package::exports() query mirroring File::exports(). I thought I had implemented it already, > but can't find it (maybe it was abandoned at some point).

There will be some complex resolution in the future (e.g. for regex exportPattern), so we should call a single > method everywhere exports are needed.

It'd return a vector of names that you can then resolve with top-level Package::resolve().

And maybe namespace() should be private?

I had some outstanding questions about this from this request:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the requested Package::exports() query with File::exports(), then inspect the existing namespace().exports calls in crates/ark/src/lsp/diagnostics.rs. Resolve whether documented symbols belong in the Vec result and whether Package::resolve() is needed; update all callers so exports are obtained through the new method.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.