Closed hanwencheng closed 5 years ago
The substrate-node-new
is rather dumb. You can not use -
in any name in rust. By giving it the name substrate-node-template
, the compilation fails. You could use substrate-node-template
and it will compile.
CC @shawntabrizi maybe something you want to solve in the script ;)
@bkchr I am missing something here. substrate-node-new substrate-node-template <author-name>
should work fine? Is there some other Unicode character which looks like a dash?
I found the bug, a recent change of substrate-node-new
added this line, but it should be replace node_template "${lname//[- ]/_}"
. I will open a pr.
Okay, there as already one by @xlc: https://github.com/paritytech/substrate-up/pull/21 @hanwencheng fix is merged and it should work now :)
I have not tested the latest script yet, but it appears to me it will cause some issues with common uses of renaming.
For example, we tell people to rename their project substrate-node-template
in some tutorials.
Then the script will look for node-template
and replace that too.
So I expect to get substrate-substrate-node-template
in places... will test now @xlc @bkchr
Can we update substrate so all strings that need to be changed are template-node
?
Indeed this happens. We need to reorder the rename commands, or better yet, come up with a more consistent plan here.
Hi,
I just installed Substrate with the command,
$ curl https://getsubstrate.io -sSf | bash -s
,encountered and solved a previous issue which is https://github.com/paritytech/scripts/issues/67
After that, I try to build the node template with
substrate-node-new substrate-node-template <author-name>
now another compiling error happens, I have checked a same issue on Rustlang, it seems related to the code in the rust script, but I am not sure how to solve it.
Here is the complete log:
I use Mojave 10.14.4 and I just check Rust version is 1.33.0