Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildsystem caching should respect (git) branches #403

Open
b-g opened this issue Jul 11, 2022 · 6 comments
Open

Buildsystem caching should respect (git) branches #403

b-g opened this issue Jul 11, 2022 · 6 comments

Comments

@b-g
Copy link
Member

b-g commented Jul 11, 2022

Dear @kriskowal! I hope this github message find you well! :)

The buildsystem you contributed some time ago, is still working like a charm and became an indispensable gift to run the entire OpenMoji project in a sane way. Many thanks again!

However we are working finally on making OpenMojis work on dark background #31. And as testing and tweaking every OpenMoji to make them ready for dark mode will take a long time, it would be handy to have dedicated caching in the buildsystem for branches.

I believe, currently running npm run generate caches all hashes of the build artifacts into .git/memo-index and .git/refs/memos/, completely independent whether the run originated in the Master or a Dev branch. This was in the past no problem as the artifacts were only created out of Master ... but this will matter with the upcoming tasks.

Hence could you help us and modify the buildsystem in a way that every branch has its own cache? This would be super handy to finally tackle the dark mode issue. Many thanks!

@kriskowal
Copy link
Member

kriskowal commented Jul 13, 2022

Thank you for your kind words. I think fondly back on my small contributions to this project.

This is of course possible by incorporating the current branch name in the cache ref. The disadvantage is that you’d build from scratch when you switch branches, but that might be mitigated by copying the cache ref when creating a new branch from the same commitish.

I will not have time to look into this, between my work with both @agoric and @tc39 coming up on a local maximum this week, but I will watch and circle back at some point.

@b-g
Copy link
Member Author

b-g commented Jul 14, 2022

Great + many thanks! There is no rush ... we are totally at a busy end-of-semester-peak too, aiming to have a mellow summer and start tackling the dark mode after summer in September ...

Your other work looks interesting! :)

@b-g
Copy link
Member Author

b-g commented Nov 4, 2022

Hi @kriskowal, hope you've had a nice summer! Ping ping :) Any news on the "Buildsystem caching should respect (git) branches" issue? Sorry to bother.

@kriskowal
Copy link
Member

Thank you! I’m only slightly closer now to finding time to look into this. I do not mind the occasional poke.

But emphatically, this is a small change and I can more easily spare time to review a PR, even a highly speculative not-even-working draft PR, if someone can be found to understudy.

@kriskowal
Copy link
Member

It occurred to me while I was on leave that we can solve the problem of separate caches better in terms of Git Worktrees instead of branches. This would allow you to switch branches without abandoning a cache, which I expect is common for folks who work off the main branch. Would that make sense?

@b-g
Copy link
Member Author

b-g commented May 9, 2023

Hi @kriskowal, many thanks for circling back to this one! Sounds interesting, to be honest I've never uses a git worktree in my coding life :)

Basically: It would be great to modify the buildsystem in a way that every branch has its own cache e.g.

  • (master) npm run generate // would be used for the ongoing production
  • (dev-dark-mode) npm run generate // would be used to make OpenMojis finally work on dark background OpenMojis on dark background #31

If this is done under the hood with a worktree or not if probably not very important for 99% of the users of this repo. I guess either way would be fine. OK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants