-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create ignite doctor
cmd
#3291
Labels
Milestone
Comments
aljo242
added
type:request
Feature request.
component:cli-doctor
Related to Ignite doctor.
labels
Dec 14, 2022
What about upgrading |
Good point, this should be included also, will take that into account. |
tbruyelle
added a commit
that referenced
this issue
Jan 6, 2023
Fix #3291 - add ignite doctor command (hidden for the moment) - migrate config.yml if needed - create tools/tools.go if not present, then install dependency tools. The `tools/tools.go` scaffold is handled by the same generator as `scaffold chain`, with an update allowing it to filter the fileset. `xgenny.NewEmbedWalker`, which was used to remove the `files/` prefix, is replaced by `fs.Sub` from the standard library. - update `cosmosgen.InstallDepTools()` - remove retro compatibilty with chain that doesn't have `tools/tools.go`, in other words, remove the call to `go get` - run `go mod tidy` to update `go.sum` - suggest to run ignite doctor when dependency tools install fails - move `GOSUMDB=off` inside `gocmd.ModTidy` instead of setting it prior to the call. This ensures it's always set. Because the command uses intensively the filesystem, I chose to test it with integration tests only. The integration test introduces a new library called `testscript` [0], which is very convenient for this kind of tests. `testscript` is based txt files, where each file is a test case that contains some instructions. The txt file for `ignite doctor` runs `ignite doctor` and then asserts what has changed in the filesystem, according to some commands like `cmp`. The initial state before the command is run is also specified in the txt file, with a list of files designated by `-- filename --` followed by the file content. [0] https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript
tbruyelle
added a commit
that referenced
this issue
Jan 6, 2023
Fix #3291 - add ignite doctor command (hidden for the moment) - migrate config.yml if needed - create tools/tools.go if not present, then install dependency tools. The `tools/tools.go` scaffold is handled by the same generator as `scaffold chain`, with an update allowing it to filter the fileset. `xgenny.NewEmbedWalker`, which was used to remove the `files/` prefix, is replaced by `fs.Sub` from the standard library. - update `cosmosgen.InstallDepTools()` - remove retro compatibilty with chain that doesn't have `tools/tools.go`, in other words, remove the call to `go get` - run `go mod tidy` to update `go.sum` - suggest to run ignite doctor when dependency tools install fails - move `GOSUMDB=off` inside `gocmd.ModTidy` instead of setting it prior to the call. This ensures it's always set. Because the command uses intensively the filesystem, I chose to test it with integration tests only. The integration test introduces a new library called `testscript` [0], which is very convenient for this kind of tests. `testscript` is based txt files, where each file is a test case that contains some instructions. The txt file for `ignite doctor` runs `ignite doctor` and then asserts what has changed in the filesystem, according to some commands like `cmp`. The initial state before the command is run is also specified in the txt file, with a list of files designated by `-- filename --` followed by the file content. [0] https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript
jeronimoalbi
added a commit
that referenced
this issue
Apr 6, 2023
* feat: new ignite doctor command Fix #3291 - add ignite doctor command (hidden for the moment) - migrate config.yml if needed - create tools/tools.go if not present, then install dependency tools. The `tools/tools.go` scaffold is handled by the same generator as `scaffold chain`, with an update allowing it to filter the fileset. `xgenny.NewEmbedWalker`, which was used to remove the `files/` prefix, is replaced by `fs.Sub` from the standard library. - update `cosmosgen.InstallDepTools()` - remove retro compatibilty with chain that doesn't have `tools/tools.go`, in other words, remove the call to `go get` - run `go mod tidy` to update `go.sum` - suggest to run ignite doctor when dependency tools install fails - move `GOSUMDB=off` inside `gocmd.ModTidy` instead of setting it prior to the call. This ensures it's always set. Because the command uses intensively the filesystem, I chose to test it with integration tests only. The integration test introduces a new library called `testscript` [0], which is very convenient for this kind of tests. `testscript` is based txt files, where each file is a test case that contains some instructions. The txt file for `ignite doctor` runs `ignite doctor` and then asserts what has changed in the filesystem, according to some commands like `cmp`. The initial state before the command is run is also specified in the txt file, with a list of files designated by `-- filename --` followed by the file content. [0] https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript * fix lint * chore: rename xfilepath.Must * Update ignite/pkg/gocmd/gocmd.go Co-authored-by: Jerónimo Albi <[email protected]> * Update ignite/services/doctor/doctor.go Co-authored-by: İlker G. Öztürk <[email protected]> * fix lint --------- Co-authored-by: Alex Johnson <[email protected]> Co-authored-by: Jerónimo Albi <[email protected]> Co-authored-by: İlker G. Öztürk <[email protected]>
Jchicode
pushed a commit
to Jchicode/cli
that referenced
this issue
Aug 9, 2023
* feat: new ignite doctor command Fix ignite#3291 - add ignite doctor command (hidden for the moment) - migrate config.yml if needed - create tools/tools.go if not present, then install dependency tools. The `tools/tools.go` scaffold is handled by the same generator as `scaffold chain`, with an update allowing it to filter the fileset. `xgenny.NewEmbedWalker`, which was used to remove the `files/` prefix, is replaced by `fs.Sub` from the standard library. - update `cosmosgen.InstallDepTools()` - remove retro compatibilty with chain that doesn't have `tools/tools.go`, in other words, remove the call to `go get` - run `go mod tidy` to update `go.sum` - suggest to run ignite doctor when dependency tools install fails - move `GOSUMDB=off` inside `gocmd.ModTidy` instead of setting it prior to the call. This ensures it's always set. Because the command uses intensively the filesystem, I chose to test it with integration tests only. The integration test introduces a new library called `testscript` [0], which is very convenient for this kind of tests. `testscript` is based txt files, where each file is a test case that contains some instructions. The txt file for `ignite doctor` runs `ignite doctor` and then asserts what has changed in the filesystem, according to some commands like `cmp`. The initial state before the command is run is also specified in the txt file, with a list of files designated by `-- filename --` followed by the file content. [0] https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript * fix lint * chore: rename xfilepath.Must * Update ignite/pkg/gocmd/gocmd.go Co-authored-by: Jerónimo Albi <[email protected]> * Update ignite/services/doctor/doctor.go Co-authored-by: İlker G. Öztürk <[email protected]> * fix lint --------- Co-authored-by: Alex Johnson <[email protected]> Co-authored-by: Jerónimo Albi <[email protected]> Co-authored-by: İlker G. Öztürk <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create basic
ignite doctor
command. This should be hidden originally.First iteration will:
tools/tools.go
existsThe text was updated successfully, but these errors were encountered: