Skip to content

Latest commit

 

History

History
165 lines (123 loc) · 2.98 KB

File metadata and controls

165 lines (123 loc) · 2.98 KB

Developer reference

Internal global variables

Configuration-related variables

These are set during execution of Revise's __init__ function.

Revise.active
Revise.watching_files
Revise.polling_files
Revise.tracking_Main_includes

Path-related variables

Revise.juliadir
Revise.expected_juliadir
Revise.basesrccache
Revise.basebuilddir

Internal state management

Revise.pkgdatas
Revise.watched_files
Revise.revision_queue
Revise.NOPACKAGE
Revise.queue_errors
Revise.included_files
Revise.watched_manifests

The following are specific to user callbacks (see Revise.add_callback) and the implementation of entr:

Revise.revision_event
Revise.user_callbacks_queue
Revise.user_callbacks_by_file
Revise.user_callbacks_by_key

Types

Revise.RelocatableExpr
Revise.ModuleExprsInfos
Revise.FileInfo
Revise.PkgData
Revise.WatchList
Revise.TaskThunk
Revise.ReviseEvalException
MethodSummary

Function reference

Functions called when you load a new package

Revise.watch_package
Revise.parse_pkg_files
Revise.init_watching

Monitoring for changes

These functions get called on each directory or file that you monitor for revisions. These block execution until the file(s) are updated, so you should only call them from within an @async block. They work recursively: once an update has been detected and execution resumes, they schedule a revision (see Revise.revision_queue) and then call themselves on the same directory or file to wait for the next set of changes.

Revise.revise_dir_queued
Revise.revise_file_queued

The following functions support user callbacks, and are used in the implementation of entr but can be used more broadly:

Revise.add_callback
Revise.remove_callback

Evaluating changes (revising) and computing diffs

revise is the primary entry point for implementing changes. Additionally,

Revise.revise_file_now

Caching the definition of methods

Revise.get_def

Parsing source code

Revise.parse_source
Revise.parse_source!

Lowered source code

Much of the "brains" of Revise comes from doing analysis on lowered code. This part of the package is not as well documented.

Revise.minimal_evaluation!
Revise.methods_by_execution!
Revise.ExInfo

Modules and paths

Revise.modulefiles

Handling errors

Revise.trim_toplevel!

In current releases of Julia, hitting Ctrl-C from the REPL can stop tasks running in the background. This risks stopping Revise's ability to watch for changes in files and directories. Revise has a work-around for this problem.

Revise.throwto_repl

Git integration

Revise.git_source
Revise.git_files
Revise.git_repo

Distributed computing

Revise.init_worker

Extension system

Revise.SigInfo
Revise.ExtendedData
Revise.get_extended_data
Revise.replace_extended_data