cake icon indicating copy to clipboard operation
cake copied to clipboard

Look for cake.ini instead of cake.config

Open ravindUwU opened this issue 6 years ago • 15 comments

The current format for the Cake configuration file cake.config is that of the INI file format. Its .config extension makes many text editors syntax highlight it wrong, or report errors, or as Visual Studio does, both,

cake.config

cake.ini

I propose to either,

  • Change the name of the configuration file that Cake looks for, from cake.config to cake.ini, or (as this would require projects with unpinned versions of Cake to rename their files after updating / bootstrapping),

  • Make Cake look for both cake.config and cake.ini files, with preference being for the latter, and a warning being emitted if it detects the former.

ravindUwU avatar Nov 04 '17 13:11 ravindUwU

@RavinduL can you please confirm which editor you use to edit this file, typically?

gep13 avatar Nov 06 '17 10:11 gep13

@RavinduL also, can you confirm if you are using the Cake extension for that editor?

gep13 avatar Nov 06 '17 10:11 gep13

@gep13 I usually use Visual Studio, with the Cake for Visual Studio extension, or Visual Studio Code with the Cake extension.

The screenshots attached with https://github.com/cake-build/cake/issues/1911#issue-271191667 are of Visual Studio.

ravindUwU avatar Nov 06 '17 13:11 ravindUwU

@RavinduL okay, perfect, thank you for letting me know.

gep13 avatar Nov 06 '17 13:11 gep13

@RavinduL we added ini support for the cake.config file in the recent release of the VSCode Extension for Cake. You can see this in action here:

https://youtu.be/ZgLWyIxFl8U

gep13 avatar Nov 08 '17 14:11 gep13

@gep13 syntax highlighting for Cake.config in VS Code! Nice 👍. Is a similar feature planned to be shipped with Cake for VS?

ravindUwU avatar Nov 09 '17 04:11 ravindUwU

@RavinduL yes, that is the plan. Not sure when that will happen though.

gep13 avatar Nov 09 '17 05:11 gep13

@gep13 have you considered the second proposal at https://github.com/cake-build/cake/issues/1911#issue-271191667 wherein Cake could prefer a cake.ini file, but support both?

Doing so wouldn't require you to change the Visual Studio plugin, or develop plugins for any text editor, for this purpose.

ravindUwU avatar Nov 09 '17 05:11 ravindUwU

@RavinduL we have spoken about it, yes. However, this is more work than it sounds. For example that cake.config file is read by Cake, Cake.Bakery, within the Cake Extension for Visual Studio, etc. So changing it to be called cake.ini means updates to all of those other components. Not saying that might not do that work, but for now, it is easier to add this type of support to the editors we support rather than what you have suggested.

gep13 avatar Nov 09 '17 05:11 gep13

@RavinduL why did you close this issue?

As I said, I didn't say that we wouldn't do this, but rather, for now, it is more work than we want to take on immediately. The interim solution is to provide support for ini content in the supported editors.

gep13 avatar Nov 09 '17 07:11 gep13

@gep13 I see.
I apologize -- I misunderstood your intentions.

ravindUwU avatar Nov 09 '17 08:11 ravindUwU

@RavinduL not a problem, just wanted to check 👍

gep13 avatar Nov 09 '17 08:11 gep13

Usually having two ways of doing the same thing comes at a cost. I'd be against it.

jnm2 avatar Nov 09 '17 13:11 jnm2

I have same problem. But I use "Resharper" and It arises more problems with that file. imagen

ramoneeza avatar May 11 '18 05:05 ramoneeza

@ramoneeza I don't know what the error is since I don't speal Spanish, but you can exclude that file in Resharper's settings.

patriksvensson avatar May 11 '18 06:05 patriksvensson