citusdata / tools

Tools and config used in Citus Data projects
14 stars 15 forks source link

Update uncrustify install #34

Open jasonmp85 opened 6 years ago

jasonmp85 commented 6 years ago

It's 0.63 and Homebrew's on 0.67f, causing various problems.

thanodnl commented 6 years ago

I have recently installed an older uncrustify version via brew, these steps should help you to install an older version:

$ cd $(dirname $(brew formula uncrustify)) # go to the directory of the formula
$ git log --pretty=oneline -n10 -- uncrustify.rb # find the last 10 versions for the formula
e67306df3354c6ae9b63aebd939b6cbe4d2a13f6 uncrustify: update 0.67 bottle.
ffae36956fd02f79824e80912360fb85a80c264a uncrustify 0.67
60ba0e2eced1cbd16db66bafdcf22d6514487ee6 uncrustify: update 0.66.1 bottle.
3afd590d4de5248064b273bef3ac143d342de444 uncrustify 0.66.1
ecfa0f0552a1356526be47dbcd027665787e37c8 uncrustify: update 0.66 bottle.
53b1979f087af826612746ae34db7d9aa4f84b90 uncrustify 0.66
16ebe5f1843e6cb54856311ff0f676be53007329 Use “squiggly” heredocs.
2887f5665f5f5e7eb8aa620e72ae98fcb008f832 uncrustify: update 0.65 bottle.
bcb1a679048342f702d53df82f953b138335047a uncrustify: update 0.65 bottle.
e6bc57f06ec4845df6fc1e6852035f5296bbf701 uncrustify 0.65
$ git checkout 2887f5665f5f5e7eb8aa620e72ae98fcb008f832 -- uncrustify.rb # choose the version you want to install
$ brew install uncrustify # install uncrustify, you might need to unlink before if you have a newer version installed
...
$ git checkout master -- uncrustify.rb # make sure to reset the formula to the latest so brew stays happy

This should keep citus_indent happy before we upgrade

jasonmp85 commented 6 years ago

@thanodnl thanks for the pointers; I always have to look up how to do old version installs. :+1:

hanefi commented 5 years ago

I am running on a fresh setup here. git log --pretty=oneline -n10 -- uncrustify.rb shows only 3 commits, all of which are on version 0.68

Copying the sha1 from @thanodnl did not work as I don't have the commits in my local.

$ git checkout 2887f5665f5f5e7eb8aa620e72ae98fcb008f832 -- uncrustify.rb
fatal: reference is not a tree: 2887f5665f5f5e7eb8aa620e72ae98fcb008f832

I ended up downloading all brew commit history by running git pull --unshallow and then following the steps @thanodnl provided.

I guess we can provide a copy of the uncrustify formula of the version we desire in this tap. What do you think?

jasonmp85 commented 5 years ago

What if we just updated our uncrustify config to be compatible with the latest version and made the Linux folks upgrade, instead?