The Error methods used to show the start and end indices, while the Show methods
used to show line ranges.
Showing line:col of the start position seems to be pretty standard; both Go and
Rust do that.
I tried including the line:col of the end position too, but can't find a good
enough format.
The Errors function is not related to diag.Error, so keeping it in the same
package is confusing.
Also unexport the MultiError type. This allows its Error method to be
simplified, as it can assume that it always contains at least 2 errors.
pprof.Program.Run called pprof.StopCPUProfile in a defer, so the profile will
only capture the extent of that method.
In order to capture an actual Elvish session pprof.StopCPUProfile needs to be
called before the overall program terminates. This is done by allowing the
special "next program" error to carry cleanup functions.
This fixes#1605.
We are no longer using Pandoc, so this limitation can be lifted.
Also make @cf generate internal links where applicable in non-builtin modules:
"@cf mod:fn" in the doc of "mod" now links to just "#mod:fn" instead of
"mod.html#mod:fn".
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.
* Allow $nil for Callable options
Related #1570
* Add a `&key` option to the `order` command.
Resolves#1570
Co-authored-by: Qi Xiao <xiaq@users.noreply.github.com>
A year ago I submitted a change to replace AnyError with tests for specific
errors (see https://github.com/elves/elvish/commit/87656c99). This does
something similar for DoesNotCompile. This ensures the test does what
is implied and makes correlating specific unit tests with compilation
errors easier.
This includes a couple of changes to compilation error messages to improve
readability (IMHO) but those are not the primary purpose of this change.
Related #1560
- Let file:is-tty always take one argument.
- Revert change to eval.ByteOutput.
- Make sys.IsATTY take a FD instead, to avoid the need to use os.NewFile. Using
os.NewFile can cause the Go runtime to start polling the file, which
interferes with Elvish's terminal reader.
Proactively remove support for shared vars per the discussions in issue
https://b.elv.sh/1222 and the IM channels. This feature is not used
by Elvish itself and is not believed to be used by any Elvish users.
Removing this (presumptively) unused feature makes it simpler to replace
the existing BoltDB store of interactive command/location history with a
simpler flat file implementation (such as used by Bash and Fish). Also,
eliminating shared var support makes it explicit that solving issue #1222
doesn't need to deal with that feature.
Related #1222
- Keep more metrics than just the minimal duration.
- Change default &min-time to 1s.
- Don't allow unitless value as &min-time.
- Rename &on-run to &on-run-end, and &min-iters to &min-runs.
The method returns a message saying that there is no valid value if ValidHigh <
ValidLow. This was useful when these fields were numbers, but since they are now
strings this no longer works.
While working on other changes I noticed that
https://elv.sh/ref/path.html#path:separator used a double backslash for
the Windows example while it should have used a single backslash.