The PureEvaler abstraction made things unnecessarily complex; it's better to
just create a real Evaler for tests is pretty.
The Evaler has a new ReplaceBuiltin method to make it easier to construct the
expected test result.
If a buffer (or notes buffer) hasn't appeared, it means that the app is not in
some intended state. Subsequent tests are unlikely to be meaningful, and may run
into race conditions.
A lot of existing code already uses TestBuffer to ensure that a certain state is
reached, and making failures fatal also suits this usage better.
This fixes#1507.
This allows the build commands in Makefile and tools/buildall.sh to be
simplified.
Official reproducible builds are now handled as a build variant, and the command
in Makefile no longer tries to produce reproducible builds.
Instructions in PACKAGING.md have been completely rewritten.
Remove SetupGlobal and Sanitize and replace them with a SetupForEval, which is
similar to Setup, but called before evaluating code and returns a function to
call after evaluating code.
This was extracted from https://github.com/elves/elvish/pull/1326. It
augments that change by honoring $E:PATHEXT and some other
minor improvements. This matches the behavior of the Go stdlib
os/exec.LookPath() function that is used to decide if what has been typed
(in a non-completion context) represents an external command.
cmp.Diff panics when comparing a struct that has unexported fields and no String
or Equal method, so change some structs to either export all their fields or
have an Equal method.
This fixes#1136.
There was a recent question for which the answer was to use the
`-compileonly` flag but the user didn't realize that because there was
no mention on https://elv.sh/ref/command.html. Similarly, other flags,
like `-decpreation-level`, would benefit from more verbiage than shown by
`elvish -help`.
* Require at least one of "except" or "finally" to be present. This fixes#1424.
* Rename "except" to "catch". The former will be deprecated from 0.18.0. This
addresses #1497.
- Introduce nodePath to store the complete path to the leaf node.
- Introduce a nodesMatcher abstraction to do pattern matching on nodePath.
Parse tree matching previously requires deeply nested if statements to walk
multiple levels of the tree and (optionally) check the property of nodes. These
are replaced by a single "if np.match(...)", with a single level of nesting.
Instead of putting all possible flags in prog.Flags, flags are now registered by
the individual subprograms. The 3 flags -sock, -db and -json are shared by
multiple subprograms and still handled by the prog package.
This new design allows separating the support for -cpuprofile into a separate
subprogram, which is no longer included by the default entry point, making the
binary slightly smaller. A new entrypoint "withpprof" is created.
Also include the LSP subprogram in the nodaemon entry point.
It was an oversight to make them encode codepoints; they were always intended to
be equivalent to their Go counterparts, which encode bytes and can be used to
write arbitrary byte sequences that are not necessarily valid UTF-8 sequences.