As per π€:
Dev'd (path-dependency) packages are handled statically by design: their symbols come from StaticLint's semantic pass over their source, and the parent never consumes their .jstore β even though the DJP child still loads them and writes one.
The bug
Both the static registration and the project_deps entry are gated on derived_has_file(<pkgdir>/src/<Name>.jl) (layer_environment.jl:179, :196), and derived_has_file is strict membership in input_files β workspace-folder files plus open documents (layer_files.jl:33-37). The lazy indirect-include mechanism (derived_has_content) is not used here.
So when the dev'd path lies outside every workspace folder, both paths miss: no .jstore is consumed (it's dev'd) and no static pass runs (its files aren't in the set). The name isn't even added to project_deps, so using Foo resolves to nothing and is reported as missing.
Repro
Open folder A/ whose Project.toml/Manifest.toml dev ../B, with B/ outside the workspace. In A/src/A.jl, using B is flagged, and B.anything gets no completions, hover, or go-to-def. Adding B/ as a second workspace folder fixes it.
Possible directions
- Reach the dev'd entry closure through the lazy indirect-file input (
derived_has_content) instead of derived_has_file, so out-of-workspace dev'd sources are read from disc.
- Fall back to the dev'd package's
.jstore β the DJP already writes one; only the parent-side loading and the input_package_metadata key (dev'd entries have no git_tree_sha1, sometimes no version) need work.
- At minimum, add the name to
project_deps unconditionally so using B isn't a false UnresolvedImport.
As per π€:
Dev'd (path-dependency) packages are handled statically by design: their symbols come from StaticLint's semantic pass over their source, and the parent never consumes their
.jstoreβ even though the DJP child still loads them and writes one.layer_static_lint.jl:44derived_deved_package_metarunssemantic_passover the dev'd entry file's include closure and extracts its top-levelmodulebinding;layer_static_lint.jl:108-145registers it inworkspace_packages.StaticLint/imports.jl:208-209resolvesusing DevedPkgto that CST binding before consulting theEnvStore(per-file mode does the equivalent through the module-tree context,imports.jl:219-225).types.jl:482-497loads caches forregular_packages+stdlib_packagesonly,layer_environment.jl:149-172builds theExternalEnvfrom those same two groups, and the launch gate skips manifest entries with a"path"key (dynamic_feature.jl:524-525).The bug
Both the static registration and the
project_depsentry are gated onderived_has_file(<pkgdir>/src/<Name>.jl)(layer_environment.jl:179,:196), andderived_has_fileis strict membership ininput_filesβ workspace-folder files plus open documents (layer_files.jl:33-37). The lazy indirect-include mechanism (derived_has_content) is not used here.So when the dev'd path lies outside every workspace folder, both paths miss: no
.jstoreis consumed (it's dev'd) and no static pass runs (its files aren't in the set). The name isn't even added toproject_deps, sousing Fooresolves to nothing and is reported as missing.Repro
Open folder
A/whoseProject.toml/Manifest.tomldev../B, withB/outside the workspace. InA/src/A.jl,using Bis flagged, andB.anythinggets no completions, hover, or go-to-def. AddingB/as a second workspace folder fixes it.Possible directions
derived_has_content) instead ofderived_has_file, so out-of-workspace dev'd sources are read from disc..jstoreβ the DJP already writes one; only the parent-side loading and theinput_package_metadatakey (dev'd entries have nogit_tree_sha1, sometimes noversion) need work.project_depsunconditionally sousing Bisn't a falseUnresolvedImport.