From cde504f756adaff5e5fcb3d37c4b56aaaf5aaa21 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Wed, 10 Jan 2024 11:19:10 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Specify=20knapsack=20required=20?= =?UTF-8?q?branch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See inline documentation regarding purpose and intent of the hard-coded branch logic. --- Gemfile | 20 +++++++++++++++----- Gemfile.lock | 4 ++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index d4b194f41..469cfc47a 100644 --- a/Gemfile +++ b/Gemfile @@ -108,11 +108,21 @@ gem 'webmock', group: %i[test] # and place overrides, themes and deployment code. # # When you use a knapsack for Hyku development, which we recommend, you'll want to ensure that your -# local knapsack repository has a `main` branch (which it should by default). Due to some -# tomfoolery, of knapsack, the branch name (e.g. `main`) must be checked out locally in the knapsack -# environment that you use to build Docker. +# local knapsack repository has a `'required_for_knapsack_instances'` branch (which it should by +# default). Due to some tomfoolery, of knapsack, the branch name +# (e.g. `required_for_knapsack_instances`) must be checked out locally in the knapsack environment +# that you use to build Docker. # -# tl;dr - Have a local main branch on your knapsack repository -gem 'hyku_knapsack', github: 'samvera-labs/hyku_knapsack', branch: 'main' +# Why not use `main`? We need a stable SHA for building HykuKnapsack prime +# (e.g. samvera-labs/hyku_knapsack). Why the stable SHA? Because when we bundle a knapsack, the +# Hyku submodule uses the SHA of the locally checked out branch specified in the gem spec. Which +# can create a chicken and egg issue; namely I need to update Hyku with a new SHA for Knapsack, but +# to update Knapsack's submodule reference to Hyku, I need a new SHA for knapsack. Thus, I can never +# use a "regular branch". Instead we need to use a separate more stable for Knapsack. +# +# Thus the hopefully descriptive `required_for_knapsack_instances`. +# +# tl;dr - Have a local `required_for_knapsack_instances` branch on your knapsack repository +gem 'hyku_knapsack', github: 'samvera-labs/hyku_knapsack', branch: 'required_for_knapsack_instances' # rubocop:enable Layout/LineLength diff --git a/Gemfile.lock b/Gemfile.lock index db95f9abc..59e86c48a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -95,8 +95,8 @@ GIT GIT remote: https://github.com/samvera-labs/hyku_knapsack.git - revision: 418a390fad222120a36e29271ba6c80ff91b358c - branch: main + revision: 5a7c54cace96881a3963ab2fd881ca6ea3f57372 + branch: required_for_knapsack_instances specs: hyku_knapsack (0.0.1) rails (>= 5.2.0)