Instead of having each individual module embed their .elv files and collect all
of them in pkg/mods/doc, have a single embed.FS at pkg that includes everything,
and use that pkg/mods/doc.
Implement a function that extracts all module elvdocs, and put it in pkg/elvdoc.
The elvdocs still use the old format (#elvdoc:fn or #elvdoc:var) for now, but
will be changed to "fn" and "var" forms soon.
Also remove the accidentally committed cmd/mvelvdoc. It has been used to perform
the conversion automatically but is not supposed to be committed.
Introduce `builtin:buildinfo` and `builtin:version` vars. This also
changes the `-buildinfo -json` implementation to use the standard
encoding/json package rather than handcrafting the JSON string.
This also fixes three incorrect spellings of "overridden". Normally I would
do those in a separate change but since there are only three instances,
one of which one was legitimately part of this change, I decided to bundle
the other two.
- Move NewEnvListVar to pkg/eval/vars.
- De-export GlobPattern, GlobFlag and ExternalCmd.
- Merge editor.go and chdir.go into eval.go, value_helper.go into compile_value.go.
- Remove eval_internal_test.go and replace it with a new test for $pid.
- Make Evaler mostly thread-safe. The only remaining thread-unsafe part is the
modules field, which is more tricky than other fields.
- Remove the state and evalerScopes type, and move their fields into Evaler.
- Expose valuePrefix via a get method, and change PortsFromFiles to take the
prefix instead of a *Evaler. Also expose a PortsFromStdFiles.
- Make Evaler a normal field of Frame, instead of an embedded field. This makes
access to global states more explicit.