Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

after cli.GlobalString was removed Google Cloud Print Connector cannot be built #466

Closed
okhadkevich opened this issue Nov 11, 2019 · 10 comments · Fixed by #470
Closed

after cli.GlobalString was removed Google Cloud Print Connector cannot be built #466

okhadkevich opened this issue Nov 11, 2019 · 10 comments · Fixed by #470

Comments

@okhadkevich
Copy link

I have an error when building Google Cloud Print Connector:

$ go get github.com/google/cloud-print-connector/...

github.com/google/cloud-print-connector/lib
go/src/github.com/google/cloud-print-connector/lib/config_unix.go:235:15: context.GlobalString undefined (type *cli.Context has no field or method GlobalString)

I have asked a question at urfave/cli#926 and I have got an answer
urfave/cli#926 (comment)

Is there any chance to fix this problem?

@rickrich
Copy link

rickrich commented Nov 12, 2019

Ditto. Running under Fedora 30...

$ go get -insecure -u github.com/google/cloud-print-connector/...
# github.com/google/cloud-print-connector/lib
src/github.com/google/cloud-print-connector/lib/config_unix.go:235:15: context.GlobalString undefined (type *cli.Context has no field or method GlobalString)

It used to work...

@coilysiren
Copy link

👋 Hi @okhadkevich & @rickrich, similarly to this PR #283, this repo needs to get updated with the latest changes we made to urfave/cli.

Here's an example of someone making this update: purpleidea/mgmt#571.

@jkcdarunday
Copy link
Contributor

Hmm. I'm trying to migrate this at jkcdarunday@ae788e8.

It currently compiles but I should do some tests first before I turn it into a PR.

@franzhildenburg
Copy link

Hmm. I'm trying to migrate this at jkcdarunday@ae788e8.

It currently compiles but I should do some tests first before I turn it into a PR.

With your changes @jkcdarunday , I'm now getting:

$ go get github.com/jkcdarunday/cloud-print-connector/...
# github.com/google/cloud-print-connector/lib
go\src\github.com\google\cloud-print-connector\lib\config_windows.go:162:15: context.GlobalString undefined (type *cli.Context has no field or method GlobalString)
# github.com/jkcdarunday/cloud-print-connector/lib
go\src\github.com\jkcdarunday\cloud-print-connector\lib\config_windows.go:162:15: context.GlobalString undefined (type *cli.Context has no field or method GlobalString)

Thanks

@jkcdarunday
Copy link
Contributor

jkcdarunday commented Nov 16, 2019

@franzhildenburg
Ahh. Looks like I missed the files targeting Windows. I've applied the windows-related changes on my fork. Now testing it on a Windows machine.

@rickrich
Copy link

rickrich commented Nov 22, 2019

$ go get -insecure -u github.com/jkcdarunday/cloud-print-connector/...
# github.com/google/cloud-print-connector/lib
src/github.com/google/cloud-print-connector/lib/config_unix.go:235:15: context.GlobalString undefined (type *cli.Context has no field or method GlobalString)

Still doesn't work!

@franzhildenburg
Copy link

franzhildenburg commented Nov 22, 2019

$ go get -insecure -u github.com/jkcdarunday/cloud-print-connector/...
# github.com/google/cloud-print-connector/lib
src/github.com/google/cloud-print-connector/lib/config_unix.go:235:15: context.GlobalString undefined (type *cli.Context has no field or method GlobalString)

Still doesn't work!

I think you have to rename the "imports" that refer to "github.com/google/cloud-print-connector" to make it work under jkcdarunday's fork.

E.g. in jkcdarunday/cloud-print-connector/blob/master/gcp-connector-util/init.go, rename "github.com/google/cloud-print-connector/lib" to "github.com/jkcdarunday/cloud-print-connector/lib".

@rickrich
Copy link

rickrich commented Nov 22, 2019

So I should file a bug report on jkcdarunday fork, then?

Where are the Issues for jkcdarunday fork?

$ pwd
/home/rick/go
$ find . -print | grep blob
$

No "blob" at all!

$ vi ./src/github.com/jkcdarunday/cloud-print-connector/gcp-connector-util/init.go
"github.com/jkcdarunday/cloud-print-connector/gcp"
"github.com/jkcdarunday/cloud-print-connector/lib"
:wq
$ go get -insecure -u github.com/jkcdarunday/cloud-print-connector/...
# github.com/google/cloud-print-connector/lib
src/github.com/google/cloud-print-connector/lib/config_unix.go:235:15: context.GlobalString undefined (type *cli.Context has no field or method GlobalString)

@jkcdarunday
Copy link
Contributor

You shouldn't be running go get on the fork as it's meant as a PR to merge to this upstream repo. That's why the imports don't refer to itself and the fork won't compile.

@jkcdarunday
Copy link
Contributor

When I'm testing the fork, what I do is the ff.:

# The ff. will fail but will pull cloud-print-connector and to your $GOPATH
go get -v github.com/google/cloud-print-connector/...

# Checkout forked branch
cd $GOPATH/src/github.com/google/cloud-print-connector/
git remote add jkcdarunday https://github.com/jkcdarunday/cloud-print-connector
git fetch --all
git checkout -b migrate-urfave-cli jkcdarunday/migrate-urfave-cli

# Build
mkdir build
go build -o build/ ./...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants