Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[cxxmodules] Do not exclude R related module from preloading
We were excluding these modules because it had conflict with local
variables such as PI.
  • Loading branch information
yamaguchi1024 committed Aug 21, 2018
commit 6261b8c99a867174434e2c6631863a4fc6ecd81a
7 changes: 1 addition & 6 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1311,10 +1311,6 @@ TCling::TCling(const char *name, const char *title, const char* const argv[])
// This should be vector in order to be able to pass it to LoadModules
std::vector<std::string> CoreModules = {"ROOT_Foundation_C","ROOT_Config",
"ROOT_Foundation_Stage1_NoRTTI", "Core", "RIO"};
// These modules contain global variables which conflict with users' code such as "PI".
// FIXME: Reducing those will let us be less dependent on rootmap files
static constexpr std::array<const char*, 4> ExcludeModules =
{ { "Rtools", "RSQLite", "RInterface", "RMVA"} };

LoadModules(CoreModules, *fInterpreter);

Expand All @@ -1332,8 +1328,7 @@ TCling::TCling(const char *name, const char *title, const char* const argv[])

std::string ModuleName = GetModuleNameAsString(M, PP);
if (!ModuleName.empty() &&
std::find(CoreModules.begin(), CoreModules.end(), ModuleName) == CoreModules.end()
&& std::find(ExcludeModules.begin(), ExcludeModules.end(), ModuleName) == ExcludeModules.end()) {
std::find(CoreModules.begin(), CoreModules.end(), ModuleName) == CoreModules.end()) {
if (M->IsSystem && !M->IsMissingRequirement)
LoadModule(ModuleName, *fInterpreter);
else if (!M->IsSystem && !M->IsMissingRequirement)
Expand Down