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

Have forc init fail when the project name is test #1126

Closed
mohammadfawaz opened this issue Apr 1, 2022 · 5 comments · Fixed by #1144
Closed

Have forc init fail when the project name is test #1126

mohammadfawaz opened this issue Apr 1, 2022 · 5 comments · Fixed by #1144
Assignees
Labels
forc good first issue Good for newcomers

Comments

@mohammadfawaz
Copy link
Contributor

When creating a new project called test with forc init test, forc doesn't complain. However, it complains when we try to build the project with:

Error: the name `test` cannot be used as a package name, it conflicts with Sway's built-in test library

I think forc init test should just error out.

@mohammadfawaz mohammadfawaz added good first issue Good for newcomers forc labels Apr 1, 2022
@adlerjohn adlerjohn moved this to Todo in Fuel Network Apr 1, 2022
@eureka-cpu
Copy link
Contributor

Do we want this to extend to containing test or only if it's exactly test?

@mohammadfawaz
Copy link
Contributor Author

Hmm whatever matches the behavior of forc build. Anything that forc build does not allow should not be allowed by forc init.

@eureka-cpu
Copy link
Contributor

Gotcha, should we make this check for case sensitivity as well?

@mohammadfawaz
Copy link
Contributor Author

Depends on whether something like Test is allowed or not. Can we build a project whose name is Test?

@eureka-cpu
Copy link
Contributor

At this time, yes you can since it's only checking for "test"

Repository owner moved this from Todo to Done in Fuel Network Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forc good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants