0 Favourites

Project file gets written after event sheet change

  • Link to .capx file (required! If link is blocked remove the http and www parts):

    dl.dropboxusercontent.com/u/92823662/IDEBug.zip

    Steps to reproduce:

    1. Unzip the attached file to a folder - this is a multi-file project.

    2. Open project in C2.

    3. Open "Event sheet 1".

    4. Right-click the "System -> Every tick" event and add a comment.

    5. Save the project.

    Observed result:

    Notice that the "New project.caproj" file has changed. The <font face="Courier New, Courier, mono"><used-plugins></font> and <font face="Courier New, Courier, mono"><used-behaviors></font> elements are randomly reordered. This results in a project file that constantly changes which defeats the purpose of source control.

    Expected result:

    The project file should only be updated when a project-related setting changes. When the only change is to an event sheet the project file should not be updated.

    Browsers affected:

        Not applicable - IDE bug

    Operating system & service pack:

        Windows 8.1

    Construct 2 version:

        158.2 (x64)

  • Note, that this is made worse when the .caproj file is read-only (under source control). C2 fails to save the file and no other changes are saved until the read-only flag is cleared from the .caproj file.

    C2 should honor read-only flags until a change has to be saved into the read-only file. As it is, it's near impossible to use C2 in a team environment because the project file keeps getting changed all the time and C2 tries to write the file for most (even trivial) changes.

  • I've updated the tags to have stable ordering in the next build (alphabetical by ID). I don't know why you would mark any of the files read-only though - if Construct 2 needs to change the file but it can't write to it, it can't then change other files otherwise it might corrupt the project. Hopefully this change is enough to avoid having to have any project files read-only. Let me know if there are any other changes you need to avoid unnecessary diffs in source control.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Ashley, thanks for your quick reply - that change will definitely be a step in the right direction. It's hard to say if it's enough to prevent issues with source control but I'll give it a try when it's out. Currently we keep the project file locked (read-only) because of the overwhelming number of changes to it when anything changes. I'd like to avoid spamming source control with unnecessary changes so I usually revert the file every time but that gets old quickly.

    I'd recommend refactoring some of the stuff out of it to other .xml files - I think that'd make using C2 for teams a lot easier. For example, if I have folders under "Object Types" and I open / close a folder, the project file gets updated when this is a UI state and really belongs to the uistate.xml file. This is true for the "Preview browser" setting under "Game Properties".

    These two latter issues are a lot easier to live with, though - thanks for the fix again.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic Locked topic
195 16,205
Ashley's avatar
Ashley Construct Team Founder
Unread hot topic
144 24,225
ffman22's avatar
ffman22
Unread hot topic Locked topic
112 7,124
Ashley's avatar
Ashley Construct Team Founder