Follow-on to https://github.com/chapel-lang/chapel/issues/7961:
This feature request is to support mason new --moduleName to differentiate the directory name and the module name. For example:
mason new illegal-module-name --moduleName LegalModuleName
This could also be supported in mason init when that is supported (https://github.com/chapel-lang/chapel/pull/14820). This should generate an error if running mason init in project with an existing brick name.
I see the tasks for this issue as:
鈥攎oduleName flag to mason new (and mason init when that is merged)mason new <name> to suggest using 鈥攎oduleNameWe may consider alternatives to --moduleName, such as--name, --brickName, --projectName, ...
@ben-albrecht I think we should stick to --moduleName as its purpose is to simply change the module name of the library project. I'm working on it 馃憤
Also , shouldn't there be an '=' in the command as in --moduleName=LegalModuleName ?
I think it should support both. I checked and mason build --example, and think that should be extended as well to support both styles as well:
# This works:
mason build --example foo
# This is an error:
mason build --example=foo
-- moduleName=LegalModuleName
I don't think we should support a space between -- and the flag name (assuming that space was intentional in your example).
I don't think we should support a space between -- and the flag name (assuming that space was intentional in your example).
@ben-albrecht oops, that was unintentional, what I meant to ask is that should we support both
--moduleName=foo and --moduleName foo or either of them ?
yes, both. I have opened https://github.com/chapel-lang/chapel/issues/14989 to document the broader inconsistencies in mason.
I am requesting input from other Chapel developers on naming this flag, which lets the user specify a mason package name that differs from the directory name in mason new (and mason init)
Options include:
mason new foo-bar --moduleName=FooBarmason new foo-bar --name=FooBarmason new foo-bar --projectName=FooBarFor reference, the current mason new options are:
Usage:
mason new [options] <project name>
Options:
-h, --help Display this message
--show Increase verbosity
--no-vcs Do not initialize a git repository
:+1: to vote for --moduleName
:+1: to vote for --name
:+1: to vote for --projectName
I don't have a strong opinion, but other options like --brickName or --packageName could be considered more specific depending on how you define brick and/or package in the future.
@ben-albrecht I think we should proceed with --name since it got max votes 馃憤
@ben-albrecht I think we should proceed with --name since it got max votes 馃憤
@ankingcodes Sounds good!
Most helpful comment
:+1: to vote for
--name