-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow cargo.toml
#45
Comments
I'd say a standard is better than everyone doing as they want. |
Agreed. |
@tbu- normally, I'd agree with you, but we also have to consider case-insensitive filesystems. |
@steveklabnik Fair point. |
I have started looking into this. @steveklabnik Do we want to be case-insensitive for so we can support case-insensitive systems or do we simply want to allow Cargo.toml and cargo.toml ? |
I personally feel we should do what |
Capital letters group it together with other similar configuration files and avoids it from being interspersed with other files and directories. |
@wycats I know in Ruby I'm used to seing Gemfile, Rakefile and other files with a leading capital letter. There are many possible conventions. Another one is dot files with a prefixed dot followed by all lowercase letters. So I guess there's a lot of different styles. I would be partial to allowing cargo.toml but it wouldn't bother me either way as a Cargo user. Tell me guys if we should continue with this one or if we should close it and keep the current convention. If we go ahead I'll try and make a patch. |
You don't want a leading I'd rather stick with the current convention, for the reasons I described. We can revisit this if it causes real problems. |
What other configuration files? |
@bjz id imagine Rakefile, Makefile, Gemfile at least. Notice that none of these have file extensions, whereas Cargo.toml does. Id prefer Cargofile is more to 'convention' than @wycats's argument. Config files with file extensions such as 'setup.py', 'project.clj' and 'pom.xml' all start with lowercase. Cargo's approach seems to be actually _most_ against the current convention than anything I have seen so far. |
+1 for Cargofile or cargo.toml. Cargo.toml is a weird merging of two conventions. |
Another +1 for the proposed compromise — |
I agree with making it lower cased. In general, build system file names either match |
@wycats - How so? In my projects, I have
I agree. I would prefer
I'm sure there are more examples for both sides, but I don't think there's an argument for saying I haven't used a case-insensitive filesystem for years, so I'm a bit out-of-the-loop in terms of conventions there, so I could be missing something important. |
I don't care either way but this is only true with LC_COLLATE=C and not with en_US.UTF-8. |
Having a |
@wycats can you please comment on the discourse thread for this issue? there has been a lot of discussion in favor of |
I guess there isn't such a large discussion because this is mostly bikeshedding. (?) |
@tbu- it kind of is, but on the other hand Cargo seems to arbitrarily choose to eschew either of the standard naming conventions for this sort of file (either cargo.toml or Cargofile) as @beatgammit explains |
+1 for cargo.toml or Cargofile. I just started using Cargo and felt strange about the build filename |
@headcrab-in-my-room CMake. |
+1 for |
+1 for |
+1 for |
Cargo.toml is fine. So is cargo.toml. I definitely don’t like Cargofile. Don’t think it’s worth getting het up over though. |
Today I have asked myself: why cargo use a capital letter? I have looked for information about it and I have come to this place. Uppercase files smell like Windows files to me unless you use a programming style where all source files must start with uppercase like java, but rust is derived from c so it should be normal to find everything lowercase. It also bothers me a bit that the configuration format is so old, like the windows .ini files, if rust is a modern language, why didn't you use manifest or json structure files? Mozilla always tends to privilege technology towards windows and this ideology has been impregnated in rust lang, this is not fair because rust is multiplatform. |
It's the opposite, it's because
TOML was created in 2013, and this decision was made in 2014.
Mozilla had nothing to do with these choices, but the Rust project does care about Windows quite a bit, like all of our platforms. |
+1 for |
Today I searched "Why is Cargo.toml upper case." A strange thing to search, I admit, and I'm not sure if it's me being pedantic or nitpicky, or if it actually makes an aesthetic difference. Either way, considering Rust promotes snake_case conventions, I too find it odd that Cargo.toml has an uppercase. But today I also found out I can simply rename it to use a lower case and everything works. That makes me happy. Though for the sake of convention, I'm here to put my vote for |
+1 for |
+1 for |
While there may not be an exactly strong reason to allow this, I don't see much sense and a reason to specifically forbid this. A project may have a specific naming convention. I would leave the decision on projects. |
A Cargo project will compile without errors with Compilation on operating systems with a case-sensitive file system will result in Footnotes |
@FrantisekVojacek That's strange, because I've been doing this on macOS since my comment without any issue or error as such. |
@Mudbill Because macOS's filesystem is also case insensitive |
@AlexAegis Oh, wow. I was certain it wasn't, it being Unix based and all. I thought Windows was the only odd one here. My world is falling apart before my eyes 😅 |
+1 for |
I'll move from C to Rust if they can rename Cargo.toml to |
+1 for cargo.toml |
But, when there is no extension. |
Do we have more config file start with c? Because I think files are group first by letters, then by whether it is capital or not |
I’d prefer xml file or the current used syntax. Big dislike to json. |
Waiting for this issue to be re-opened... |
From http://www.reddit.com/r/rust/comments/28xyrc/cargo_alpha_is_here/cifnlkg
Would be nice to be consistent with
make
, and while I preferCargo.toml
, apparently a bunch of people feel the other way.The text was updated successfully, but these errors were encountered: