Bug 253145 - shells/elvish: Update Elvish to v0.15.0
Summary: shells/elvish: Update Elvish to v0.15.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL: https://elv.sh/blog/0.15.0-release-no...
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2021-02-01 02:00 UTC by Adam Jimerson
Modified: 2021-02-02 13:04 UTC (History)
1 user (show)

See Also:


Attachments
Elvish v0.15.0 update (4.66 KB, patch)
2021-02-01 02:00 UTC, Adam Jimerson
vendion: maintainer-approval-
Details | Diff
Elvish update to v0.15.0 V2 (4.55 KB, patch)
2021-02-02 03:01 UTC, Adam Jimerson
vendion: maintainer-approval-
Details | Diff
Elvish update to v0.15.0 V3 (4.55 KB, patch)
2021-02-02 12:11 UTC, Adam Jimerson
vendion: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Jimerson 2021-02-01 02:00:06 UTC
Created attachment 222059 [details]
Elvish v0.15.0 update

The attached patch updates Elvish shell to v0.15.0. This patch also updates the build flags used, and the port description to match changes made upstream.

Portlint: Looks ok

Poudirere testbuild: 11.4-RELEASE i386/amd64, 12.1-RELEASE i386/amd64, 12.2-RELEASE i386/amd64 ok.
Comment 1 Adam Jimerson 2021-02-01 02:02:21 UTC
Full release notes (copied from the given URL):

# Breaking changes

-   Builtin functions and subnamespaces of `edit:` are now read-only.

-   Introspection for rest arguments has changed:

    -   The rest argument is now contained in the `arg-names` field of a
        closure.

    -   The `rest-arg` field now contains the index of the rest argument,
        instead of the name.

-   The `-source` command now runs in a temporary namespace and can no longer
    affect the local scope of its caller.

-   Key modifiers are no longer case insensitive. For example, `Alt` is still
    recognized but `alt` is not. This makes key modifier parsing consistent with
    key names. See [#1163](https://b.elv.sh/1163).

# Deprecated features

Deprecated features will be removed in 0.16.0.

The following deprecated features trigger a warning whenever the code is parsed
or compiled, even if it is not executed:

-   Using the syntax of temporary assignment (`var=value`) for non-temporary
    assignment is now deprecated. The syntax is still valid for temporary
    assignment. For example, using `foo=bar` as a standalone command is
    deprecated, but using it as part of command, like `foo=bar ls`, is not
    deprecated.

-   The `chr` command is now deprecated. Use `str:from-codepoints` instead.

-   The `ord` command is now deprecated. Use `str:to-codepoints` instead.

-   The `has-prefix` command is now deprecated. Use `str:has-prefix` instead.

-   The `has-suffix` command is now deprecated. Use `str:has-suffix` instead.

-   The `-source` command is now deprecated. Use `eval` instead.

-   The undocumented `esleep` command is now deprecated. Use `sleep` instead.

-   The `eval-symlinks` command is deprecated. Use `path:eval-symlinks` instead.

-   The `path-abs` command is deprecated. Use `path:abs` instead.

-   The `path-base` command is deprecated. Use `path:base` instead.

-   The `path-clean` command is deprecated. Use `path:clean` instead.

-   The `path-dir` command is deprecated. Use `path:dir` instead.

-   The `path-ext` command is deprecated. Use `path:ext` instead.

-   The `-is-dir` command is deprecated. Use `path:is-dir` instead.

The following deprecated features trigger a warning when the code is evaluated:

-   Using `:` in slice indices is deprecated. Use `..` instead.

-   The mechanism of assigning to `$-exports-` in `rc.elv` to export variables
    to the REPL namespace is deprecated. Use `edit:add-vars` instead.

# Notable new features

New features in the language:

-   A new `var` special command can be used to explicitly declare variables, and
    optionally assign them initial values.

-   A new `set` special command can be used to set the values of variables or
    elements.

-   Slice indices can now use `..` for left-closed, right-open ranges, and `..=`
    for closed ranges.

-   Rest variables and rest arguments are no longer restricted to the last
    variable.

-   Variables containing any character can now be assigned and used by quoting
    their name, for example `'name!' = foo; put $'name!'`.

New features in the standard library:

-   A new `eval` command supports evaluating a dynamic piece of code in a
    restricted namespace.

-   A new `sleep` command.

-   A new `path:` module has been introduced for manipulating and testing
    filesystem paths.

-   A new `deprecate` command.

New features in the interactive editor:

-   The new commands `edit:add-var` and `edit:add-vars` provide an API for
    manipulating the REPL's namespace from anywhere.

-   SGR escape sequences written from the prompt callback are now supported.

New features in the main program:

-   When using `-compileonly` to check Elvish sources that contain parse errors,
    Elvish will still try to compile the source code and print out compilation
    errors.

# Notable bugfixes

-   Using large lists that contain `$nil` no longer crashes Elvish.
Comment 2 Automation User 2021-02-01 02:20:09 UTC
Build and package info is available at https://gitlab.com/swills/freebsd-ports/pipelines/249419760
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2021-02-01 14:36:00 UTC
Q/A:  Makefile: [22]: use a tab (not space) after a variable name
GH_TUPLE immediately after GH_ACCOUNT 

^Triage: Please confirm this change passes QA (portlint, poudriere at least).
--
https://www.freebsd.org/doc/en/books/porters-handbook/testing.html


Thanks!
Comment 4 Adam Jimerson 2021-02-01 15:43:31 UTC
Comment on attachment 222059 [details]
Elvish v0.15.0 update

Pulling approval to correct issues pointed out by Fernando Apesteguía <fernape@FreeBSD.org>.
Comment 5 Adam Jimerson 2021-02-01 16:05:01 UTC
(In reply to Fernando Apesteguía from comment #3)

> Please confirm this change passes QA (portlint, poudriere at least).

I did run my changes through `portlint` and ran `poudriere testport` on my changes
before rolling this diff and both came back fine.

> Q/A:  Makefile: [22]: use a tab (not space) after a variable name

As for this when I run portlint with those changes it comes back that everything is okay.

diff --git a/shells/elvish/Makefile b/shells/elvish/Makefile
index f3b679debea4..f6d8386e7896 100644
--- a/shells/elvish/Makefile
+++ b/shells/elvish/Makefile
@@ -2,11 +2,11 @@
 
 PORTNAME= elvish
 DISTVERSIONPREFIX= v
-DISTVERSION= 0.14.1
+DISTVERSION= 0.15.0
 CATEGORIES= shells
 
 MAINTAINER= vendion@gmail.com
-COMMENT= Friendly Interactive Shell and Expressive Programming Language
+COMMENT= Elvish = Expressive Programming Language + Versatile Interactive Shell
 
 LICENSE= BSD2CLAUSE
 LICENSE_FILE= ${WRKSRC}/LICENSE
@@ -14,20 +14,24 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
 USES= go:modules
 USE_GITHUB= yes
 GH_ACCOUNT= elves
-GH_TUPLE= \
- BurntSushi:toml:v0.3.1:burntsushi_toml/vendor/github.com/BurntSushi/toml \
- etcd-io:bbolt:v1.3.4:etcd_io_bbolt/vendor/go.etcd.io/bbolt \
- golang:sys:85ca7c5b95cd:golang_sys/vendor/golang.org/x/sys \
- kr:pty:v1.1.4:kr_pty/vendor/github.com/kr/pty \
- mattn:go-isatty:v0.0.12:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
- xiaq:persistent:a1d9ac4077fc:xiaq_persistent/vendor/github.com/xiaq/persistent
-
 
-GO_BUILDFLAGS= -ldflags="-s -w -X github.com/elves/elvish/pkg/buildinfo.Version=${DISTVERSIONPREFIX}${DISTVERSION}" \
+GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
+GO_BUILDFLAGS= -ldflags="-s -w -X github.com/elves/elvish/pkg/buildinfo.Version=${DISTVERSIONPREFIX}${DISTVERSION} -X github.com/elves/elvish/pkg/buildinfo.Reproducible=true" \
  -gcflags="all=-trimpath=${GO_WRKSRC}" \
  -asmflags="all=-trimpath=${GO_WRKSRC}"
-GO_TESTFLAGS= -race
-
+GO_TESTFLAGS=   -race
 PLIST_FILES= bin/elvish
 
+GH_TUPLE= BurntSushi:toml:v0.3.1:burntsushi_toml/vendor/github.com/BurntSushi/toml \
+ creack:pty:v1.1.11:creack_pty/vendor/github.com/creack/pty \
+ etcd-io:bbolt:v1.3.5:etcd_io_bbolt/vendor/go.etcd.io/bbolt \
+ golang:sys:c12d262b63d8:golang_sys/vendor/golang.org/x/sys \
+ mattn:go-isatty:v0.0.12:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
+ xiaq:persistent:3175cfb92e14:xiaq_persistent/vendor/github.com/xiaq/persistent
+
+do-tests:
+ @(cd ${WRKSRC}) ; \
+ ${GO_ENV} ${GO_CMD} test -race ${GO_TESTTARGET} ; \
+ )
+
 .include <bsd.port.mk>
diff --git a/shells/elvish/distinfo b/shells/elvish/distinfo
index 148b6d691368..894a48bf6a31 100644
--- a/shells/elvish/distinfo
+++ b/shells/elvish/distinfo
@@ -1,15 +1,15 @@
-TIMESTAMP = 1597667743
-SHA256 (elves-elvish-v0.14.1_GH0.tar.gz) = 8a8113c0a1325785b212ed59410869bdea30ca2cb7400f95ebb3fbc8689eb6d8
-SIZE (elves-elvish-v0.14.1_GH0.tar.gz) = 575753
+TIMESTAMP = 1612047801
+SHA256 (elves-elvish-v0.15.0_GH0.tar.gz) = 761739307c68fcbc51fd46c052c0a20ae848a30dba1ce3fbb6d27f99672f58e0
+SIZE (elves-elvish-v0.15.0_GH0.tar.gz) = 603715
 SHA256 (BurntSushi-toml-v0.3.1_GH0.tar.gz) = 6593da894578ba510a470735ffbdc88ce88033094dc5a8f4d3957ab87e18803f
 SIZE (BurntSushi-toml-v0.3.1_GH0.tar.gz) = 42077
-SHA256 (etcd-io-bbolt-v1.3.4_GH0.tar.gz) = 536029610c6cd08e4a9fe2e1b0857ae539b0736850132cbbe1c18f0fbed8a4da
-SIZE (etcd-io-bbolt-v1.3.4_GH0.tar.gz) = 95404
-SHA256 (golang-sys-85ca7c5b95cd_GH0.tar.gz) = 06a5cbc446381df9653d4b410239720eea6b27461597de88f3e621664c811294
-SIZE (golang-sys-85ca7c5b95cd_GH0.tar.gz) = 1047239
-SHA256 (kr-pty-v1.1.4_GH0.tar.gz) = f69af477ac2df39246ab64f4bf61767015d493a98a74d5f4da40131f0fe6af7a
-SIZE (kr-pty-v1.1.4_GH0.tar.gz) = 5819
+SHA256 (creack-pty-v1.1.11_GH0.tar.gz) = ee903119251fdf7d90dae890fec40015c5b6049daa68ec8d8750c3ebceaaf5ed
+SIZE (creack-pty-v1.1.11_GH0.tar.gz) = 8396
+SHA256 (etcd-io-bbolt-v1.3.5_GH0.tar.gz) = 63fed2e9bbdcc2aa279c2a7ea4a59c39bc21616ec2c96abff0020872beb3dbad
+SIZE (etcd-io-bbolt-v1.3.5_GH0.tar.gz) = 96494
+SHA256 (golang-sys-c12d262b63d8_GH0.tar.gz) = 57663347583aec8dca1fa3f24af9fdf6612e5db0fd65bcef26a79509548c8d40
+SIZE (golang-sys-c12d262b63d8_GH0.tar.gz) = 1060884
 SHA256 (mattn-go-isatty-v0.0.12_GH0.tar.gz) = addbdc341d7685ed4cc8d2d8a8fd2bd9b784bde00d0ea99fb251039fc10c611c
 SIZE (mattn-go-isatty-v0.0.12_GH0.tar.gz) = 4548
-SHA256 (xiaq-persistent-a1d9ac4077fc_GH0.tar.gz) = 43f431d16d4bef10b1fc6e72f61b3f60f3f0198f8384befba9742b582d2a61aa
-SIZE (xiaq-persistent-a1d9ac4077fc_GH0.tar.gz) = 19502
+SHA256 (xiaq-persistent-3175cfb92e14_GH0.tar.gz) = c481b2ba3bb0ad0dc7dc6d0d3179a55f7770c59b83ea54962cc37da5f5864611
+SIZE (xiaq-persistent-3175cfb92e14_GH0.tar.gz) = 19394
diff --git a/shells/elvish/pkg-descr b/shells/elvish/pkg-descr
index e18e2c4ed0bd..d2f74952bb82 100644
--- a/shells/elvish/pkg-descr
+++ b/shells/elvish/pkg-descr
@@ -1,4 +1,4 @@
-Elvish is a friendly interactive shell and an expressive programming language.
-It runs on Linux, BSDs, macOS and Windows.
+Elvish is an expressive programming language and a versatile interactive shell,
+combined into one seamless package. It runs on Linux, BSDs, macOS and Windows.
 
 WWW: https://elv.sh/
[/u/h/v/p/freebsd-ports]─[⎇ master]─> patch < /home/vendion/elvish.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/shells/elvish/Makefile b/shells/elvish/Makefile
|index f3b679debea4..f6d8386e7896 100644
|--- a/shells/elvish/Makefile
|+++ b/shells/elvish/Makefile
--------------------------
Patching file shells/elvish/Makefile using Plan A...
Hunk #1 succeeded at 2.
Hunk #2 succeeded at 14.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/shells/elvish/distinfo b/shells/elvish/distinfo
|index 148b6d691368..894a48bf6a31 100644
|--- a/shells/elvish/distinfo
|+++ b/shells/elvish/distinfo
--------------------------
Patching file shells/elvish/distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/shells/elvish/pkg-descr b/shells/elvish/pkg-descr
|index e18e2c4ed0bd..d2f74952bb82 100644
|--- a/shells/elvish/pkg-descr
|+++ b/shells/elvish/pkg-descr
--------------------------
Patching file shells/elvish/pkg-descr using Plan A...
Hunk #1 succeeded at 1.
done
[/u/h/v/p/freebsd-ports]─[⎇ master]─[●]─> cd shells/elvish/
[/u/h/v/p/f/s/elvish]─[⎇ master]─[●]─> ls
distinfo        distinfo.orig   Makefile        Makefile.orig   pkg-descr       pkg-descr.orig
[/u/h/v/p/f/s/elvish]─[⎇ master]─[●]─> portlint
looks fine.

Let me see if I can reroll my diff to correct the tab vs space issue. Looking at 
https://docs.freebsd.org/en/books/porters-handbook/testing-portlint.html it seems
that the `-C` flag is recommended but not the default behaivor for portlint? If that
is the case I'll update my script that runs runs `portfmt` and `portlint`.

As for this isuse:

> GH_TUPLE immediately after GH_ACCOUNT

Appoliges for that, let me correct this and resubmit my patch.
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2021-02-01 16:10:33 UTC
No need to apologize, this things happen.

Note: portclippy does a pretty good job too!
Comment 7 Adam Jimerson 2021-02-02 03:01:50 UTC
Created attachment 222087 [details]
Elvish update to v0.15.0 V2

Rerolled patch with changes to GH_TUPLE location and fixing indentation issue.
Comment 8 Fernando Apesteguía freebsd_committer freebsd_triage 2021-02-02 06:28:29 UTC
(In reply to Adam Jimerson from comment #7)
We are almost there!

do-tests: <--- Shouldn't this be do-test?
        @(cd ${WRKSRC}) ; \
                ${GO_ENV} ${GO_CMD} test -race ${GO_TESTTARGET} ; \
                )
Comment 9 Adam Jimerson 2021-02-02 11:48:23 UTC
(In reply to Fernando Apesteguía from comment #8)

It probably should be, I got that from the ports maintainer mailing list as I coundn't find where it was documented in the porters handbook. Let me correct that as well.
Comment 10 Adam Jimerson 2021-02-02 11:49:17 UTC
Comment on attachment 222087 [details]
Elvish update to v0.15.0 V2

Pulling approval to correct do-tests target to do-test.
Comment 11 Adam Jimerson 2021-02-02 12:11:50 UTC
Created attachment 222090 [details]
Elvish update to v0.15.0 V3

This patch corrects the do-test target
Comment 12 Adam Jimerson 2021-02-02 12:16:15 UTC
(In reply to Fernando Apesteguía from comment #8)

Quick question on the do-test target, shouldn't poudrire testport also run this make target if the port's Makefile defines it that way the test(s) can be run in each build jail? In my case I have a build jail using i386 and amd64 for each supported FreeBSD release (currently 11.4, 12.1 (I know it hit EOL and will drop these jails soon) and 12.2).
Comment 13 Adam Jimerson 2021-02-02 12:17:25 UTC
(In reply to Adam Jimerson from comment #11)

I'm holding off adding my approval to this until this looks okay to you. :)
Comment 14 Fernando Apesteguía freebsd_committer freebsd_triage 2021-02-02 12:18:45 UTC
(In reply to Adam Jimerson from comment #9)

It is not. There is a succinct mention though:

CARGO_TEST yes Use the default do-test.

But we should document the test target better.

This one looks OK. Build testing now...
Comment 15 commit-hook freebsd_committer freebsd_triage 2021-02-02 13:03:55 UTC
A commit references this bug:

Author: fernape
Date: Tue Feb  2 13:03:45 UTC 2021
New revision: 563803
URL: https://svnweb.freebsd.org/changeset/ports/563803

Log:
  shells/elvish: Update Elvish to v0.15.0

  ChangeLog: https://elv.sh/blog/0.15.0-release-notes.html

  PR:	253145
  Submitted by:	vendion@gmail.com (maintainer)

Changes:
  head/shells/elvish/Makefile
  head/shells/elvish/distinfo
  head/shells/elvish/pkg-descr
Comment 16 Fernando Apesteguía freebsd_committer freebsd_triage 2021-02-02 13:04:09 UTC
Committed,

Thanks!