Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Keeping language.settings.xml under source control?
Keeping language.settings.xml under source control? [message #1720759] Wed, 20 January 2016 16:59 Go to next message
Vladimir Grishchenko is currently offline Vladimir GrishchenkoFriend
Messages: 89
Registered: July 2009
Member
I'm trying to set up CDT to drive existing cross-compile builds with makefiles using the build output parser and the cross-gcc compiler built-in setting detector. I'm mostly successful but I'd like to keep .settings/language.settings.xml under source control so that anyone who checks out our project will get all provider settings automatically. One minor annoyance is that CDT keeps updating the env-hash attribute of each configuration's <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" element after the project is checked out into the local workspace resulting in a spurious local change to language.settings.xml that may be confusing to other developers and lead to unnecessary commits. Is it a bad idea to keep language.settings.xml under source control and if not is there anything that can be done to prevent updates to language.settings.xml unless project configuration has actually changed?

[Updated on: Wed, 20 January 2016 17:14]

Report message to a moderator

Re: Keeping language.settings.xml under source control? [message #1721186 is a reply to message #1720759] Mon, 25 January 2016 14:59 Go to previous messageGo to next message
Marc-André Laperle is currently offline Marc-André LaperleFriend
Messages: 220
Registered: July 2009
Senior Member
It sounds like env-hash should not be updated (or written at all) when "Store entries in project settings folder" is ticked. I assume that option exist so that projects can more easily be shared (i.e. in source control). Perhaps it would be a good idea to write a bug about that?
Re: Keeping language.settings.xml under source control? [message #1721635 is a reply to message #1721186] Thu, 28 January 2016 20:06 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
Marc-Andre Laperle wrote on Mon, 25 January 2016 14:59
It sounds like env-hash should not be updated (or written at all) when "Store entries in project settings folder" is ticked. I assume that option exist so that projects can more easily be shared (i.e. in source control). Perhaps it would be a good idea to write a bug about that?

The main purpose of env-hash is to figure out when you need to rerun scanner discovery. If "(gcc) environment" changes scanner discovery need to be run again. There are several factors that may affect resulting include paths and preprocessor macros and env-hash tries to take them into account. These factors surely will be different on different computers.
I might be wrong but I believe anything in .settings/ folder should be specific to the current project and is not intended to be shared between teams. I recall that .shared/ folder is intended for sharing between teams. That is not supported currently.

Andrew
Re: Keeping language.settings.xml under source control? [message #1721639 is a reply to message #1721635] Thu, 28 January 2016 20:49 Go to previous messageGo to next message
Vladimir Grishchenko is currently offline Vladimir GrishchenkoFriend
Messages: 89
Registered: July 2009
Member
The .settings folder is generally used to store project-specific settings (as opposed to workspace-wide settings). Often these settings need to be shared across team members for convenience , this is where source control comes handy. I believe the contents of the .settings folder is most definitely meant to be stored under source-control if necessary, after all .settings is not an ignored resource by default - Look under 'Ignored Resources' under Team preferences.

While not arguing the usefulness of tracking environment changes via env-hash, it seems like the calculated env-hash value should be stored somewhere else as it is local configuration specific, project persistent properties come to mind...
Re: Keeping language.settings.xml under source control? [message #1724841 is a reply to message #1721639] Fri, 26 February 2016 13:26 Go to previous messageGo to next message
Alexei Toumantsev is currently offline Alexei ToumantsevFriend
Messages: 2
Registered: February 2016
Location: Scotland
Junior Member
>It sounds like env-hash should not be updated (or written at all) when "Store entries in project settings folder" is ticked.

Has anyone tried this? Was that of any help?

I'm also annoyed with exactly same issue - spurious changes of
.settings\language.settings.xml file.
The project is on SVN, shared by many, we train people to take extra care during a commit and do their best to double check all changes they are committing.
Obviously, people waste their time analysing what's changed in the above-mentioned file, only to see a change of a couple of cryptic numbers.
Re: Keeping language.settings.xml under source control? [message #1725385 is a reply to message #1724841] Thu, 03 March 2016 08:08 Go to previous messageGo to next message
Alexei Toumantsev is currently offline Alexei ToumantsevFriend
Messages: 2
Registered: February 2016
Location: Scotland
Junior Member
Found another thread where the issue has been covered to a certain extent:

https://www.eclipse.org/forums/index.php?t=msg&th=703039&goto=1303960&#msg_1303960

Going to do some experiments with this, time permitting, but I wonder if someone can answer the following off the top of his head:

- what's going to happen if .settings\language.settings.xml is NOT on a version control system? When someone else grabs the project and tries to build - will it not build at all? or will it not even successfully import to Eclipse? or will the file be automagically created during import?

Ta.
Re: Keeping language.settings.xml under source control? [message #1772555 is a reply to message #1725385] Tue, 12 September 2017 11:17 Go to previous message
Gulam Helbig is currently offline Gulam HelbigFriend
Messages: 7
Registered: May 2016
Junior Member
Although the last post is a bit old I was just interested and have tested the last request.
I deleted the complete .settings folder and opened eclipse.

1. The folder .settings was created automatically with the same content and file content of previous.
2. Build the project and the hex files are also the same compared to each other.

So for me it is quit clear not to version this file in the cvs.

[Updated on: Tue, 12 September 2017 11:19]

Report message to a moderator

Previous Topic:Eclipse debugger expression window using matrixes
Next Topic:How to Activate a Plugin when leaving the "New Project" Wizard
Goto Forum:
  


Current Time: Mon Dec 11 04:00:09 GMT 2017

Powered by FUDForum. Page generated in 0.02081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software