Closed jhidding closed 2 months ago
I could not reproduce, did you run BestieTemplate.generate("ModuleMixins.jl")
?
In theory this shouldn't happen via the Julia interface because we run _sanitize_package_name
on the path unless PackageName
is manually set. You should see
[ Info: Using sanitized path ModuleMixins as package name
in the first line of log.
No, I had the path already there, so I ran BestieTemplate.generate(".")
I can reproduce it, although it's not a bug.
The .
is processed correctly as a lack of name, so the it moves on to the Copier side without a question. Then you get asked by Copier for the name, so it's out of ours hands.
There are a few ways to deal with this, though:
.
means that the package name is the name of the folder. I don't like it because it's not my business what happens in ..
..
is a mistake, and disallow it. I don't like it because it might be the case that people know what they're doing..
in the name.If you agree with the assessment, I will look into 3.
Though a bit pedantic, I agree with the assessment. I think Copier lets you (at least) validate (https://copier.readthedocs.io/en/stable/configuring/#advanced-prompt-formatting) answers. Disallowing .
in the name is the more fundamental approach.
Thanks, it's done in #377 now.
@allcontributors please add @jhidding for bug
@abelsiqueira
I've put up a pull request to add @jhidding! :tada:
Description
When asked for the package name, a not too careful reader may enter a package name with
.jl
included, resulting in a doubleMyPackage.jl.jl
. This could be easily caught.Package Version
v0.9.0
Julia Version
1.10
Reproduction steps
run
BestieTemplate.generate
enter a package name with.jl
Relevant log output
Operating System
Linux