Tab completion defects
Los mantenedores suelen responder en 1 día
@devajithvs ya está trabajando en esto.
Desde el 6/2/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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)
- Lenguaje dominante
- C++
- Estrellas
- 3.3k
- Forks
- 1.6k
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 194
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de root-project/root
-
thisroot.sh: wrong ROOTSYS in zsh when the shell's command line has a newlinePosiblemente ocupada @dpiparo la tomó hace 3 días. Abiertobug in:Build System
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
root-project/root#23746 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[tmva][sofie] Inputs of unsupported type (e.g. float16) give code that does not compile instead of an errorPosiblemente ocupada @lmoneta la tomó hace 12 días. AbiertoAI-Assisted bug in:SOFIE
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
root-project/root#23655 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 71/100
root-project/root#23790 ·
Los mantenedores suelen responder en 1 día
-
bug in:Core Libraries
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
root-project/root#23777 ·
Los mantenedores suelen responder en 1 día
-
`TChain::GetEntries` internal caching ineffective?Posiblemente ocupada @pcanal la tomó hace 5 días. Abiertoimprovement in:TTree
root-project/root#23738 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de root-project/root
Issues similares
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Niko1221/Strata#3673 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
bug P4
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
open-astro/AlpacaBridge#1520 ·
Los mantenedores suelen responder en 1 día
-
[Docs] CONTRIBUTING still says FreeType 2.14.3 and TabLabel.h says ImGui 1.92.9b after the bumpsPosiblemente ocupada @mgradwohl la tomó hoy. Abiertoagent:WSL documentation LOW
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día