(7) Allow Package::resolve() to skip the namespace export check for base#1305
Merged
Conversation
lionel-
approved these changes
Jul 2, 2026
lionel-
reviewed
Jul 2, 2026
| // Note that this won't find primitives! These have no top-level binding. | ||
| let mut db = TestDb::new(); | ||
| let (pkg, files) = setup_package(&mut db, "base", &[], &[( | ||
| "workspace/base/R/a.R", |
Contributor
There was a problem hiding this comment.
Interesting that you could add the R sources in the workspace to get LSP analysis against dev base packages.
Contributor
Author
There was a problem hiding this comment.
Yea and I suppose the example should probably have really been using an "installed" Package version of base, but the setup_package() workspace package infra was right there already, and it mostly accomplishes the same thing, so I just went with that
4c546e2 to
0c676ce
Compare
e719a6a to
0b36e63
Compare
0c676ce to
c6c9a53
Compare
0b36e63 to
4c919a6
Compare
c6c9a53 to
d25d9a0
Compare
571ad70 to
ad23976
Compare
d25d9a0 to
00ce06b
Compare
ad23976 to
47ba23c
Compare
9a01684 to
5befce0
Compare
64f6196 to
10867ff
Compare
5befce0 to
12a956a
Compare
10867ff to
82f4d0c
Compare
12a956a to
7dcb821
Compare
7dcb821 to
e8c0589
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched from #1303
Closes #1303
I took a look at this and this seems to be the one place we use
namespace().exportsright now. Everything works as is if we just skip the gating check forbasein particular. This works because every top level assignment in base is an export by construction, so we don't really need to check this anyways.If we find ourself getting burned by this in other places, we can reconsider, but right now this feels way cleaner than trying to reconstruct a fake namespace for base. It seems like we simply don't need it!