Cli: after cli.GlobalString was removed Google Cloud Print Connector cannot be built

Created on 11 Nov 2019  路  9Comments  路  Source: urfave/cli

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)

arev2 kinbug statuclaimed

All 9 comments

What version of go are you using? I think this should not happen if you use Go that supports modules.

On Ubuntu 18.04

$ go version
go version go1.12.9 linux/amd64

The issue is that google/cloud-print-connector does not support go modules yet, so it falls back to your local urfave/cli download (master branch) and so the project won't build any more.

The recent changes in git master broke our builds too. We don't use go modules.

I assume you are vendoring your dependencies somehow differently in that case?

Modules and vendoring was developed for this particular reason.

I don't think it's fair to expect projects to stop all progress because some subset of users are not using widely adopted methods for ensuring version compatility and rely purely on luck that the upstream project will never make breaking API changes.

@AudriusButkevicius

I assume you are vendoring your dependencies somehow differently in that case?

We use git master of almost all our dependencies. It helps us keep up to date with changes in projects as opposed to having to bump everything all at once. See more info here: https://github.com/purpleidea/mgmt/blob/master/docs/faq.md#why-arent-you-using-glide-godep-or-go-mod-for-dependency-management

We've only had _about_ 3 breaks so far in the history of the project, funny enough, this makes 4, and one of the old ones was also from this project (codegangsta/cli in: https://github.com/purpleidea/mgmt/commit/ab73261fd4e98cf7ecb08066ad228a8f559ba16a )

I don't think it's fair to expect projects to stop all progress because some subset of users are not using widely adopted methods for ensuring version compatility and rely purely on luck that the upstream project will never make breaking API changes.

Not at all. I agree, please change away. Of note, most mature quality projects do remain stable, however if there are changes to be made, we'd prefer they do make them, and improve API and code quality. What's missing this time, is that it seems the API changes were made before good docs or a porting guide were made available. That's my only big objection, and seeing as our builds are still broken, any help in knowing what to change or patches would be appreciated!

Some initial work is in here: https://github.com/purpleidea/mgmt/pull/571

As I mentioned in the other thread we expect one more of these breakages next year, so sadly expect more work in the future.

馃憢 hi @purpleidea!

Thanks for your feedback here, I had no idea people used go modules in this way ^^

I actually did create a ticket (https://github.com/urfave/cli/issues/921) for writing migration guide, I just didn't know that we should create the guide _before merging to master_. You live and you learn 馃檹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mponton picture mponton  路  5Comments

genieplus picture genieplus  路  5Comments

oleorhagen picture oleorhagen  路  4Comments

blackrez picture blackrez  路  5Comments

renzhengeek picture renzhengeek  路  5Comments