Skip to content

Conversation

@lumtis
Copy link
Contributor

@lumtis lumtis commented Jun 16, 2021

Here is a example of the output:

starport type zulu
🔧 Modified files:
proto/venus/genesis.proto
proto/venus/query.proto
proto/venus/tx.proto
testutil/network/network.go
testutil/simapp/simapp.go
vue/src/views/Types.vue
x/venus/client/cli/query.go
x/venus/client/cli/tx.go
x/venus/genesis.go
x/venus/handler.go
x/venus/module.go
x/venus/types/codec.go
x/venus/types/genesis.go
x/venus/types/keys.go
🔨 Created files:
proto/venus/zulu.proto
x/venus/client/cli/queryZulu.go
x/venus/client/cli/queryZulu_test.go
x/venus/client/cli/txZulu.go
x/venus/client/cli/txZulu_test.go
x/venus/keeper/grpc_query_zulu.go
x/venus/keeper/grpc_query_zulu_test.go
x/venus/keeper/msg_server_zulu.go
x/venus/keeper/msg_server_zulu_test.go
x/venus/keeper/zulu.go
x/venus/keeper/zulu_test.go
x/venus/types/messages_zulu.go

🎉 Created a type `zulu`.

(With modified files in cyan and created files in green)

@lumtis lumtis requested review from fadeev and ilgooz as code owners June 16, 2021 09:00
@lumtis lumtis linked an issue Jun 16, 2021 that may be closed by this pull request
@fadeev
Copy link
Contributor

fadeev commented Jun 16, 2021

Awesome, so much better! I was thinking, though, we could follow rails here and list paths alphabetically with "create" and "modify" keywords colored and paths are printed in regular colors. This will make it easier to see what changed in a particular package without looking through both lists. Like this:

Screenshot 2021-06-16 at 14 56 05

wdyt?

@fadeev
Copy link
Contributor

fadeev commented Jun 16, 2021

Screenshot 2021-06-16 at 15 03 35

@lumtis
Copy link
Contributor Author

lumtis commented Jun 16, 2021

This will make it easier to see what changed in a particular package without looking through both lists.

Yeah that makes sense. I had git status output in mind initially

@fadeev
Copy link
Contributor

fadeev commented Jun 16, 2021

Looking good! One small change, not sure about available colors, but if we can change red to orange, that'd be better. Red is for deletion. I think orange may work good both for light and dark backgrounds.

@fadeev
Copy link
Contributor

fadeev commented Jun 16, 2021

One more thing. Can you please add an empty line after the command and before the list of paths? Like this:

fadeev@system chain % starport type post title body

modify proto/chain/genesis.proto
create proto/chain/post.proto
modify proto/chain/query.proto
modify proto/chain/tx.proto

@lumtis
Copy link
Contributor Author

lumtis commented Jun 16, 2021

Looking good! One small change, not sure about available colors, but if we can change red to orange, that'd be better. Red is for deletion. I think orange may work good both for light and dark backgrounds.

Orange may not be available on all terminals, what do you think of magenta?

Copy link
Contributor

@fadeev fadeev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magenta's good 🙂 Visible on both dark and light terminals.

Copy link
Member

@ilgooz ilgooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

}

// AppendModifiedFile appends modified files in the source modification that are not already documented
func (sm *SourceModification) AppendModifiedFiles(modifiedFiles ...string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (sm *SourceModification) AppendModifiedFiles(modifiedFiles ...string) {
func (sm *SourceModification) appendModifiedFiles(modifiedFiles ...string) {

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are actually part of the encapsulated interface, this also allows us to use a separate package for the tests

}

// AppendCreatedFiles appends a created files in the source modification that are not already documented
func (sm *SourceModification) AppendCreatedFiles(createdFiles ...string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (sm *SourceModification) AppendCreatedFiles(createdFiles ...string) {
func (sm *SourceModification) appendCreatedFiles(createdFiles ...string) {

?

@lumtis lumtis merged commit 5b70635 into develop Jun 17, 2021
@lumtis lumtis deleted the feat/source-modification branch June 17, 2021 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print paths of created and modified files when scaffolding

4 participants