How do you manage your default packages? #4414
Replies: 3 comments
-
Two worktreesI use two worktrees and an integration branch for mine:
$ tree -L1 projects/sublime-text/syntax/
..
├── asciidoc
├── ...
├── defaults
├── defaults-edit
├── ...
└── vimldefaults is on my integration branch1 all the time, but defaults-edit bounces around based on what I'm working on. When I have an interesting change, I commit it and re-merge the integration branch. I have some Git aliases in the repo's .git/config, where I pick which branches to include: [alias]
o = "!(pushd ../defaults && git octo && popd)"
octo = "! \
git checkout octopus && \
git reset --hard upstream/master && \
git merge --message 'git-octo merge' --rerere-autoupdate \
`# bash/history` \
`# c/cpp-class-meta` \
`# lisp/errata` \
`# ruby/regex` \
ruby/endless-paul \
`# upstream/develop/latex` \
`# ismell/fix-1830` \
`# jrappen/fix-json` \
`# keith/cs_regex` \
sql/hibernate \
`# sql/select-db` \
"I've been doing this for at least 7 years, and maybe a few more. How it feelsPros
Cons
Footnotes
|
Beta Was this translation helpful? Give feedback.
-
|
I rarely check out other people's pull requests these days, mainly because there're not that many major rewrites and turn-around time has gone way down. Those that are left, are mostly mine, but that's another issue because life happens 🤷🏼 |
Beta Was this translation helpful? Give feedback.
-
|
The main repo is cloned to /data/Sublime/Packages with master branch or a This whole repo is symlinked to a dedicated portable ST setup as /Data/Packages with all syntax related packages from /Packages removed. Default and User folder are .gitignored. This is the final testing instance to verify all syntax-tests pass. Note, this is on Windows and spinning up a VM or struggle with WSL to run syntax-test runner locally is not a thing. For each (group of) package(s)/syntax(es) that long running development takes place on, a separate worktree is created with only the package(s) of interest being checked out and symlinked to primary ST instance's Packages folder. Each such worktree has its own So basically a separate repo for each package with its independent branching and filesystem representation. The general workflow to create such syntax-specific repo is cd ~/Sublime/Packages
git add worktree ../Packages_<Syntax>
cd ../Packages_<Syntax>
git sparse-checkout init
git sparse-checkout add <Syntax>
create junction/symlink of /data/Sublime/Packages_<Syntax>/<Syntax> in %APPDATA%/Sublime Text/Packages/The tricky part is to add relevant/related packages to the sparse-checkout, if a change requires modification to multiple syntaxes in the same PR. My Packages_HTML, for instance, contains HTML, PHP, and Rails packages. Example Worktree Structure:
Thanks to ST and SM resolving symlinks, working within ST is then quite natural for each symlinked package. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The ReadMe installation instructions work fine on a one-off basis, but I found that it was sometimes annoying to switch branches to work on language A or feature B and lose the improvements I (or one of you) made to language X or feature Y.
Do you have an interesting way of handling the way that this repository holds multiple languages?
Beta Was this translation helpful? Give feedback.
All reactions