]> gitweb.factorcode.org Git - factor.git/blob - basis/vocabs/refresh/refresh-docs.factor
vocabs.refresh: add a note about refesh-all after a fresh bootstrap
[factor.git] / basis / vocabs / refresh / refresh-docs.factor
1 USING: bootstrap.image help.markup help.syntax kernel strings ;
2 IN: vocabs.refresh
3
4 HELP: source-modified?
5 { $values { "path" "a pathname string" } { "?" boolean } }
6 { $description "Tests if the source file has been modified since it was last loaded. This compares the file's CRC32 checksum of the file's contents against the previously-recorded value." } ;
7
8 HELP: refresh
9 { $values { "prefix" string } }
10 { $description "Reloads source files and documentation belonging to loaded vocabularies whose names are prefixed by " { $snippet "prefix" } " which have been modified on disk." } ;
11
12 HELP: refresh-all
13 { $description "Reloads source files and documentation for all loaded vocabularies which have been modified on disk." }
14 { $notes
15 "After a fresh bootstrap if " { $link refresh-all } " reloads any vocabularies, then the boot image was outdated. You can generate a new boot image with " { $link make-my-image } " and bootstrap again." } ;
16
17 { refresh refresh-all } related-words
18
19 ARTICLE: "vocabs.refresh" "Runtime code reloading"
20 "The " { $vocab-link "vocabs.refresh" } " vocabulary implements automatic reloading of changed source files."
21 $nl
22 "With the help of the " { $vocab-link "io.monitors" } " vocabulary, loaded source files across all vocabulary roots are monitored for changes on disk."
23 $nl
24 "If a change to a source file is detected, the next invocation of " { $link refresh-all } " will compare the file's checksum against its previous value, reloading the file if necessary. This takes advantage of the fact that the " { $vocab-link "source-files" } " vocabulary records CRC32 checksums of source files that have been parsed by " { $link "parser" } "."
25 $nl
26 "Words for reloading source files:"
27 { $subsections
28     refresh
29     refresh-all
30 } ;
31
32 ABOUT: "vocabs.refresh"