# Can we rename Cargo.toml?

**URL:** <https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380>\
**Category:** cargo\
**Created:** [August 13, 2014, 9:57pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380 "2014-08-13T21:57:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sinistersnare](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/sinistersnare/32/18_2.png) [@sinistersnare](https://internals.rust-lang.org/u/sinistersnare)\
**Post date:** [August 13, 2014, 9:57pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/1 "2014-08-13T21:57:56Z")

</div>

Hello, there has been a lot of discussion on the [Cargo issue tracker](https://github.com/rust-lang/cargo/issues/45) about changing `Cargo.toml` to a more reasonable and precendent conforming name.

Possible solutions:

- `Cargofile`, also accepting `cargofile` (precedence from `Makefile` allowing `makefile` also)
- `cargo.toml`, precendece with `setup.py` and `pom.xml`

I think the only precedent I could find with `Capital.ext` is `Setup.hs` with Cabal in Haskell, but I have never used it, so I am not sure if this is true.

The original discussion on the issue tracker was almost unilaterally closed by wycats, and I would like to have an actual discussion, because most people on the tracker did not agree with the current convention.

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steveklabnik/32/4524_2.png) [@steveklabnik](https://internals.rust-lang.org/u/steveklabnik)\
**Post date:** [August 13, 2014, 10:26pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/2 "2014-08-13T22:26:07Z")

</div>

Other uses of capitals and `File`:

Berksfile Blakefile Cakefile Capfile Caskfile Cheffile Dockerfile Doxyfile Filefile Gemfile Gruntfile Guardfile Huxleyfile Jakefile Knylefile Makefile Modulefile Podfile Portfile Procfile Puppetfile Rakefile Sitefile Tenderfile Vagrantfile

That said, \*file is terrible, it should have a real extension. I can’t find that blog post right now…

---

<div class="post-metadata">

**Author:** ![sinistersnare](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/sinistersnare/32/18_2.png) [@sinistersnare](https://internals.rust-lang.org/u/sinistersnare)\
**Post date:** [August 14, 2014, 2:24am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/3 "2014-08-14T02:24:18Z")

</div>

Ok i agree, lets use an extension, which still leaves `cargo.toml` 🙂

---

<div class="post-metadata">

**Author:** ![Ericson2314](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ericson2314/32/246_2.png) [@Ericson2314](https://internals.rust-lang.org/u/Ericson2314)\
**Post date:** [August 14, 2014, 2:35am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/4 "2014-08-14T02:35:58Z")

</div>

The more apt analog with Haskell is .cabal, which is not capital. The `Setup.hs` script is capital presumably because the convention for Haskell is to have capital module names and thus capital file names.

---

<div class="post-metadata">

**Author:** ![ecl3ctic](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ecl3ctic/32/54_2.png) [@ecl3ctic](https://internals.rust-lang.org/u/ecl3ctic)\
**Post date:** [August 14, 2014, 6:17am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/5 "2014-08-14T06:17:09Z")

</div>

I’d prefer it to be lowercase to match existing conventions, for configuration files and Unix in general.

---

<div class="post-metadata">

**Author:** ![DanielFath](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/danielfath/32/5372_2.png) [@DanielFath](https://internals.rust-lang.org/u/DanielFath)\
**Post date:** [August 14, 2014, 6:53pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/6 "2014-08-14T18:53:20Z")

</div>

The problem is that Windows filesystem isn’t case sensitive. On Windows you could theoretically make `cargo.toml` and it could work on Windows, but fail on Linux. I think case insensitive `cargo.toml` would be best, with `cargo.toml` being the preferred form.

---

<div class="post-metadata">

**Author:** ![killerswan](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/killerswan/32/153_2.png) [@killerswan](https://internals.rust-lang.org/u/killerswan)\
**Post date:** [August 14, 2014, 11:55pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/7 "2014-08-14T23:55:03Z")

</div>

Another alternative is `.cargo.toml`, so it would get hidden nicely sometimes.

---

<div class="post-metadata">

**Author:** ![tbu](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tbu](https://internals.rust-lang.org/u/tbu)\
**Post date:** [August 15, 2014, 10:37am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/8 "2014-08-15T10:37:59Z")

</div>

That’s problematic for Windows users, it’s non-trivial to create a file with a leading dot if I remember correctly.

---

<div class="post-metadata">

**Author:** ![arcto](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/arcto/32/45_2.png) [@arcto](https://internals.rust-lang.org/u/arcto)\
**Post date:** [August 16, 2014, 7:34am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/9 "2014-08-16T07:34:46Z")

</div>

It’s intended to be edited manually, no? Then I don’t think it should be invisible.

---

<div class="post-metadata">

**Author:** ![tbu](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tbu](https://internals.rust-lang.org/u/tbu)\
**Post date:** [August 17, 2014, 6:22pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/10 "2014-08-17T18:22:22Z")

</div>

`.gitignore` is invisible as well.

---

<div class="post-metadata">

**Author:** ![DanielFath](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/danielfath/32/5372_2.png) [@DanielFath](https://internals.rust-lang.org/u/DanielFath)\
**Post date:** [August 17, 2014, 6:31pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/11 "2014-08-17T18:31:43Z")

</div>

> [@tbu](#):
>
> .gitignore is invisible as well.

And a pain in the butt to edit on Windows.

---

<div class="post-metadata">

**Author:** ![arcto](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/arcto/32/45_2.png) [@arcto](https://internals.rust-lang.org/u/arcto)\
**Post date:** [August 17, 2014, 6:35pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/12 "2014-08-17T18:35:32Z")

</div>

You’re right. Invisibility shouldn’t be a problem by itself. Please disregard that objection.

---

<div class="post-metadata">

**Author:** ![tbu](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tbu](https://internals.rust-lang.org/u/tbu)\
**Post date:** [August 17, 2014, 9:27pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/13 "2014-08-17T21:27:00Z")

</div>

I was just responding to the invisibility (dot at the beginning) thing.

---

<div class="post-metadata">

**Author:** ![DanielFath](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/danielfath/32/5372_2.png) [@DanielFath](https://internals.rust-lang.org/u/DanielFath)\
**Post date:** [August 17, 2014, 11:07pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/14 "2014-08-17T23:07:17Z")

</div>

I didn’t consider it to be offensive. I was just remarking that I remember editing it on Windows. It’s not a happy experience (hence the comment). Searching for a tool that can make and/or change git settings was… Uegh.

---

<div class="post-metadata">

**Author:** ![sinistersnare](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/sinistersnare/32/18_2.png) [@sinistersnare](https://internals.rust-lang.org/u/sinistersnare)\
**Post date:** [August 18, 2014, 5:37am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/15 "2014-08-18T05:37:23Z")

</div>

Can we agree on cargo.toml too then? invisibility is _not_ what we want, and it follows conventions set by everyone else using the `name.extension` pattern.

Can someone tell wycats to comment on this?

---

<div class="post-metadata">

**Author:** ![crazymykl](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/crazymykl/32/199_2.png) [@crazymykl](https://internals.rust-lang.org/u/crazymykl)\
**Post date:** [August 18, 2014, 2:39pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/16 "2014-08-18T14:39:28Z")

</div>

For build systems, I still think `Foofile` is more common than `foofile.foo`, and I think its valuable to keep configuration for tooling seperate from configuration for the app itself (which is what I view the `config` dierctory as for).

---

<div class="post-metadata">

**Author:** ![ruuda](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ruuda/32/1870_2.png) [@ruuda](https://internals.rust-lang.org/u/ruuda)\
**Post date:** [August 29, 2014, 7:34pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/17 "2014-08-29T19:34:22Z")

</div>

I’ve never really had problems with dotfiles on Windows. The only pain is that explorer does not allow you to name files starting with a dot, but it is fine from the command line. Microsoft’s own Team Foundation now even uses a `.tfignore` file, like `.gitignore`.

On topic: I’d prefer if lower case names were allowed in addition to capitalised.

---

<div class="post-metadata">

**Author:** ![ecl3ctic](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ecl3ctic/32/54_2.png) [@ecl3ctic](https://internals.rust-lang.org/u/ecl3ctic)\
**Post date:** [August 29, 2014, 11:43pm UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/18 "2014-08-29T23:43:14Z")

</div>

FWIW I retract my original statement of support for a name change. It doesn’t really matter what the file is called. It’s really not going to cause any problems for anyone, any time, and there’s absolutely no benefit to trying to align it more closely with existing conventions.

Unless anyone can make an argument for how this will actually accomplish _anything_, I think we should probably just leave it.

---

<div class="post-metadata">

**Author:** ![asb](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/asb/32/4506_2.png) [@asb](https://internals.rust-lang.org/u/asb)\
**Post date:** [August 30, 2014, 9:38am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/19 "2014-08-30T09:38:57Z")

</div>

The reasoning is familiarity. There is a common convention for how these files are named (even better, two of them!), and Cargo chooses to follow neither making it much more likely people will get it wrong. It’s a minor issue, but it’s also pointless friction that could trivially be removed.

---

<div class="post-metadata">

**Author:** ![ecl3ctic](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ecl3ctic/32/54_2.png) [@ecl3ctic](https://internals.rust-lang.org/u/ecl3ctic)\
**Post date:** [August 30, 2014, 11:12am UTC](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380/20 "2014-08-30T11:12:46Z")

</div>

I don’t think that will ever be a real problem for anyone. People only have to manually edit the file once in a blue moon, and if they’re using a file browser, there’s no problem. If they’re using a terminal, they probably would `ls` anyway.

[Next page](https://internals.rust-lang.org/t/can-we-rename-cargo-toml/380.md?page=2)
