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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcreate: don't use template names as project descriptions #19439

Merged

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Sep 25, 2023

This removes usage of the second template arg as description. So when a template is used for creating a project, the description in the v.mod would not be set silently.

E.g. the description when using v new my_web_project web would not become web as in the example below:

Module {
	name: 'my_web_project'
	description: 'web'
	version: '0.0.0'
	license: 'MIT'
	dependencies: []
}

Instead, the description prompt Input your project description: would appear also when using a template.

馃 Generated by Copilot at 558616d

Refactor vcreate tool to use cli module and simplify description input. The change always asks the user for a project description instead of relying on a second argument.

馃 Generated by Copilot at 558616d

  • Refactor the vcreate tool to use the new cli module (link, F0L112

@ttytm ttytm changed the title vweb: don't use template names as project descriptions vcreate: don't use template names as project descriptions Sep 25, 2023
@ArtemkaKun
Copy link
Contributor

ArtemkaKun commented Sep 25, 2023

I'm wondering if this is possible to implement a test for that 馃

@spytheman
Copy link
Member

spytheman commented Sep 26, 2023

On macos and linux, yes, through expect scripts. See:
https://github.com/vlang/v/blob/master/examples/password/password_ci.vsh
https://github.com/vlang/v/blob/master/examples/password/correct.expect
https://github.com/vlang/v/blob/master/examples/password/incorrect.expect

On other platforms, that would not be very easy, unless we also have a good programmable terminal emulator (which expect is), and we currently do not.

@ttytm

This comment was marked as outdated.

@ttytm
Copy link
Member Author

ttytm commented Oct 9, 2023

I'm wondering if this is possible to implement a test for that 馃

馃檪 馃憤

@ttytm ttytm force-pushed the vcreate/dont-use-tmpl-name-as-description branch from 3295821 to 613c7fe Compare October 9, 2023 22:33
@ttytm ttytm requested a review from spytheman October 12, 2023 03:49
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Good work.

@spytheman spytheman merged commit 06fb8f0 into vlang:master Oct 12, 2023
30 checks passed
@ttytm ttytm deleted the vcreate/dont-use-tmpl-name-as-description branch November 1, 2023 19:50
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.

None yet

3 participants