Skip to content
New issue

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

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

Already on GitHub? # to your account

Consider keeping metadata and scripts separate #34

Open
borkdude opened this issue Sep 23, 2022 · 2 comments
Open

Consider keeping metadata and scripts separate #34

borkdude opened this issue Sep 23, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@borkdude
Copy link
Contributor

Splitting the metadata has the following benefits:

  • You can re-install scripts, even if the bin dir is wiped
  • You only have to back up those .edn files and can put them into source control
  • It feels less magic than having inline comments in scripts
  • Makes more sense with XDG conventions of keeping data and config separate
@rads
Copy link
Collaborator

rads commented Oct 8, 2023

Picking up where we left off on #62 (comment):

I think there are pros/cons with both approaches. That said, it will be a bit before I change anything here because I want to focus on more user-facing features such as #33, #18, and #69. Let's keep talking about the tradeoffs in the mean time.

@teodorlu
Copy link
Contributor

teodorlu commented Oct 9, 2023

My thoughts on how to store bbin script metadata (copied from #62 (comment), edited for brevity):

I think @borkdude's proposal of having one EDN file per installed script and an operation in bbin to install a script for each EDN file is a good solution.

Why: because implementation complexity and User can track EDN files in Git, and have bbin ensure the scripts are installed on all computers are important, and bbin uninstall safety/atomicity can still be solved in the future.


I mapped this out with a Rich Hickey style decision matrix (as advocated for in De# Practice). Screenshot:

image

Full document: https://docs.google.com/spreadsheets/d/1AWiYHYteuTtTGCaHWg0DNuX2rTXXJTzZzl0pbOzFsWU/edit#gid=0

(send me a Google account if you want write access, eg to add a new column for a different approach, or to add a new row for a different criterium).

I think "metadata by script install name" is the best place to start, then consider "metadata in transaction log" or "metadata by script hexdigest" later if safe/atomic uninstall is desired.

@rads rads added the enhancement New feature or request label Jun 19, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants