Skip to content
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

fix(services/scaffolder): add no-message parameter for checkComponentCreated method #1459

Merged
merged 5 commits into from Aug 18, 2021

Conversation

Pantani
Copy link
Collaborator

@Pantani Pantani commented Aug 13, 2021

closes #1379

What does this MR does?

scaffold map foo fails when CreateFoo message exists, this PR add noMessage condition to avoid false check

How to test?

  • Create a list
$ starport scaffold chain github.com/cosmonaut/scavenge --no-module
$ cd scavenge
$ starport scaffold module scavenge --dep bank
$ starport scaffold message create-scavenge solutionHash description reward

# Try to scaffold a type with a message, it must fail
$ starport scaffold map scavenge solutionHash solution description reward scavenger

# Try to scaffold a type without a message, it must succeed
$ starport scaffold map scavenge solutionHash solution description reward scavenger --no-message

@Pantani Pantani self-assigned this Aug 13, 2021
@Pantani Pantani requested a review from lumtis as a code owner August 13, 2021 00:06
@Pantani
Copy link
Collaborator Author

Pantani commented Aug 13, 2021

This PR solves the issue, but I think we should refactor the check method. We are doing an unnecessary check for some scaffold types

Copy link
Contributor

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

I think this is a good workaround for the specific issue of the tutorial

In the future we would actually need to refactor checkComponentCreated by fetching the type names for the specific component to scaffold and check if one of them exist in the package

@ilgooz ilgooz merged commit a584599 into develop Aug 18, 2021
@ilgooz ilgooz deleted the fix/map-n-message-conflitcts branch August 18, 2021 08:07
@lumtis lumtis mentioned this pull request Aug 18, 2021
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>
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.

scaffold map foo fails when CreateFoo message exists
3 participants