This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
another fixer bug on fixing plugins. (not only fix but also some others) #83
Labels
bug
Something isn't working
Comments
Current behavior: $ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins install github.com/gobuffalo/buffalo-heroku
no required module provides package github.com/gobuffalo/buffalo-heroku; to add it:
go get github.com/gobuffalo/buffalo-heroku
Usage:
buffalo plugins install [flags]
Flags:
-d, --dry-run dry run
-h, --help help for install
--vendor will install plugin binaries into ./plugins [WINDOWS not currently supported]
-v, --verbose turn on verbose logging
ERRO[0000] Error: exit status 1
$ buffalo plugins install github.com/gobuffalo/buffalo-heroku@latest
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-heroku@latest"
go_get = "github.com/gobuffalo/buffalo-heroku@latest"
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins list
Bin |Command |Description
--- |--- |---
buffalo-pop |buffalo db |[DEPRECATED] please use `buffalo pop` instead.
buffalo-pop |buffalo destroy model |Destroys model files.
buffalo-pop |buffalo pop |A tasty treat for all your database needs
$ buffalo plugins remove github.com/gobuffalo/buffalo-heroku@latest
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins remove github.com/gobuffalo/buffalo-pop@latest
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins install github.com/gobuffalo/buffalo-pop@latest
<...>
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
[[plugin]]
binary = "buffalo-pop@latest"
go_get = "github.com/gobuffalo/buffalo-pop@latest"
$ buffalo plugins install github.com/gobuffalo/buffalo-pop/v3@latest
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
[[plugin]]
binary = "buffalo-pop@latest"
go_get = "github.com/gobuffalo/buffalo-pop@latest"
[[plugin]]
binary = "v3@latest"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins remove github.com/gobuffalo/buffalo-pop/v3@latest
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
[[plugin]]
binary = "buffalo-pop@latest"
go_get = "github.com/gobuffalo/buffalo-pop@latest"
$ buffalo plugins remove github.com/gobuffalo/buffalo-pop@latest
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins remove github.com/gobuffalo/buffalo-pop/v3@latest
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ |
Fixed behavior: $ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins install github.com/gobuffalo/buffalo-heroku
$ buffalo plugins list
Bin |Command |Description
--- |--- |---
buffalo-pop |buffalo db |[DEPRECATED] please use `buffalo pop` instead.
buffalo-heroku |buffalo heroku |helps with heroku setup and deployment for buffalo applications
buffalo-pop |buffalo destroy model |Destroys model files.
buffalo-pop |buffalo pop |A tasty treat for all your database needs
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-heroku"
go_get = "github.com/gobuffalo/buffalo-heroku@latest"
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins remove buffalo-heroku
$ buffalo plugins list
Bin |Command |Description
--- |--- |---
buffalo-pop |buffalo db |[DEPRECATED] please use `buffalo pop` instead.
buffalo-pop |buffalo destroy model |Destroys model files.
buffalo-pop |buffalo pop |A tasty treat for all your database needs
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ buffalo plugins remove buffalo-pop
$ buffalo plugins list
Bin |Command |Description
--- |--- |---
$ cat config/buffalo-plugins.toml
$ buffalo plugins install github.com/gobuffalo/buffalo-pop/v3
$ buffalo plugins list
Bin |Command |Description
--- |--- |---
buffalo-pop |buffalo db |[DEPRECATED] please use `buffalo pop` instead.
buffalo-pop |buffalo destroy model |Destroys model files.
buffalo-pop |buffalo pop |A tasty treat for all your database needs
$ cat config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ $ git status
On branch master
nothing to commit, working tree clean
$ buffalo fix -y
! This updater will attempt to update your application to Buffalo version: v0.18.1
go: finding module for package github.com/gobuffalo/suite
go: found github.com/gobuffalo/suite in github.com/gobuffalo/suite v2.8.2+incompatible
~~~ Rewriting Imports ~~~
go: finding module for package github.com/gobuffalo/suite/v4
go: found github.com/gobuffalo/suite/v4 in github.com/gobuffalo/suite/v4 v4.0.2
go: finding module for package github.com/gobuffalo/buffalo-pop/v3/pop/popmw
go: found github.com/gobuffalo/buffalo-pop/v3/pop/popmw in github.com/gobuffalo/buffalo-pop/v3 v3.0.2
~~~ Checking webpack.config.js ~~~
~~~ Checking package.json ~~~
yarn install v1.22.11
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 10.07s.
~~~ Patching package.json to add dev and build scripts ~~~
~~~ package.json doesn't need to be patched, skipping. ~~~
~~~ Installing required tools ~~~
~~~ Checking for deprecations ~~~
~~~ Upgrading Dockerfile ~~~
~~~ Removing old plugins ~~~
~~~ Removing previous version of buffalo-pop plugin ~~~
~~~ Cleaning plugins cache ~~~
~~~ Reinstalling plugins ~~~
~~~ Adding .plush extension to .html/.js/.md files ~~~
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: Dockerfile
modified: actions/actions_test.go
modified: actions/app.go
modified: config/buffalo-plugins.toml
modified: go.mod
modified: go.sum
modified: models/models_test.go
modified: package.json
modified: webpack.config.js
modified: yarn.lock
no changes added to commit (use "git add" and/or "git commit -a")
$ git diff config/buffalo-plugins.toml
diff --git a/config/buffalo-plugins.toml b/config/buffalo-plugins.toml
index 611c5b9..4defaca 100644
--- a/config/buffalo-plugins.toml
+++ b/config/buffalo-plugins.toml
@@ -1,3 +1,3 @@
[[plugin]]
binary = "buffalo-pop"
- go_get = "github.com/gobuffalo/buffalo-pop/v2"
+ go_get = "github.com/gobuffalo/buffalo-pop/v3@latest"
$ |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
buffalo fix
fails on updating plugins (for buffalo-pop). It fails on removing the old one since theRemove()
method is not that easy to use and the parameter cannot be easily selected by the real status of the application configuration.Fixing only the calling parameter can be one option but I don't think the current
key()
mechanism is reasonable, so I am fixing it. (almost done, checking if there is any side effects.)Steps to Reproduce the Problem
buffalo fix -y
on it.config/buffalo-plugins.toml
Expected Behavior
The old version of buffalo-pop (v2) is removed, and the new one (v3@latest) is added.
Actual Behavior
Two of them are registered on the toml file, and the fix command failed.
The text was updated successfully, but these errors were encountered: