bdkjones / CodeKit2

CodeKit 2 Beta
98 stars 4 forks source link

BUG: Same version of CodeKit makes different config.codekits on different machines #587

Closed calvinjuarez closed 7 years ago

calvinjuarez commented 8 years ago

For some reason, different machines generate different config.codekit files. Specifically, there are different JSHint (& JSLint?) flags in each. Below is a screenshot showing some of the differences between one machine's version and the other.

Both machines are running version 2.4 (19051) (the latest, I believe) and the problem has persisted after re-downloading and re-installing CodeKit on both machines. How can I fix this? Also, what options should be showing up (so I know what machine is bugging)?

config codekit-disagreements

bdkjones commented 8 years ago

Well, the most likely cause of this is using two different versions of CodeKit.

However, I don't have a gcl flag in either JSHint or JSLint's canonical list of flags. The canonical list is stored in CodeKit's app bundle and changes with additions/removals as the app is updated. CodeKit always works from that list. It loads the flags from that list and the values for each flag from the app's Plist file, where all the New Project Defaults are stored.

As far as I know, there has never been a "gcl" flag in that list. That leads me to believe the config.codekit file for this project has been manually edited or corrupted somehow.

bdkjones commented 8 years ago

If you'd like the canonical flags, you can find them by right-clicking CodeKit's application bundle and choosing "show package contents". In the Resources folder, open appDefaults.plist.

WARNING: DO NOT UNDER ANY CIRCUMSTANCES EDIT THAT FILE. Doing so will likely produce an immediate crash. That file is NOT where your custom values/preferences are stored. That's the master list of everything the app can configure. You'll want to look at the jshintFlags and jslintFlags dictionaries.

calvinjuarez commented 8 years ago

Thanks for the reply!

As far as the versions, they both at least claim to be version 2.4 (19051) (like I said in the original post).

With regard to the manual editing hypothesis, if I revert the config.codekit file with Git, CodeKit on the "broken" machine changes it automatically, a change I can see reflected in the Git diffs (as I showed with the screenshot). So it's not being edited manually (though it is being changed by Git during syncs, etc).

And, as for the file being corrupted, the same (again, according to "About CodeKit") version of CodeKit does not have the same problem on my other machine. It would seem rather odd for CodeKit to arbitrarily treat a corrupted file differently on different machines.

I'm going to try a complete uninstall and re-install of CodeKit on the machine that keeps trying to make a gcl flag and see if that fixes things, since it seems most likely CodeKit had some kind of hiccup updating on that machine.

Edit:

As a follow-up, AppDefaults.plist seems to have the correct flags (e.g. has futurehostile, doesn't have gcl). So that doesn't seem to be the issue.

Additionally, the app shows the checkbox for futurehostile; When the box is checked, I can see that an attempt is made to update the config.codekit file, but futurehostile isn't anywhere in that file.

Also, looking at an older config.codekit file, I'm seeing that there was a gcl flag in build 18966.

Edit 2:

I also tried removing the project from CodeKit, deleting the config.codekit file, and re-adding the project to create an entirely new config file. That new file also removes futurehostile and adds gcl.

Edit 3:

Checking my other projects' config files, they're all showing the same problem, so there seems to be some kind of miscommunication in CodeKit between AppDefaults.plist and the actual creation/updating of the config.codekit files.

bdkjones commented 8 years ago

Have you read the Critical Things To Know section of the Help page as it pertains to Git and CodeKit?

Make sure you pause CodeKit before performing any sort of action with Git. Not doing that will cause corruption.

calvinjuarez commented 8 years ago

I can't say that I've been 100% perfect about pausing CodeKit. It seems odd that this is affecting all my projects, though. How would the Git thing compromise the app enough to corrupt all my config files?

Anyway, I'll try the full uninstall/re-install. Can you walk me through a full uninstall?