Commit Graph

5013 Commits

Author SHA1 Message Date
Qi Xiao
e578826ad1 tools/cirrus-deploy.sh: Accomodate changes in buildall.sh. 2021-01-28 15:13:13 +00:00
Qi Xiao
3ab3b908ec tools/cirrus-deploy.sh: Fix the find command; the cirrus builder uses Busybox. 2021-01-28 15:01:13 +00:00
Qi Xiao
91bdaaf629 Change how version information is overriden.
The mechanism is now documented in PACKAGING.md.

Also refactor tools/buildall.sh to make it easy to make reproducible builds, and
fix tools/cirrus-deploy.sh.
2021-01-28 14:41:34 +00:00
Qi Xiao
1473fccceb Make website/ its own Go module.
This allows us to remove toml as a dependency of the src.elv.sh module since it
is only used in the website's building process.
2021-01-28 11:02:30 +00:00
Qi Xiao
1304dda2a1
README: Update Twitter handle 2021-01-27 23:54:14 +00:00
Qi Xiao
c18a888557
website: Update Twitter handle 2021-01-27 23:53:43 +00:00
Qi Xiao
a679c6817f website: Change the status of try elvish from "coming soon" to "beta" 2021-01-27 23:42:53 +00:00
Qi Xiao
e620433422 tools/buildall.sh: Allow using different version name in filename and buildinfo. 2021-01-27 22:10:38 +00:00
Qi Xiao
c4c4a74f51 tools/buildall.sh: support running from any directory, and support passing arguments. 2021-01-27 14:09:00 +00:00
Qi Xiao
88c5dade37 Remove tools/build-old-tag.sh as it's no longer used. 2021-01-27 14:08:33 +00:00
Qi Xiao
e4fa1cf452 Run gofmt -s on pkg/eval/closure.go. 2021-01-27 01:44:28 +00:00
Qi Xiao
22e4315eb1 Move the main package to cmd/elvish.
Now that the module path is "src.elv.sh", doing a "go get" will install the
Elvish binary as "src.elv.sh"; this is not what we want, so move the main
package into a package called "elvish".

Also update "go get" and "go build" commands accordingly.
2021-01-27 01:35:01 +00:00
Qi Xiao
196eea21d4 Change module import path to src.elv.sh 2021-01-27 01:30:25 +00:00
Qi Xiao
ad3a947b28 website: Fix typo in CSS 2021-01-27 01:02:44 +00:00
Qi Xiao
d3600ce358 website: Add canonical URL to the generated HTML files. 2021-01-27 00:03:12 +00:00
Qi Xiao
2dac04dbce Fix highlighting of command names with explicit builtin:. 2021-01-24 16:44:34 +00:00
Qi Xiao
ae98cc5272 Add a new "deprecate" command. 2021-01-24 15:32:24 +00:00
Qi Xiao
b87cc7b5de Add back support for circular module dependency.
This fixes #1226.
2021-01-24 14:10:45 +00:00
Qi Xiao
3bf95ec088 Fix the panic when referencing a module that calls edit:add-var.
This fixes #1225.
2021-01-21 01:05:33 +00:00
Qi Xiao
de562f84d4 Deprecate the $-exports- mechanism in 0.15. 2021-01-19 23:28:38 +00:00
Qi Xiao
37c3c0b0de Deprecate the use of "a=b" for non-temporary assignment in 0.15.
It is still the syntax for temporary assignment; only using it as a standalone
command is deprecated.
2021-01-19 23:28:34 +00:00
Qi Xiao
fbfbef8531 pkg/eval: Move implementation of compile-time deprecation to compiler.go. 2021-01-19 23:20:23 +00:00
Qi Xiao
47d9766f5c Control deprecation warnings with a number instead of a bool.
Previously, to avoid showing deprecation warnings for the next release when the
user is running on HEAD, a boolean CLI flag -show-deprecations is introduced,
and is set to false in the master branch. The idea is that release branches will
have this default to true, so people running released versions will see
deprecations.

However, this means that people running on HEAD will never see any deprecations
unless they use this CLI flag, which is not ideal. This commit replaces the flag
bool -show-deprecations with a numerical -deprecation-level flag, which requests
deprecations that are active as of release 0.X to be shown. The default value of
this flag will be the minor version number of the *last* release, so that people
running HEAD will see as many deprecation warnings as people running the last
release would. This number will be bumped just before releases.
2021-01-19 21:37:36 +00:00
Kurtis Rader
87519a9d9c Fix typo in description of path:is-regular 2021-01-17 04:56:59 +00:00
Qi Xiao
e6e6534fc9 Fix elvdoc for edit:add-vars. 2021-01-17 01:36:06 +00:00
Qi Xiao
d97c989219 Introduce edit:add-var and edit:add-vars.
This addresses #1138.
2021-01-17 01:33:25 +00:00
Qi Xiao
a16cd8dfa6 pkg/eval: Allow "var a:". 2021-01-17 01:17:35 +00:00
Qi Xiao
76c23aa7b0 pkg/edit: Fix formatting of some elvdoc. 2021-01-17 01:13:00 +00:00
Qi Xiao
a1cde7b77b pkg/fsutil: Fix claim_test.go for Windows. 2021-01-17 00:55:51 +00:00
Qi Xiao
629144195b pkg/eval: Fix handling of the global scope in (*Evaler).Eval.
- Do not mutate ev.global if cfg.Global is not nil. This fixes #1223.

- Handle concurrent mutations correctly. This addresses #1138.
2021-01-17 00:36:18 +00:00
Qi Xiao
327561ed0a pkg/daemon: Move the opening of stdin for the daemon to spawn.go. 2021-01-17 00:12:36 +00:00
Qi Xiao
f530a71afc pkg/fsutil: Add more tests for ClaimFile.
The test for concurrent calls uncovered a bug where concurrent calls could
return the same file; fix this by adding a O_EXCL flag.
2021-01-17 00:11:38 +00:00
Kurtis Rader
be712d5405
Introduce the path: module (#1203)
* Introduce the `path:` module

This is based on https://github.com/elves/elvish/pull/1084 by @kolbycrouch
submitted five months ago. It addresses all of the feedback on that
change and includes other documentation and unit test improvements. It
also includes a couple of extensions to the original P.R., such as a
`path:is-abs` command.

I decided to resurrect that change because I want better support for
filesystem path manipulation so that users can replace non-portable
external commands such as `realpath` and `find` with Elvish builtins. This
is a baby step towards that goal.

Related #849

* Add a `path:is-regular` command

This adds a `path:is-regular` command.  This is for symmetry with the
`path:is-dir` command and the glob `[type:regular]` modifier.

It also adds support for symlinks in the `testutil.Applydir` function
and change the path unit test to use it.

* Rename path:real to path:eval-symlinks
2021-01-16 23:21:33 +00:00
Kurtis Rader
d241243fdf Ensure the daemon doesn't have fds open on the tty
The Elvish daemon should not inherit file descriptors open on the tty.
Make the daemon's stdin open on the null device and its stdout/stderr
open on a predictable file.

Fixes #1191
2021-01-16 23:18:38 +00:00
Qi Xiao
8df6d36d5f Use encrypted codecov token.
The Cirrus CI config included the codecov token in cleartext as I was under the
impression that this was necessary for coverage reports on pull requests to work
correctly. But this seems to be also causing pushes in other people's
Elvish repositories to appear in the master branch's commit history
(https://app.codecov.io/gh/elves/elvish/commits). Changing the token to be
encrypted might fix the problem; if this breaks coverage reports on pull
requests the token can be switched back to cleartext.
2021-01-16 06:57:39 +00:00
Qi Xiao
6685c15981 Actually, continue to exclude test helpers.
Test helpers will necessarily contain some lines that are only executed on test
failure, so exluding them from test coverage is still a good idea.

Also exclude pkg/web.
2021-01-16 06:42:27 +00:00
Qi Xiao
d37f86a4ff .codecov.yml: Remove excludes now that cross-package coverages are included. 2021-01-16 06:35:14 +00:00
Qi Xiao
7e3d86b462 Implement correct highlighting for the new "var" and "set" commands.
This addresses #645.
2021-01-16 06:11:40 +00:00
Qi Xiao
072677351b Introduce "var" and "set".
Assignment using "foo = bar" instead of "var foo = bar" or "set foo = bar" is
not yet deprecated, but will be soon.

This addresses #645.
2021-01-16 06:11:37 +00:00
Qi Xiao
22dc0e6a6b Move parsing of ordinary assignment form to the compile phase.
This will unblock the implementation of the "var" special command.

This addresses #645.
2021-01-16 01:48:51 +00:00
Qi Xiao
5f7bcb91e5 Make the syntax for the argument of "del" consistent with assignment LHS.
This fixes #1218.
2021-01-13 23:27:38 +00:00
Qi Xiao
141a6d4955 .cirru.yml: Remove Code Climate code.
The script requires more setup than I expected, and the web UI doesn't support
viewing the source files as a tree. We will live with Codecov for now.
2021-01-13 00:41:29 +00:00
Qi Xiao
594debc834 .cirrus.yml: Accomodate cc-test-reporter's requirement of cover filename. 2021-01-13 00:34:47 +00:00
Qi Xiao
15eb190998 Try to fix Code Climate coverage by passing "-t gocov" to the uploader. 2021-01-13 00:25:39 +00:00
Qi Xiao
da82a3ab14 .cirrus.yml: Upload coverage to Code Climate. 2021-01-13 00:19:55 +00:00
Qi Xiao
e040a4650f Quote variable names where applicable when completing variables. 2021-01-12 23:06:23 +00:00
Qi Xiao
80e944bee2 Support using arbitrary character in variable names by quoting. 2021-01-12 23:06:19 +00:00
Qi Xiao
0759fffdb2 Document that &display of edit:complex-candidate can be styled text. 2021-01-12 00:54:46 +00:00
Qi Xiao
e833b74aa4 Document %% in the elvdoc of printf. 2021-01-11 21:49:11 +00:00
Qi Xiao
ff69171c9d Fix typo: interprete -> interpret 2021-01-11 12:00:55 +00:00