# why is \`project\_names\` constant lowercase?

**URL:** https://discourse.julialang.org/t/why-is-project-names-constant-lowercase/18297
**Category:** New to Julia
**Created:** [December 5, 2018, 1:22am UTC](https://discourse.julialang.org/t/why-is-project-names-constant-lowercase/18297 "2018-12-05T01:22:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![epogrebnyak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/epogrebnyak/32/6287_2.png) [@epogrebnyak](https://discourse.julialang.org/u/epogrebnyak)
#### Post date: [December 5, 2018, 1:22am UTC](https://discourse.julialang.org/t/why-is-project-names-constant-lowercase/18297/1 "2018-12-05T01:22:07Z")

</div>

Global constants are usually named in uppercase in Julia, right?

[https://github.com/JuliaLang/julia/blob/ef496b060af9bbfe093297b8659dc75b79d30c94/base/loading.jl#L269-L270](https://github.com/JuliaLang/julia/blob/ef496b060af9bbfe093297b8659dc75b79d30c94/base/loading.jl#L269-L270) has two definitons

```julia
const project_names = ("JuliaProject.toml", "Project.toml")
const manifest_names = ("JuliaManifest.toml", "Manifest.toml")

```

later they surface like black magic in `current_project(dir)` from [https://github.com/JuliaLang/julia/blob/d789231e9985537686052db9b2314c0d51656308/base/initdefs.jl#L85-L98](https://github.com/JuliaLang/julia/blob/d789231e9985537686052db9b2314c0d51656308/base/initdefs.jl#L85-L98)

```julia
function current_project(dir::AbstractString)
    # look for project file in current dir and parents
    home = homedir()
    while true
        for proj in project_names
            file = joinpath(dir, proj)
            isfile_casesensitive(file) && return file
        end
        # bail at home directory
        dir == home && break
        old, dir = dir, dirname(dir)
        dir == old && break
    end
end

```

Is this intentional? Why not fix this?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [December 5, 2018, 2:05am UTC](https://discourse.julialang.org/t/why-is-project-names-constant-lowercase/18297/2 "2018-12-05T02:05:46Z")

</div>

> [@epogrebnyak](#):
>
> Why not fix this?

Yeah, why not?

As a note, they are currently used in e.g. the package manager: [https://github.com/JuliaLang/Pkg.jl/search?q=project\_names&unscoped\_q=project\_names](https://github.com/JuliaLang/Pkg.jl/search?q=project_names&unscoped_q=project_names).

---

<div class="post-metadata">

### Author: ![epogrebnyak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/epogrebnyak/32/6287_2.png) [@epogrebnyak](https://discourse.julialang.org/u/epogrebnyak)
#### Post date: [December 5, 2018, 4:40am UTC](https://discourse.julialang.org/t/why-is-project-names-constant-lowercase/18297/3 "2018-12-05T04:40:17Z")

</div>

> [@epogrebnyak](#):
>
> “JuliaProject.toml”, “Project.toml”

```julia
Maybe could use a helper function to start with:

"""Return <path>/"JuliaProject.toml" or <path>/"Project.toml"
   if <path> is a directory with project file.
"""
function find_project(path::AbstractString)::Union{String, Nothing}
  for proj in project_names
    file = abspath(path, proj)
    isfile_casesensitive(file) &amp;&amp; return file
  end
end

function has_project(path::AbstractString)::Bool
  return !isnothing(find_project(path))
end
```
