Description
Describe the bug
A reverted transaction due to a failed compilation ends up removing decls / JITed symbols that should be left untouched.
Related issues: #6439, #7970, ROOT-10848, ROOT-6254, ROOT-8084, and ROOT-8245.
Expected behavior
Clean unload. Reverting a transaction should probably not touch template instantiations / emitted symbols that correspond to deserialized decls.
To Reproduce
root [1] foo.size()
ROOT_prompt_1:1:4: error: no member named 'size' in 'std::unique_ptr<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> > >'; did you mean to use '->' instead of '.'?
foo.size()
^
->
root [2] foo->size()
ROOT_prompt_2:1:4: error: member reference type 'std::unique_ptr<std::string>' (aka 'unique_ptr<basic_string<char> >') is not a pointer; did you mean to use '.'?
foo->size()
~~~^~
or
root [0] std::unique_ptr<TFile> foo{TFile::Open("foo.root", "RECREATE")};
root [1] foo.GetName()
ROOT_prompt_1:1:4: error: no member named 'GetName' in 'std::unique_ptr<TFile, std::default_delete<TFile> >'; did you mean to use '->' instead of '.'?
foo.GetName()
^
->
root [2] foo->GetName()
IncrementalExecutor::executeFunction: symbol '_ZSt3getILm0EJP5TFileSt14default_deleteIS0_EEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS8_' unresolved while linking [cling interface function]!
You are probably missing the definition of std::tuple_element<0ul, std::tuple<TFile*, std::default_delete<TFile> > >::type const& std::get<0ul, TFile*, std::default_delete<TFile> >(std::tuple<TFile*, std::default_delete<TFile> > const&)
Maybe you need to load the corresponding shared library?
Setup
ROOT master, Arch Linux x86_64