analysis: fix namespaced reference lookup#8455
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8455 +/- ##
=======================================
Coverage 60.68% 60.68%
=======================================
Files 373 374 +1
Lines 54095 54117 +22
=======================================
+ Hits 32826 32840 +14
- Misses 21269 21277 +8
🚀 New features to boost your workflow:
|
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Looks already great! The existing You could extend build:
yarn build
mkdir -p lib/bs/___incremental
cp lib/bs/src/MyModule1-MyNamespace.cmt lib/bs/___incremental/MyModule1-MyNamespace.cmt
cp lib/bs/src/MyModule2-MyNamespace.cmt lib/bs/___incremental/MyModule2-MyNamespace.cmt
cp lib/bs/MyNamespace.cmt lib/bs/___incremental/MyNamespace.cmtThen add an incremental marker around one of the existing reference checks, for example in src/MyModule1.res: // ^in+
// ^dv+
let myFunc1 = () => MyModule2.myFunc2()
// ^ref
// ^dv-
// ^in-^in+ enables incremental typechecking mode in the analysis test runner. ^dv+ should make the expected output include "[cmt] Found incremental cmt", which proves the test actually hit the incremental CMT branch rather than silently falling back to the regular lib/bs CMTs. Then run: make -C tests/analysis_tests/tests-namespaced-references test |
Re-opening here following a probably bad workflow from my part on #8453 :)
Hello!
This is an attempt at fixing this problem:
2 problems were occurring when activating the namespace feature
MyNamespace-MyNamespace)MyModule1-MyNamespace) against the indexed "public paths" and so would fail.This PR solves the problem by:
MyModule1-MyNamespace) to their public path equivalent (MyNamespace.MyModule1)It looks like this is a long standing issue. I found this old open issue on the vscode plugin repo.