Skip to content

(6) Goto definition tests for workspace package import() and importFrom()#1304

Merged
DavisVaughan merged 1 commit into
mainfrom
feature/sources-6-goto-definition-tests
Jul 2, 2026
Merged

(6) Goto definition tests for workspace package import() and importFrom()#1304
DavisVaughan merged 1 commit into
mainfrom
feature/sources-6-goto-definition-tests

Conversation

@DavisVaughan

Copy link
Copy Markdown
Contributor

Branched from #1302

With some extracted support infrastructure: DescriptionWriter, NamespaceWriter, and the generic TestSourceHandler


Even without any additional changes, just hooking up the production SourceHandler has enabled some features we didn't have existing "live" tests for.

One of those is goto def on usage of foo() in your workspace package, when foo() comes from a NAMESPACE import() or importFrom()

@DavisVaughan
DavisVaughan requested a review from lionel- June 29, 2026 18:10
@@ -0,0 +1,45 @@
use std::path::Path;

/// Assembles a `DESCRIPTION` file from parts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good idea

Comment on lines +272 to +279
DescriptionWriter::new()
.package("mypackage")
.version("0.0.0")
.imports(&["foopkg"])
.write(workspace.path());
NamespaceWriter::new()
.import("foopkg")
.write(workspace.path());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice

@DavisVaughan
DavisVaughan force-pushed the feature/sources-5-delete-oak-sources branch from e67e4ef to 89143f3 Compare July 2, 2026 18:27
@DavisVaughan
DavisVaughan force-pushed the feature/sources-6-goto-definition-tests branch from e719a6a to 0b36e63 Compare July 2, 2026 18:27
@DavisVaughan
DavisVaughan force-pushed the feature/sources-5-delete-oak-sources branch from 89143f3 to b610b37 Compare July 2, 2026 18:31
@DavisVaughan
DavisVaughan force-pushed the feature/sources-6-goto-definition-tests branch from 0b36e63 to 4c919a6 Compare July 2, 2026 18:32
@DavisVaughan
DavisVaughan force-pushed the feature/sources-5-delete-oak-sources branch from b610b37 to 8c5acb7 Compare July 2, 2026 18:42
@DavisVaughan
DavisVaughan force-pushed the feature/sources-6-goto-definition-tests branch from 4c919a6 to 571ad70 Compare July 2, 2026 18:42
@DavisVaughan
DavisVaughan force-pushed the feature/sources-5-delete-oak-sources branch from 8c5acb7 to fdd6456 Compare July 2, 2026 18:53
@DavisVaughan
DavisVaughan force-pushed the feature/sources-6-goto-definition-tests branch 2 times, most recently from ad23976 to 47ba23c Compare July 2, 2026 18:59
@DavisVaughan
DavisVaughan force-pushed the feature/sources-5-delete-oak-sources branch 2 times, most recently from ddd0e90 to 601cf98 Compare July 2, 2026 19:04
@DavisVaughan
DavisVaughan force-pushed the feature/sources-6-goto-definition-tests branch 2 times, most recently from 64f6196 to 10867ff Compare July 2, 2026 19:11
@DavisVaughan
DavisVaughan force-pushed the feature/sources-5-delete-oak-sources branch from 601cf98 to 42e42f0 Compare July 2, 2026 19:11
Base automatically changed from feature/sources-5-delete-oak-sources to main July 2, 2026 19:12
…mportFrom()`

With some extracted support infrastructure: `DescriptionWriter`, `NamespaceWriter`, and the generic `TestSourceHandler`
@DavisVaughan
DavisVaughan force-pushed the feature/sources-6-goto-definition-tests branch from 10867ff to 82f4d0c Compare July 2, 2026 19:12
@DavisVaughan
DavisVaughan merged commit 16f654b into main Jul 2, 2026
17 checks passed
@DavisVaughan
DavisVaughan deleted the feature/sources-6-goto-definition-tests branch July 2, 2026 19:13
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants