Tab completion defects
维护者通常 1 天内回复
@devajithvs 已经在做这个了。
开始于 2026年2月6日。
评估
这个 Issue 还没有评估数据。
描述
Currently, tab-completion has a few issues.
- Prompt autocomplete should treat smart pointers as pointers, not as generic classes (was #22019)
- Autocompletion of typedef
- Autocompletion of templates
- Tab completion "leaks" private members
- Tab Completion includes entities from namespaces due to GMI
- Cannot tab-complete extern "C" functions
- Tab completion and TClass::GetListOfAllPublicMethods include hidden methods from base-classes
Prompt autocomplete should treat smart pointers as pointers, not as generic classes (was #22019)
In the ROOT interactive prompt, if you have a smart pointer foo, type foo-> and hit Tab, the autocomplete function will change the -> into a . and say:
"foo" is not of pointer type. Use this operator: .
This is almost always an undesirable behavior when dealing with smart pointers, as it's far more common to want to autocomplete with the inner object's methods/fields rather than the smart pointer's own ones.
Proposed change: change the prompt behavior to treat specially unique_ptr, shared_ptr and weak_ptr (or perhaps in general all classes that define operator->?) so that it autocompletes the referenced object's methods and fields.
Autocompletion of typedefs
The ROOT prompt doesn't consider typedef/using for the tab completion. It would be nice if it did.
Reproduce in the prompt with
root [0] using FooBar = TObject;
root [1] Foo<Tab>
Forum post: https://root-forum.cern.ch/t/cling-discover-typedef-and-using-instructions/64634
Autocompletion of templates
root [0] gROOT->GetListOfFunctionTemplates()->Add(new TNamed("foobar", "foobar()"))
root [13] foob<TAB>
(was https://its.cern.ch/jira/browse/ROOT-10141)
Tab completion "leaks" private members
For the following class definition
class A {
public:
int x;
};
class B : public A {
private:
using A::x;
};
the tab completion of b. of an object B b; shows x. Normally, private data members are not shown though.
(was #10535)
Tab Completion includes entities from namespaces due to GMI
TH1DModel, TProfile1DModel, TProfile2DModel, TObjectHolder, TObjectItem are in namespaces and should not be completed unless using namespace is specified.
(was https://its.cern.ch/jira/browse/ROOT-10989)
Cannot tab-complete extern "C" functions
root [1] extern "C" int funcToTestAutoComp();
root [2] int funcToTestAutoCompB(int);
root [3] funcToTestAutoCompB(
Note how funcToTestAutoComp is not seen as an option.
Tab completion and TClass::GetListOfAllPublicMethods include hidden methods from base-classes
This might be (somewhat) related to ROOT-5660.
Consider a class "CBTRefArray" inheriting from the well-known TRefArray.
In this class, I re-define GetPID:
TProcessID *CBTRefArray::GetPID(Int_t at) const { ... };
The number of arguments is different (TRefArray::GetPID has none), so the function from baseclass is hidden.
Now, I do:
root [0] CBTRefArray foo;
root [1] foo.GetPID( <TAB pressed>
TProcessID* GetPID() const
TProcessID* GetPID(Int_t at) const
So the hidden function is listed here (which I think should not be the case).
Let's try to be naïve and just call it:
root [1] foo.GetPID()
ROOT_prompt_1:1:12: error: too few arguments to function call, single argument 'at' was not specified
foo.GetPID()
~~~~~~~~~~ ^
/somepath/to/sources/CBTRefArray.h:29:2: note: 'GetPID' declared here
TProcessID *GetPID(Int_t at) const;
^
root [2]
Nice error output with wonderful markup, as expected.
I actually found this issue in compiled code, where I iterate over the GetListOfAllPublicMethods() from CBTRefArray::Class() which contains both GetPID() and GetPID(Int_t) which is the same issue.
(was https://its.cern.ch/jira/browse/ROOT-6436)
- 主要语言
- C++
- 星标
- 3.3k
- 派生
- 1.6k
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 194
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
root-project/root 的其他 Issue
-
thisroot.sh: wrong ROOTSYS in zsh when the shell's command line has a newline可能已有人在做 @dpiparo 于 3 天前认领。 未关闭bug in:Build System
难度 2/5 1-3 小时 新手友好度 86/100
root-project/root#23746 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[tmva][sofie] Inputs of unsupported type (e.g. float16) give code that does not compile instead of an error可能已有人在做 @lmoneta 于 12 天前认领。 未关闭AI-Assisted bug in:SOFIE
难度 2/5 1-3 小时 新手友好度 65/100
root-project/root#23655 · 已指派 1 人 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 71/100
root-project/root#23790 ·
维护者通常 1 天内回复
-
bug in:Core Libraries
难度 4/5 3-5 天 新手友好度 48/100
root-project/root#23777 ·
维护者通常 1 天内回复
-
`TChain::GetEntries` internal caching ineffective?可能已有人在做 @pcanal 于 5 天前认领。 未关闭improvement in:TTree
root-project/root#23738 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 root-project/root 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
area: ui bug good first issue P2: medium value: medium
难度 2/5 1-3 小时 新手友好度 75/100
patrick-hudson/put.gd-desktop#366 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
Niko1221/Strata#3673 · 2 条评论 ·
维护者通常 3 天内回复