interpreters

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRenvLockfile = "renv.lock"

Variables

View Source
var MissingRError = types.NewAgentError(types.ErrorRExecNotFound, errors.New("unable to detect any R interpreters"), nil)

Functions

This section is empty.

Types

type ExistsFunc

type ExistsFunc func(p util.Path) (bool, error)

type MockRInterpreter

type MockRInterpreter struct {
	mock.Mock
}

func NewMockRInterpreter

func NewMockRInterpreter() *MockRInterpreter

func (*MockRInterpreter) CreateLockfile

func (m *MockRInterpreter) CreateLockfile(lockfilePath util.AbsolutePath) error

func (*MockRInterpreter) GetLockFilePath

func (m *MockRInterpreter) GetLockFilePath() (util.RelativePath, bool, error)

func (*MockRInterpreter) GetRExecutable

func (m *MockRInterpreter) GetRExecutable() (util.AbsolutePath, error)

func (*MockRInterpreter) GetRVersion

func (m *MockRInterpreter) GetRVersion() (string, error)

func (*MockRInterpreter) Init

func (m *MockRInterpreter) Init() error

type RInterpreter

type RInterpreter interface {
	GetRExecutable() (util.AbsolutePath, error)
	GetRVersion() (string, error)
	GetLockFilePath() (util.RelativePath, bool, error)
	CreateLockfile(util.AbsolutePath) error
}

func NewRInterpreter

func NewRInterpreter(
	base util.AbsolutePath,
	rExecutableParam util.Path,
	log logging.Logger,
	cmdExecutorOverride executor.Executor,
	pathLookerOverride util.PathLooker,
	existsFuncOverride ExistsFunc,
) (RInterpreter, error)

type RInterpreterFactory

type RInterpreterFactory func(
	base util.AbsolutePath,
	rExecutableParam util.Path,
	log logging.Logger,
	cmdExecutorOverride executor.Executor,
	pathLookerOverride util.PathLooker,
	existsFuncOverride ExistsFunc,
) (RInterpreter, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL