<commit_before>/*
 * SessionPackrat.cpp
 *
 * Copyright (C) 2009-14 by RStudio, Inc.
 *
 * Unless you have received this program directly from RStudio pursuant
 * to the terms of a commercial license agreement with RStudio, then
 * this program is licensed to you under the terms of version 3 of the
 * GNU Affero General Public License. This program is distributed WITHOUT
 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
 *
 */

#include "SessionPackrat.hpp"

#include <core/Exec.hpp>
#include <core/FileSerializer.hpp>
#include <core/Hash.hpp>
#include <core/system/FileMonitor.hpp>
#include <core/RecursionGuard.hpp>

#include <r/RExec.hpp>
#include <r/RJson.hpp>
#include <r/session/RClientState.hpp>
#include <r/RRoutines.hpp>
#include <r/ROptions.hpp>

#include <session/projects/SessionProjects.hpp>
#include <session/SessionAsyncRProcess.hpp>
#include <session/SessionModuleContext.hpp>
#include <session/SessionUserSettings.hpp>

#include "SessionPackages.hpp"
#include "session-config.h"

using namespace core;

#ifdef TRACE_PACKRAT_OUTPUT
#define PACKRAT_TRACE(x) \
   std::cerr << "(packrat) " << x << std::endl;
#else
#define PACKRAT_TRACE(x) 
#endif

#define kPackratFolder "packrat/"
#define kPackratLockfile "packrat.lock"
#define kPackratLibPath kPackratFolder "lib"
#define kPackratLockfilePath kPackratFolder kPackratLockfile

#define kPackratActionRestore "restore"
#define kPackratActionClean "clean"
#define kPackratActionSnapshot "snapshot"

namespace session {

namespace {

bool isRequiredPackratInstalled()
{
   return module_context::isPackageVersionInstalled("packrat", "0.2.0.108");
}

} // anonymous namespace
<commit_msg>bump required version of packrat<commit_after>/*
 * SessionPackrat.cpp
 *
 * Copyright (C) 2009-14 by RStudio, Inc.
 *
 * Unless you have received this program directly from RStudio pursuant
 * to the terms of a commercial license agreement with RStudio, then
 * this program is licensed to you under the terms of version 3 of the
 * GNU Affero General Public License. This program is distributed WITHOUT
 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
 *
 */

#include "SessionPackrat.hpp"

#include <core/Exec.hpp>
#include <core/FileSerializer.hpp>
#include <core/Hash.hpp>
#include <core/system/FileMonitor.hpp>
#include <core/RecursionGuard.hpp>

#include <r/RExec.hpp>
#include <r/RJson.hpp>
#include <r/session/RClientState.hpp>
#include <r/RRoutines.hpp>
#include <r/ROptions.hpp>

#include <session/projects/SessionProjects.hpp>
#include <session/SessionAsyncRProcess.hpp>
#include <session/SessionModuleContext.hpp>
#include <session/SessionUserSettings.hpp>

#include "SessionPackages.hpp"
#include "session-config.h"

using namespace core;

#ifdef TRACE_PACKRAT_OUTPUT
#define PACKRAT_TRACE(x) \
   std::cerr << "(packrat) " << x << std::endl;
#else
#define PACKRAT_TRACE(x) 
#endif

#define kPackratFolder "packrat/"
#define kPackratLockfile "packrat.lock"
#define kPackratLibPath kPackratFolder "lib"
#define kPackratLockfilePath kPackratFolder kPackratLockfile

#define kPackratActionRestore "restore"
#define kPackratActionClean "clean"
#define kPackratActionSnapshot "snapshot"

namespace session {

namespace {

bool isRequiredPackratInstalled()
{
   return module_context::isPackageVersionInstalled("packrat", "0.2.0.109");
}

} // anonymous namespace

{'fraction_non_alphanumeric': 0.10865410865410866, 'fraction_numerical': 0.00819000819000819, 'mean_word_length': 5.531194295900178, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4615499', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1164, 'n_words': 324}