Closed sqs closed 9 years ago
+1
I've added "Local" with https://github.com/sourcegraph/srclib/pull/87, but we can treat Local as an "ignore" option, because it never makes sense to show local vars in search.
This is talking about refs, not defs.
ah, my bad :^)
This enhancement will go hand-in-hand with a broader rethinking of the srclib schema to handle richer def-ref relationships, so closing this.
It'd be useful to differentiate between various kinds of refs: refs in imports, refs in type signatures, refs in definitions of things, and refs in code bodies, etc. That's because it's often not useful to see package imports when you want to see how a package is actually used, as in the following example:
(from https://sourcegraph.com/hg.python.org/cpython@default/.PipPackage/Python/.def/_collections/defaultdict)
There's already a
Def bool
field on Ref, but perhaps it could be generalized toType enum
that can take values such asdef
,dep
(import),type
, etc.(See also: http://www.mkdown.com/5f7fb62bdaf535ea9f00 by @Wilfred.)