Closed lubkoll closed 2 years ago
In this case, before the import works, you have to copy the file manually and change the package, as explained here https://tutorials.cosmos.network/academy/3-my-own-chain/stored-game.html#defining-the-rule-set.
In this case, before the import works, you have to copy the file manually and change the package, as explained here https://tutorials.cosmos.network/academy/3-my-own-chain/stored-game.html#defining-the-rule-set.
The described package-change does not fix the issue. Following exactly the steps as described in the tutorial, does require the above mentioned change.
Do you have your checkers on a public repo?
No, I followed the instructions to checkout the checkers template, but didn't fork it. I can do that if it helps.
Yes, you can push it somewhere temporary.
that helps because it is an implicit requirement or because you can take a look at it?
I would like to have a look at what you have that is causing your issue.
here it is: https://github.com/lubkoll/checkers
Mmh, you are on an old version of the project.
The code of the v1 project calls itself module github.com/b9lab/checkers
. So any import for github.com/b9lab/checkers
would resolve to itself AFAIK. We choose this to give ourselves the opportunity to eventually host the project there elegantly.
The tutorial on the other hand should mention github.com/alice/checkers
so as to be more neutral. Perhaps the emphasis is not made strongly enough that whenever you see github.com/alice/checkers
you have to replace it with the name you chose at the beginning.
As for xavierlepretre
, that was an even earlier version. Not sure where you found that...
I guess, then it is time to update the tutorial (if you are busy, I currently have some time available that I could allocate on that).
I found the code through this: https://tutorials.cosmos.network/academy
Regarding xavierlepretre
, that is part of the linked source code in the tutorial, i.e. in sec "Store Object - Make a Checkers Blockchain" the code samples of full_game.go
come with links to files in this repo.
Ah right, the links were with commit hashes, so unless we updated the link too, the change in the branch was not reflected.
Good news, the new version is ready to go online next week: https://github.com/cosmos/sdk-tutorials/pull/1169 and https://github.com/cosmos/sdk-tutorials/pull/1189 The code is already here in all the branches.
Nice, thanks for the feedback and patience. Will check the new versions (probably that also solves the other issues I found and didn't report yet:)
In full_game.go the rules are imported from
"github.com/xavierlepretre/checkers/x/checkers/rules"
, which either does not exist or is in a private repo. To my understanding this should actually be"github.com/alice/checkers/x/checkers/rules"
.