abiosoft/ishell

Compile error when using dep: *readline.Config has no field or method FuncFilterInputRune

TheFriendlyCoder opened this issue · 5 comments

I am pretty new to the GO programming language, but as a first-project I was going to try out this library to try and write a little interactive shell. However, when I try to compile a project that uses this library I get the following error:

vendor/gopkg.in/abiosoft/ishell.v2/ishell.go:446:6: conf.FuncFilterInputRune undefined (type *readline.Config has no field or method FuncFilterInputRune)

My steps to reproduce look something like this:

  • created empty project in GOPATH/src/... named "sample_cmd" with the following sample_cmd.go file:
package main

import (
	"fmt"
	"os"

	"gopkg.in/abiosoft/ishell.v2"
)

func main() {
	fmt.Printf("Num params %d\n", len(os.Args))
	shell := ishell.New()
	shell.Println("Hello from the shell...")
}
  • changed directory into my new project
  • ran dep init
  • confirmed that all the required dependencies were downloaded to a ./vendor subfolder under my project folder
  • changed directory back to my workspace root (ie: cd $GOPATH)
  • attempted to build the project: go build src/.../sample_cmd

Result: build failed with the error message I mentioned above.

Again, I'm a total newbie with Go so if I've done something weird here that caused this error just let me know.

In case it's helpful, here's the Gopkg.lock file generated by dep init:

# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.


[[projects]]
  name = "github.com/chzyer/readline"
  packages = ["."]
  revision = "62c6fe6193755f722b8b8788aa7357be55a50ff1"
  version = "v1.4"

[[projects]]
  name = "github.com/fatih/color"
  packages = ["."]
  revision = "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4"
  version = "v1.7.0"

[[projects]]
  branch = "master"
  name = "github.com/flynn-archive/go-shlex"
  packages = ["."]
  revision = "3f9db97f856818214da2e1057f8ad84803971cff"

[[projects]]
  name = "github.com/mattn/go-colorable"
  packages = ["."]
  revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072"
  version = "v0.0.9"

[[projects]]
  name = "github.com/mattn/go-isatty"
  packages = ["."]
  revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39"
  version = "v0.0.3"

[[projects]]
  branch = "master"
  name = "golang.org/x/sys"
  packages = ["unix"]
  revision = "c11f84a56e43e20a78cee75a7c034031ecf57d1f"

[[projects]]
  branch = "v2"
  name = "gopkg.in/abiosoft/ishell.v2"
  packages = ["."]
  revision = "42a9bbfa0017d7243b50b8f542076ef3d5e7da6c"

[solve-meta]
  analyzer-name = "dep"
  analyzer-version = 1
  inputs-digest = "31eb5023a3211870b8d6590876d8d898f46cd8b1849af3741175a316c1a216ed"
  solver-name = "gps-cdcl"
  solver-version = 1

Experiencing the same issue.

The problem is with latest release tag of chzyer/readline which is about 2 years old and far outdated compared to what ishell is using.

I've switched to using my fork of chzyer/readline for the main time until a fix is upstream. Should be fixed now.

Thank you @abiosoft that was very quick!!, :D