Qi Xiao
d48b6f1843
pkg/eval/vals: Replace MakeListFromStrings with a generic MakeListSlice.
2022-06-17 16:50:38 +01:00
Qi Xiao
68bce3b4a4
Clarify error message when writing values to port not supporting it.
...
This fixes #1516 .
2022-06-07 20:29:34 +01:00
Qi Xiao
aa6d5a6257
Re-enable staticcheck, and fix issues it found.
2022-05-22 11:57:38 +01:00
Qi Xiao
dd3950cec0
Use the new testutil.Set in more places.
2022-04-11 21:55:59 +01:00
Qi Xiao
f8f60953ad
Properly deprecate float64.
...
- Replace its use with "num" in documentation and test code.
- Add a new "inexact-num" for explicitly converting a number to inexact.
This fixes #1513 .
2022-04-09 11:45:15 +01:00
Qi Xiao
51e4d97568
interface{} -> any now that Elvish requires Go 1.18.
2022-03-20 16:17:19 +00:00
Qi Xiao
f7cb556d9b
Require Go 1.18.
...
- Run "go fix" to remove legacy build tags
- Use staticcheck@master until it has a release that supports Go 1.18
- Turn off autocrlf for Windows tasks
2022-03-20 15:28:23 +00:00
Qi Xiao
957c8a7521
evaltest: Check that stderr is empty if PrintsStderrWith is not called.
...
Among other things, this will check for deprecation warnings. Also fix test code
that uses deprecated features.
2022-03-20 09:50:05 +00:00
Qi Xiao
ab699bae87
Remove use of deprecated features in bundled modules.
2022-03-19 10:09:44 +00:00
Qi Xiao
1bf3ea3c1b
Add $unix:rlimits for manipulating resource limits.
...
This fixes #959 .
2022-02-20 23:22:33 +00:00
Qi Xiao
59459793e3
pkg/persistent: Cons -> Conj.
...
Cons was a misnomer for the operation of adding an element at the end of a
vector. Follow Clojure's naming here and call this operation Conj.
2022-01-05 22:34:55 +00:00
Qi Xiao
38d4553833
Update assignment syntax in docs.
...
- Also remove the section for the legacy assignment syntax.
- Also add a paragraph to "eval" about upvalues.
2022-01-03 19:45:39 +00:00
Qi Xiao
4fcffc5671
Remove most uses of the legacy assignment syntax.
...
The remaining few uses are in some of the tests, which will be removed later.
This addresses #645 .
2022-01-03 00:47:41 +00:00
Qi Xiao
097e32b375
pkg/eval/vals: Add ReprPlain, Repr without pretty-printing.
...
Also de-export NoPretty now that it is no longer needed.
2021-12-31 21:05:07 +00:00
Qi Xiao
5bf688cf4d
New flag module.
2021-12-31 18:03:24 +00:00
Qi Xiao
7463203bda
pkg/mods: Import pkg/mods/unix.
2021-12-17 00:50:53 +00:00
Qi Xiao
71e5bff8da
Replace direct reference to persistent types with their aliases in eval/vals.
2021-12-17 00:21:20 +00:00
Qi Xiao
089752147a
Fixup for #1447 .
2021-12-13 01:23:14 +00:00
Kurtis Rader
87656c99fa
Replace AnyError
in tests with a specific error
...
The `AnyError` placeholder error can cause tests to succeed for errors
other than what was expected. That is, the use of `AnyError` can mask
bugs in a unit test. So replace it with the specific error, or error type,
the test expects to be raised.
This does not remove the anyError structure because it is used in
the TestCase.DoesNotCompile() method. To keep the size of this change
as small as possible I want to defer updating that use to a separate
change. However, remove the public AnyError var so future test writers
don't attempt to use it.
2021-12-13 01:08:24 +00:00
Qi Xiao
2941f5308e
Fix deprecated code in epm.
2021-12-07 00:44:28 +00:00
Harald Hanche-Olsen
fe8af31f2d
Fix deprecated code in readline-bindings
2021-12-07 00:30:33 +00:00
Qi Xiao
246706aeca
website: Preserve ":" in elvdoc header IDs.
...
This fixes #1430 .
2021-11-29 23:47:59 +00:00
Qi Xiao
a0b93968a3
Fix broken relative links.
2021-11-29 20:03:09 +00:00
Kurtis Rader
d4b4edbbbe
Replace legacy lambda with new lambda examples
...
I was surprised to see so many legacy lambda syntax examples in the
documentation. This replaces all of them with the new syntax -- excluding
the handful of cases meant to explicitly verify the legacy form is still
valid. This also adds a link to the issue in the release notes which
documents the change in syntax.
Related #664
2021-11-28 21:30:59 +00:00
Qi Xiao
08c5f512bf
Apply more tweaks to the path module's elvdoc.
2021-11-28 21:14:43 +00:00
Kurtis Rader
bf04fae352
Improve the path: module documentation
...
This change is due to a recent IM discussion wherein someone had
difficulty finding the `path:is-regular` command. It attempts to make
such discovery easier.
2021-11-28 21:13:46 +00:00
Sauyon Lee
cf4539ae9e
Add transpose binds to readline-binding
2021-11-07 14:50:57 +00:00
Qi Xiao
d71e52cbd7
Refactor the API of eval.NsBuilder to be completely based on methods.
2021-10-23 21:44:11 +01:00
Qi Xiao
41cbcfb1b1
Move elvdoc for the re module to the Go source.
2021-10-23 13:31:44 +01:00
Qi Xiao
0fd916c418
Document the &max option of str:split.
2021-10-23 13:19:14 +01:00
Qi Xiao
b42cfaea61
Remove references to ~/.elvish in documentation.
...
This fixes #1399 .
2021-10-23 12:16:50 +01:00
Qi Xiao
e299010be8
pkg/eval: Export the config fields and remove access methods.
2021-10-05 00:53:38 +01:00
Qi Xiao
0571db69e2
Remove commands deprecated in 0.16.0, and deprecate dir-history.
2021-10-03 16:47:51 +01:00
Qi Xiao
2e6a3abce5
Expose all functionalities of the persistent store in the store: module.
...
This fixes #1032 .
2021-10-03 16:34:52 +01:00
Qi Xiao
ab59ef9062
Move bundled modules into .elv files.
...
- Use go:embed (available since Go 1.16) to embed them into the binary
- Teach elvdoc to support comments starting with #, and find *.elv when given a directory
2021-08-24 16:18:30 +01:00
Qi Xiao
47de83c7d1
Reorganize standard library modules.
...
- Move from pkg/eval/mods to pkg/mods
- Introduce mods.AddTo that adds all standard library modules
- Move epm and readline-binding into their own packages
2021-08-24 15:56:04 +01:00