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

JetStream migration #259

Open
Nick-Mazuk opened this issue Jul 17, 2022 · 1 comment
Open

JetStream migration #259

Nick-Mazuk opened this issue Jul 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Nick-Mazuk
Copy link
Member

TL;DR;

The JetStream Lua script will be migrated from its current repository into this repository. Jacob, CJ, and I just got off a call discussing how we thing it should work. This issue is an overview of how the migration will work and other things we decided.

Terminology

The problem

There are several issues we're trying to solve with this migration:

  1. The JetStream.lua file is getting really large (almost 11,000 lines of code), making it unmaintainable
  2. Many scripts / functions are duplicated between the JetStream.lua and this repository
  3. For many aspects of developer experience (e.g., a shared function library, configuration, etc.), the JetStream.lua needs to keep reinventing the wheel
  4. Many features in our shared library are more robust than those found in the JetStream.lua (e.g., SMuFL font detection)
  5. The JetStream has many functions this repo lacks, and vice versa

In short, by doing this migration, it will improve the quality and maintainability of both this repo and the JetStream.

The migration

The process

  1. Resolve the outstanding PRs and edits awaiting merge in the current JetStream repository
  2. Copy the JetStream.lua file as is from that repository to this one (no code review will be performed as explained later)
  3. Replace functions in the JetStream.lua with those from our shared library
  4. Abstract functions from the JetStream.lua that can be used elsewhere into our shared library
  5. Abstract scripts from this repository that can be used in the JetStream.lua into their own shared library functions
  6. Create standalone scripts from the abstracted JetStream.lua functions

Steps 3–6 won't be entirely linear, but that is roughly the priority. Note, the JetStream AutoHotKey and Keyboard Maestro macros will remain in its current repository. Only the JetStream.lua will be migrated over.

Code review

Initial PR

For the first PR, the JetStream.lua will be copy-pasted from its current repo as is. No code review will be performed. This is because that file would require hundreds of changes to meet the code style standards in this repository. To expedite the migration, we will forego code review in this one instance. Instead, each subsequent PR will be reviewed leading to a gradual improvement of the code.

Codeowners

The JetStream project is more than just a Lua script. It's a collection of Lua scripts, Keyboard Maestro / AutoHotKey macros, and StreamDeck profiles. Each of these need to stay in lock-step with one another.

As such, the jet_stream.lua file will be owned by @CJGarciaMusic and @jwink75. One of them must approve every change to the jet_stream.lua file. This ensures that there won't be any accidental changes to things like the JetStream codes. We will enforce this using GitHub's code owners feature.

It also means that only one of them needs to review any new changes to the jet_stream.lua file. Of course, others are still encouraged to look over PRs editing jet_stream.lua.

This will not apply to any edits to shared library functions jet_stream.lua may depend upon. Those edits will go through the normal code review process.

Distribution

The new jet_stream.lua file will be available to download from the website. However, their installer will be the recommended way to install this script.


I may have missed something from our call. CJ and Jacob, feel free to add a comment with more detail.

cc @rpatters1 @CJGarciaMusic @jwink75 @cv-on-hub @ThistleSifter

@Nick-Mazuk Nick-Mazuk added the enhancement New feature or request label Jul 17, 2022
@jonburr
Copy link

jonburr commented Jul 17, 2022

Great news!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants