Bug 269 - User formatting settings should not be applied to autogenerated designer files
Summary: User formatting settings should not be applied to autogenerated designer files
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
: 268 ()
Depends on:
Reported: 2011-08-11 14:19 UTC by Alan McGovern
Modified: 2011-08-12 06:35 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alan McGovern 2011-08-11 14:19:45 UTC
There should be a standard style which is applied to all autogenerated files regardless of user settings.

My user formatting settings for C# files differ from the style used to generate all the gtk designer files in the monodevelop codebase so MD decided to rewrite approximately 280 files where the only difference is that the style of the generated code changed to match my settings.
Comment 1 Sebastien Pouliot 2011-08-11 16:52:34 UTC
*** Bug 268 has been marked as a duplicate of this bug. ***
Comment 2 Mike Krüger 2011-08-12 00:16:53 UTC
No they should be applied to all autogenerated files.

The gtk designer files should not be regenerated on each compile - that is the bug. 

Are you really working with stetic turned on ?
Try to turn in off and only turn it on when you are designing gtk code. The IDE will compile 1000x times faster :)

btw. we've a gsoc stetic project that's updating it.
Comment 3 Lluis Sanchez 2011-08-12 04:10:14 UTC
There is no need to use the user settings in generated code that users never have to see or modify, and it is annoying to get unwanted change sets. Stetic used to use an "Invariant" formatting policy just to avoid this problem. If this has changed, please make it use Invariant again. Maybe the new designer is less problematic about this, but I don't know when we'll be able to replace the current one.
Comment 4 Alan McGovern 2011-08-12 04:28:39 UTC
Yesterday when I went to commit changes to about 7 files I found out that MonoDevelop had modified approximately 280 autogenerated GTK files. This is a severe usability bug in my eyes as I spent a good 10 minutes very carefully selecting files I never knew existed and reverting changes I did not cause. This had to be done so I could make sure I committed all my actually changes correctly.

Are you *absolutely sure* this is the desired behaviour of MonoDevelop? I think this is an awful experience and for now this makes it impossible for me to actually compile MonoDevelop from within MonoDevelop. If disabling stetic is truly the recommended approach, can we ship MonoDevelop with stetic disabled by default to avoid this issue? If that's not an acceptable approach, then maybe we need an alternative way to prevent this from happening ;)
Comment 5 Mikayla Hutchinson [MSFT] 2011-08-12 04:44:29 UTC
Yeah, I'm seeing this problem again on Windows. I thought we fixed the invariant formatter a while back. Maybe it broke again?
Comment 6 Mikayla Hutchinson [MSFT] 2011-08-12 04:45:33 UTC
Though, to clarify for Alan, there is no such things as "user formatting settings". Settings are stored in the solution, so all users get the same settings.
Comment 7 Mike Krüger 2011-08-12 06:02:28 UTC
The bug is: The IDE settings change the invariant formatting policy ...
Comment 8 Mike Krüger 2011-08-12 06:35:39 UTC
fixed that one - the invariant policy didn't have a c# formatting policy, therefore the default policy was taken.