Project file gets written after event sheet change

Bugs will be moved here once resolved.

Post » Tue Feb 11, 2014 4:52 am

Link to .capx file (required! If link is blocked remove the http and www parts):
https://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 <used-plugins> and <used-behaviors> 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)
B
7
S
3
Posts: 9
Reputation: 653

Post » Tue Feb 11, 2014 5:09 am

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.
B
7
S
3
Posts: 9
Reputation: 653

Post » Tue Feb 11, 2014 12:37 pm

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.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Tue Feb 11, 2014 2:35 pm

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.
B
7
S
3
Posts: 9
Reputation: 653


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest