Why won't `pkg> generate` allow a ".jl" suffix in the name?

hi there,

after some time away from Julia, i’m trying to create a new package, and seem to recall that standard convention is to put a “.jl” suffix on the repo name, i.e. on the root project directory.

i thought i would use the generate command in Pkg, but it tells me the name is not valid. e.g.,

(@v1.5) pkg> generate OkWow.jl
ERROR: "OkWow.jl" is not a valid package name

i noticed that when i drop the “.jl”, the command succeeds – but creates a project root without the “.jl”.

so my questions are:

  1. has the naming convention changed since the last time i looked at Julia ( about a year ago )?
  2. if not, why won’t generate accept the “.jl” suffix?

thanks in advance,

\0

2 Likes

No, a .jl suffix is used for the repo name on github, but not usually in the local project directory (e.g. if you do pkg> dev SomeProject you get a SomeProject directory).

2 Likes

thanks! that makes sense

of course, there’s not reason i couldn’t rename the directory if i want to push it to github

follow-up question though, which is maybe closer to the spirit of what i’m asking: is there some reason i wouldn’t want to have a “.jl” on the local project directory?

No need for any renaming: The repo name on github doesn’t need to match the local directory name.

If you want to load your package in a running julia process, the package manager does not expect a .jl on the local directory.