We now assume that the directory name under pkg/mods match exactly with the
Elvish module name in several places, and this mismatch broke website building.
Go allows dashes in directory names; it just forbids them in the package name
and there's actually no requirement that the directory name and the package name
be the same.
This command used to depend on pkg/mods/doc to access the embedded .elv, which
in turn depends on all the packages that implement builtin modules. The latter
set of packages depends on almost all the Elvish packages transitively. As a
result, almost any change in any Elvish package will trigger a rebuild of this
command and the whole website.
This commit minimizes the dependency on Elvish packages by having it read the
.elv files during runtime instead (enabled by
9112eb1ab2).
Additionally:
- Move HighlightCodeBlock, needed by website/cmd/md2html, from pkg/mods/doc
to pkg/elvdoc. Moving it is necessary to completely remove the dependency of
website/cmd/md2html on pkg/mods/doc.
- Remove the dependency of pkg/edit/highlight on pkg/eval. It only uses
eval.UnpackCompilationErrors; move this work to the supplied Check function.
This removes the transitive dependency of website/cmd/md2html on pkg/eval.
- Augment website/tools/md-deps to recognize @module lines and add dependency on
the corresponding .elv files.
This syntax has been documented to have an implicit destination of
builtin.html#foo, but it never worked correctly outside builtin.html itself.
Also do some minor cleanups of the package, including removing bogus package
godocs that were inherited from the previous version where the components were
separate programs.
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.
Also rename &posix to &sep-posix, and add &sep-longest.
The original eawk name is documented as deprecated but doesn't emit deprecation
warnings during compilation yet; this will be fixed in the next commit.
Add an insert mode binding that was accidently lost by an earlier refactoring
that moved default bindings from Go code to embedded Elvish code.
Fixes#1738
One of the biggest pain points of using elvish
as a shell in practice has been parsing output from
shell commands that return text.
Many CLIs are parseable by AWK. This commit
adds the AWK separator argument to eawk,
which should make it easier to parse the
output of many shell commands.
While working on an unrelated change I noticed that `make all-checks`
found a typo. I was using codespell 2.2.5 so this also upodates the
.github/workflows/ci.yml file to depend on that release since doing so
does not introduce any false positives.